From b456adb53210bc75d208176e202f19deb3a62d55 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Mon, 16 Sep 2019 17:43:58 -0700 Subject: [PATCH 001/223] chore: add initial files for launch --- .../CODE_OF_CONDUCT.md | 43 ++++ .../CONTRIBUTING.md | 55 +++++ packages/google-devtools-cloudbuild/LICENSE | 202 ++++++++++++++++++ packages/google-devtools-cloudbuild/README.md | 9 + packages/google-devtools-cloudbuild/synth.py | 40 ++++ 5 files changed, 349 insertions(+) create mode 100644 packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md create mode 100644 packages/google-devtools-cloudbuild/CONTRIBUTING.md create mode 100644 packages/google-devtools-cloudbuild/LICENSE create mode 100644 packages/google-devtools-cloudbuild/README.md create mode 100644 packages/google-devtools-cloudbuild/synth.py diff --git a/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md b/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..46b2a08ea6d1 --- /dev/null +++ b/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md @@ -0,0 +1,43 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, +and in the interest of fostering an open and welcoming community, +we pledge to respect all people who contribute through reporting issues, +posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project +a harassment-free experience for everyone, +regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, +body size, race, ethnicity, age, religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, +such as physical or electronic +addresses, without explicit permission +* Other unethical or unprofessional conduct. + +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. +By adopting this Code of Conduct, +project maintainers commit themselves to fairly and consistently +applying these principles to every aspect of managing this project. +Project maintainers who do not follow or enforce the Code of Conduct +may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior +may be reported by opening an issue +or contacting one or more of the project maintainers. + +This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, +available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) diff --git a/packages/google-devtools-cloudbuild/CONTRIBUTING.md b/packages/google-devtools-cloudbuild/CONTRIBUTING.md new file mode 100644 index 000000000000..78aaa61b2693 --- /dev/null +++ b/packages/google-devtools-cloudbuild/CONTRIBUTING.md @@ -0,0 +1,55 @@ +# 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. Submit a pull request. + +## Running the tests + +1. [Prepare your environment for Node.js setup][setup]. + +1. Install dependencies: + + npm install + +1. Run the tests: + + npm test + +1. Lint (and maybe fix) any changes: + + npm run fix + +[setup]: https://cloud.google.com/nodejs/docs/setup diff --git a/packages/google-devtools-cloudbuild/LICENSE b/packages/google-devtools-cloudbuild/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-devtools-cloudbuild/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-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md new file mode 100644 index 000000000000..5e72c83482aa --- /dev/null +++ b/packages/google-devtools-cloudbuild/README.md @@ -0,0 +1,9 @@ +# Node.js Client for Cloud Build API + +Cloud Build lets you build software quickly across all languages. Get complete control over defining custom workflows for building, testing, and deploying across multiple environments such as VMs, serverless, Kubernetes, or Firebase. + +## Installation + +```bash +npm i @google-cloud/cloudbuild +``` diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py new file mode 100644 index 000000000000..b83e905a7e6a --- /dev/null +++ b/packages/google-devtools-cloudbuild/synth.py @@ -0,0 +1,40 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""This script is used to synthesize generated parts of this library.""" + +import synthtool as s +import synthtool.gcp as gcp +import subprocess +import logging + +logging.basicConfig(level=logging.DEBUG) + +# run the gapic generator +gapic = gcp.GAPICGenerator() +versions = ['v1'] +for version in versions: + library = gapic.node_library( + 'cloudbuild', + config_path='/google/devtools/cloudbuild/artman_cloudbuild.yaml', + version=version) + s.copy(library, excludes=[]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library() +s.copy(templates, excludes=[]) + +# Node.js specific cleanup +subprocess.run(['npm', 'install']) +subprocess.run(['npm', 'run', 'fix']) From 5cbe41df7bcc078d2ac38d76769fb822166dc774 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 16 Oct 2019 18:57:16 -0700 Subject: [PATCH 002/223] feat: initial release of cloud build library (#2) --- .../google-devtools-cloudbuild/.eslintignore | 5 + .../google-devtools-cloudbuild/.eslintrc.yml | 15 + .../google-devtools-cloudbuild/.gitignore | 15 + packages/google-devtools-cloudbuild/.jsdoc.js | 48 + packages/google-devtools-cloudbuild/.nycrc | 24 + .../.prettierignore | 3 + .../google-devtools-cloudbuild/.prettierrc | 8 + .../.repo-metadata.json | 13 + .../CONTRIBUTING.md | 10 + packages/google-devtools-cloudbuild/README.md | 134 +- .../cloudbuild.yaml | 5 + .../google-devtools-cloudbuild/codecov.yaml | 4 + .../google-devtools-cloudbuild/package.json | 58 + .../devtools/cloudbuild/v1/cloudbuild.proto | 1288 + .../protos/protos.d.ts | 10033 ++++++ .../protos/protos.js | 25691 ++++++++++++++++ .../protos/protos.json | 2473 ++ .../samples/.eslintrc.yml | 5 + .../samples/README.md | 44 + .../samples/package.json | 24 + .../samples/quickstart.js | 46 + .../google-devtools-cloudbuild/src/browser.js | 21 + .../google-devtools-cloudbuild/src/index.js | 88 + .../src/v1/cloud_build_client.js | 1266 + .../src/v1/cloud_build_client_config.json | 106 + .../src/v1/cloud_build_proto_list.json | 3 + .../devtools/cloudbuild/v1/doc_cloudbuild.js | 1675 + .../doc/google/longrunning/doc_operations.js | 63 + .../src/v1/doc/google/protobuf/doc_any.js | 137 + .../v1/doc/google/protobuf/doc_duration.js | 97 + .../src/v1/doc/google/protobuf/doc_empty.js | 34 + .../v1/doc/google/protobuf/doc_timestamp.js | 119 + .../src/v1/doc/google/rpc/doc_status.js | 95 + .../src/v1/index.js | 19 + .../google-devtools-cloudbuild/synth.metadata | 39 + packages/google-devtools-cloudbuild/synth.py | 23 +- .../system-test/.eslintrc.yml | 3 + .../system-test/system.js | 30 + .../test/.eslintrc.yml | 3 + .../test/gapic-v1.js | 1084 + .../webpack.config.js | 46 + 41 files changed, 44892 insertions(+), 5 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.eslintignore create mode 100644 packages/google-devtools-cloudbuild/.eslintrc.yml create mode 100644 packages/google-devtools-cloudbuild/.gitignore create mode 100644 packages/google-devtools-cloudbuild/.jsdoc.js create mode 100644 packages/google-devtools-cloudbuild/.nycrc create mode 100644 packages/google-devtools-cloudbuild/.prettierignore create mode 100644 packages/google-devtools-cloudbuild/.prettierrc create mode 100644 packages/google-devtools-cloudbuild/.repo-metadata.json create mode 100644 packages/google-devtools-cloudbuild/cloudbuild.yaml create mode 100644 packages/google-devtools-cloudbuild/codecov.yaml create mode 100644 packages/google-devtools-cloudbuild/package.json create mode 100644 packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto create mode 100644 packages/google-devtools-cloudbuild/protos/protos.d.ts create mode 100644 packages/google-devtools-cloudbuild/protos/protos.js create mode 100644 packages/google-devtools-cloudbuild/protos/protos.json create mode 100644 packages/google-devtools-cloudbuild/samples/.eslintrc.yml create mode 100644 packages/google-devtools-cloudbuild/samples/README.md create mode 100644 packages/google-devtools-cloudbuild/samples/package.json create mode 100644 packages/google-devtools-cloudbuild/samples/quickstart.js create mode 100644 packages/google-devtools-cloudbuild/src/browser.js create mode 100644 packages/google-devtools-cloudbuild/src/index.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json create mode 100644 packages/google-devtools-cloudbuild/src/v1/cloud_build_proto_list.json create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/index.js create mode 100644 packages/google-devtools-cloudbuild/synth.metadata create mode 100644 packages/google-devtools-cloudbuild/system-test/.eslintrc.yml create mode 100644 packages/google-devtools-cloudbuild/system-test/system.js create mode 100644 packages/google-devtools-cloudbuild/test/.eslintrc.yml create mode 100644 packages/google-devtools-cloudbuild/test/gapic-v1.js create mode 100644 packages/google-devtools-cloudbuild/webpack.config.js diff --git a/packages/google-devtools-cloudbuild/.eslintignore b/packages/google-devtools-cloudbuild/.eslintignore new file mode 100644 index 000000000000..09b31fe735a0 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.eslintignore @@ -0,0 +1,5 @@ +**/node_modules +src/**/doc/* +build/ +docs/ +protos/ diff --git a/packages/google-devtools-cloudbuild/.eslintrc.yml b/packages/google-devtools-cloudbuild/.eslintrc.yml new file mode 100644 index 000000000000..73eeec27612d --- /dev/null +++ b/packages/google-devtools-cloudbuild/.eslintrc.yml @@ -0,0 +1,15 @@ +--- +extends: + - 'eslint:recommended' + - 'plugin:node/recommended' + - prettier +plugins: + - node + - prettier +rules: + prettier/prettier: error + block-scoped-var: error + eqeqeq: error + no-warning-comments: warn + no-var: error + prefer-const: error diff --git a/packages/google-devtools-cloudbuild/.gitignore b/packages/google-devtools-cloudbuild/.gitignore new file mode 100644 index 000000000000..e1a76628b307 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.gitignore @@ -0,0 +1,15 @@ +**/*.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-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js new file mode 100644 index 000000000000..14fc59a8fdaa --- /dev/null +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -0,0 +1,48 @@ +/*! + * Copyright 2018 Google LLC. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'src' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2018 Google, LLC.', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/cloudbuild', + theme: 'lumen' + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-devtools-cloudbuild/.nycrc b/packages/google-devtools-cloudbuild/.nycrc new file mode 100644 index 000000000000..23e322204ece --- /dev/null +++ b/packages/google-devtools-cloudbuild/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/src/**/v*/**/*.js", + "**/protos", + "**/test", + ".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-devtools-cloudbuild/.prettierignore b/packages/google-devtools-cloudbuild/.prettierignore new file mode 100644 index 000000000000..f6fac98b0a8e --- /dev/null +++ b/packages/google-devtools-cloudbuild/.prettierignore @@ -0,0 +1,3 @@ +node_modules/* +samples/node_modules/* +src/**/doc/* diff --git a/packages/google-devtools-cloudbuild/.prettierrc b/packages/google-devtools-cloudbuild/.prettierrc new file mode 100644 index 000000000000..df6eac074460 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.prettierrc @@ -0,0 +1,8 @@ +--- +bracketSpacing: false +printWidth: 80 +semi: true +singleQuote: true +tabWidth: 2 +trailingComma: es5 +useTabs: false diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json new file mode 100644 index 000000000000..83f09828973f --- /dev/null +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "cloudbuild", + "name_pretty": "Cloud Build", + "product_documentation": "https://cloud.google.com/cloud-build/docs/", + "client_documentation": "https://googleapis.dev/nodejs/cloudbuild/latest/index.html", + "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-cloudbuild", + "distribution_name": "@google-cloud/cloudbuild", + "api_id": "cloudbuild.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-devtools-cloudbuild/CONTRIBUTING.md b/packages/google-devtools-cloudbuild/CONTRIBUTING.md index 78aaa61b2693..f6c4cf010e34 100644 --- a/packages/google-devtools-cloudbuild/CONTRIBUTING.md +++ b/packages/google-devtools-cloudbuild/CONTRIBUTING.md @@ -34,6 +34,7 @@ accept your pull requests. 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. ## Running the tests @@ -46,8 +47,17 @@ accept your pull requests. 1. Run the tests: + # Run unit tests. npm test + # Run sample integration tests. + gcloud auth application-default login + npm run samples-test + + # Run all system tests. + gcloud auth application-default login + npm run system-test + 1. Lint (and maybe fix) any changes: npm run fix diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 5e72c83482aa..bce2f8a84603 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -1,9 +1,135 @@ -# Node.js Client for Cloud Build API +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo -Cloud Build lets you build software quickly across all languages. Get complete control over defining custom workflows for building, testing, and deploying across multiple environments such as VMs, serverless, Kubernetes, or Firebase. +# [Cloud Build: Node.js Client](https://github.com/googleapis/nodejs-cloudbuild) -## Installation +[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-cloud/cloudbuild.svg)](https://www.npmjs.org/package/@google-cloud/cloudbuild) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloudbuild/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloudbuild) + + + + +Cloud Build API client for Node.js + + +* [Cloud Build Node.js Client API Reference][client-docs] +* [Cloud Build Documentation][product-docs] +* [github.com/googleapis/nodejs-cloudbuild](https://github.com/googleapis/nodejs-cloudbuild) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Build 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 i @google-cloud/cloudbuild +npm install @google-cloud/cloudbuild ``` + + +### Using the client library + +```javascript +async function quickstart( + projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID + triggerId = 'YOUR_TRIGGER_ID', // UUID for build trigger. + branchName = 'BRANCH_TO_BUILD' // Branch to run build against. +) { + // Imports the Google Cloud client library + const {CloudBuildClient} = require('@google-cloud/cloudbuild'); + + // Creates a client + const cb = new CloudBuildClient(); + + // Starts a build against the branch provided. + const request = { + projectId, + triggerId, + source: { + projectId: projectId, + dir: './', + branchName, + }, + }; + await cb.runBuildTrigger(request); + console.info(`triggered build for ${triggerId}`); +} + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloudbuild/tree/master/samples) directory. The samples' `README.md` +has instructions for running the samples. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | + + + +The [Cloud Build Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + +This library is considered to be in **beta**. This means it is expected to be +mostly stable while we work toward a general availability release; however, +complete stability is not guaranteed. We will address issues and requests +against beta libraries with a high priority. + + + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloudbuild/blob/master/CONTRIBUTING.md). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/nodejs-cloudbuild/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/cloudbuild/latest/index.html +[product-docs]: https://cloud.google.com/cloud-build/docs/ +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=cloudbuild.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml new file mode 100644 index 000000000000..b963083d1494 --- /dev/null +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -0,0 +1,5 @@ +steps: +- name: 'gcr.io/cloud-builders/npm:node-10.10.0' + args: ['install'] +- name: 'gcr.io/cloud-builders/npm:node-10.10.0' + args: ['run', 'lint'] diff --git a/packages/google-devtools-cloudbuild/codecov.yaml b/packages/google-devtools-cloudbuild/codecov.yaml new file mode 100644 index 000000000000..5724ea9478d7 --- /dev/null +++ b/packages/google-devtools-cloudbuild/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json new file mode 100644 index 000000000000..d3faf7e635a5 --- /dev/null +++ b/packages/google-devtools-cloudbuild/package.json @@ -0,0 +1,58 @@ +{ + "repository": "googleapis/nodejs-cloudbuild", + "name": "@google-cloud/cloudbuild", + "version": "0.1.0", + "author": "Google LLC", + "description": "Cloud Build API client for Node.js", + "main": "src/index.js", + "browser": "src/browser.js", + "files": [ + "protos", + "src", + "AUTHORS", + "COPYING" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google cloudbuild", + "cloudbuild", + "Cloud Build API" + ], + "devDependencies": { + "c8": "^5.0.4", + "chai": "^4.2.0", + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-plugin-node": "^9.0.1", + "eslint-plugin-prettier": "^3.0.1", + "jsdoc": "^3.6.2", + "jsdoc-fresh": "^1.0.2", + "linkinator": "^1.4.0", + "mocha": "^6.1.4", + "prettier": "^1.17.0" + }, + "scripts": { + "docs": "jsdoc -c .jsdoc.js", + "fix": "eslint . --fix", + "lint": "eslint .", + "test": "c8 mocha test/*.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/cloudbuild|googleapis.dev.*|github.com.*'", + "samples-test": "c8 mocha --timeout=30000 samples/system-test/*.js", + "system-test": "c8 mocha --timeout=15000 system-test/*.js" + }, + "license": "Apache-2.0", + "engines": { + "node": ">=8.10.0" + }, + "dependencies": { + "google-gax": "^1.6.3" + } +} diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto new file mode 100644 index 000000000000..492810f71793 --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -0,0 +1,1288 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +syntax = "proto3"; + +package google.devtools.cloudbuild.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild"; +option java_multiple_files = true; +option java_package = "com.google.cloudbuild.v1"; +option objc_class_prefix = "GCB"; + +// Creates and manages builds on Google Cloud Platform. +// +// The main concept used by this API is a `Build`, which describes the location +// of the source to build, how to build the source, and where to store the +// built artifacts, if any. +// +// A user can list previously-requested builds or get builds by their ID to +// determine the status of the build. +service CloudBuild { + option (google.api.default_host) = "cloudbuild.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Starts a build with the specified configuration. + // + // This method returns a long-running `Operation`, which includes the build + // ID. Pass the build ID to `GetBuild` to determine the build status (such as + // `SUCCESS` or `FAILURE`). + rpc CreateBuild(CreateBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds" + body: "build" + }; + option (google.api.method_signature) = "project_id,build"; + } + + // Returns information about a previously requested build. + // + // The `Build` that is returned includes its status (such as `SUCCESS`, + // `FAILURE`, or `WORKING`), and timing information. + rpc GetBuild(GetBuildRequest) returns (Build) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/builds/{id}" + }; + option (google.api.method_signature) = "project_id,id"; + } + + // Lists previously requested builds. + // + // Previously requested builds may still be in-progress, or may have finished + // successfully or unsuccessfully. + rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/builds" + }; + option (google.api.method_signature) = "project_id,filter"; + } + + // Cancels a build in progress. + rpc CancelBuild(CancelBuildRequest) returns (Build) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds/{id}:cancel" + body: "*" + }; + option (google.api.method_signature) = "project_id,id"; + } + + // Creates a new build based on the specified build. + // + // This method creates a new build using the original build request, which may + // or may not result in an identical build. + // + // For triggered builds: + // + // * Triggered builds resolve to a precise revision; therefore a retry of a + // triggered build will result in a build that uses the same revision. + // + // For non-triggered builds that specify `RepoSource`: + // + // * If the original build built from the tip of a branch, the retried build + // will build from the tip of that branch, which may not be the same revision + // as the original build. + // * If the original build specified a commit sha or revision ID, the retried + // build will use the identical source. + // + // For builds that specify `StorageSource`: + // + // * If the original build pulled source from Google Cloud Storage without + // specifying the generation of the object, the new build will use the current + // object, which may be different from the original build source. + // * If the original build pulled source from Cloud Storage and specified the + // generation of the object, the new build will attempt to use the same + // object, which may or may not be available depending on the bucket's + // lifecycle management settings. + rpc RetryBuild(RetryBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/builds/{id}:retry" + body: "*" + }; + option (google.api.method_signature) = "project_id,id"; + } + + // Creates a new `BuildTrigger`. + // + // This API is experimental. + rpc CreateBuildTrigger(CreateBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/triggers" + body: "trigger" + }; + option (google.api.method_signature) = "project_id,trigger"; + } + + // Returns information about a `BuildTrigger`. + // + // This API is experimental. + rpc GetBuildTrigger(GetBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/triggers/{trigger_id}" + }; + option (google.api.method_signature) = "project_id,trigger_id"; + } + + // Lists existing `BuildTrigger`s. + // + // This API is experimental. + rpc ListBuildTriggers(ListBuildTriggersRequest) + returns (ListBuildTriggersResponse) { + option (google.api.http) = { + get: "/v1/projects/{project_id}/triggers" + }; + option (google.api.method_signature) = "project_id"; + } + + // Deletes a `BuildTrigger` by its project ID and trigger ID. + // + // This API is experimental. + rpc DeleteBuildTrigger(DeleteBuildTriggerRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/projects/{project_id}/triggers/{trigger_id}" + }; + option (google.api.method_signature) = "project_id,trigger_id"; + } + + // Updates a `BuildTrigger` by its project ID and trigger ID. + // + // This API is experimental. + rpc UpdateBuildTrigger(UpdateBuildTriggerRequest) returns (BuildTrigger) { + option (google.api.http) = { + patch: "/v1/projects/{project_id}/triggers/{trigger_id}" + body: "trigger" + }; + option (google.api.method_signature) = "project_id,trigger_id,trigger"; + } + + // Runs a `BuildTrigger` at a particular source revision. + rpc RunBuildTrigger(RunBuildTriggerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/triggers/{trigger_id}:run" + body: "source" + }; + option (google.api.method_signature) = "project_id,trigger_id,source"; + } + + // Creates a `WorkerPool` to run the builds, and returns the new worker pool. + // + // This API is experimental. + rpc CreateWorkerPool(CreateWorkerPoolRequest) returns (WorkerPool) {} + + // Returns information about a `WorkerPool`. + // + // This API is experimental. + rpc GetWorkerPool(GetWorkerPoolRequest) returns (WorkerPool) {} + + // Deletes a `WorkerPool` by its project ID and WorkerPool name. + // + // This API is experimental. + rpc DeleteWorkerPool(DeleteWorkerPoolRequest) + returns (google.protobuf.Empty) {} + + // Update a `WorkerPool`. + // + // This API is experimental. + rpc UpdateWorkerPool(UpdateWorkerPoolRequest) returns (WorkerPool) {} + + // List project's `WorkerPool`s. + // + // This API is experimental. + rpc ListWorkerPools(ListWorkerPoolsRequest) + returns (ListWorkerPoolsResponse) {} +} + +// Specifies a build to retry. +message RetryBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Build ID of the original build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Specifies a build trigger to run and the source to use. +message RunBuildTriggerRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the trigger. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Source to build against this trigger. + RepoSource source = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Location of the source in an archive file in Google Cloud Storage. +message StorageSource { + // Google Cloud Storage bucket containing the source (see + // [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + string bucket = 1; + + // Google Cloud Storage object containing the source. + // + // This object must be a gzipped archive file (`.tar.gz`) containing source to + // build. + string object = 2; + + // Google Cloud Storage generation for the object. If the generation is + // omitted, the latest generation will be used. + int64 generation = 3; +} + +// Location of the source in a Google Cloud Source Repository. +message RepoSource { + // ID of the project that owns the Cloud Source Repository. If omitted, the + // project ID requesting the build is assumed. + string project_id = 1; + + // Name of the Cloud Source Repository. If omitted, the name "default" is + // assumed. + string repo_name = 2; + + // A revision within the Cloud Source Repository must be specified in + // one of these ways. + oneof revision { + // Regex matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch_name = 3; + + // Regex matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string tag_name = 4; + + // Explicit commit SHA to build. + string commit_sha = 5; + } + + // Directory, relative to the source root, in which to run the build. + // + // This must be a relative path. If a step's `dir` is specified and is an + // absolute path, this value is ignored for that step's execution. + string dir = 7; +} + +// Location of the source in a supported storage service. +message Source { + // Location of source. + oneof source { + // If provided, get the source from this location in Google Cloud Storage. + StorageSource storage_source = 2; + + // If provided, get the source from this location in a Cloud Source + // Repository. + RepoSource repo_source = 3; + } +} + +// An image built by the pipeline. +message BuiltImage { + // Name used to push the container image to Google Container Registry, as + // presented to `docker push`. + string name = 1; + + // Docker Registry 2.0 digest. + string digest = 3; + + // Output only. Stores timing information for pushing the specified image. + TimeSpan push_timing = 4; +} + +// A step in the build pipeline. +message BuildStep { + // Required. The name of the container image that will run this particular + // build step. + // + // If the image is available in the host's Docker daemon's cache, it + // will be run directly. If not, the host will attempt to pull the image + // first, using the builder service account's credentials if necessary. + // + // The Docker daemon's cache will already have the latest versions of all of + // the officially supported build steps + // ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + // The Docker daemon will also have cached many of the layers for some popular + // images, like "ubuntu", "debian", but they will be refreshed at the time you + // attempt to use them. + // + // If you built an image in a previous build step, it will be stored in the + // host's Docker daemon's cache and is available to use as the name for a + // later build step. + string name = 1; + + // A list of environment variable definitions to be used when running a step. + // + // The elements are of the form "KEY=VALUE" for the environment variable "KEY" + // being given the value "VALUE". + repeated string env = 2; + + // A list of arguments that will be presented to the step when it is started. + // + // If the image used to run the step's container has an entrypoint, the `args` + // are used as arguments to that entrypoint. If the image does not define + // an entrypoint, the first element in args is used as the entrypoint, + // and the remainder will be used as arguments. + repeated string args = 3; + + // Working directory to use when running this step's container. + // + // If this value is a relative path, it is relative to the build's working + // directory. If this value is absolute, it may be outside the build's working + // directory, in which case the contents of the path may not be persisted + // across build step executions, unless a `volume` for that path is specified. + // + // If the build specifies a `RepoSource` with `dir` and a step with a `dir`, + // which specifies an absolute path, the `RepoSource` `dir` is ignored for + // the step's execution. + string dir = 4; + + // Unique identifier for this build step, used in `wait_for` to + // reference this build step as a dependency. + string id = 5; + + // The ID(s) of the step(s) that this build step depends on. + // This build step will not start until all the build steps in `wait_for` + // have completed successfully. If `wait_for` is empty, this build step will + // start when all previous build steps in the `Build.Steps` list have + // completed successfully. + repeated string wait_for = 6; + + // Entrypoint to be used instead of the build step image's default entrypoint. + // If unset, the image's default entrypoint is used. + string entrypoint = 7; + + // A list of environment variables which are encrypted using a Cloud Key + // Management Service crypto key. These values must be specified in the + // build's `Secret`. + repeated string secret_env = 8; + + // List of volumes to mount into the build step. + // + // Each volume is created as an empty volume prior to execution of the + // build step. Upon completion of the build, volumes and their contents are + // discarded. + // + // Using a named volume in only one step is not valid as it is indicative + // of a build request with an incorrect configuration. + repeated Volume volumes = 9; + + // Output only. Stores timing information for executing this build step. + TimeSpan timing = 10; + + // Output only. Stores timing information for pulling this build step's + // builder image only. + TimeSpan pull_timing = 13; + + // Time limit for executing this build step. If not defined, the step has no + // time limit and will be allowed to continue to run until either it completes + // or the build itself times out. + google.protobuf.Duration timeout = 11; + + // Output only. Status of the build step. At this time, build step status is + // only updated on build completion; step status is not updated in real-time + // as the build progresses. + Build.Status status = 12; +} + +// Volume describes a Docker container volume which is mounted into build steps +// in order to persist files across build step execution. +message Volume { + // Name of the volume to mount. + // + // Volume names must be unique per build step and must be valid names for + // Docker volumes. Each named volume must be used by at least two build steps. + string name = 1; + + // Path at which to mount the volume. + // + // Paths must be absolute and cannot conflict with other volume paths on the + // same build step or with certain reserved volume paths. + string path = 2; +} + +// Artifacts created by the build pipeline. +message Results { + // Container images that were built as a part of the build. + repeated BuiltImage images = 2; + + // List of build step digests, in the order corresponding to build step + // indices. + repeated string build_step_images = 3; + + // Path to the artifact manifest. Only populated when artifacts are uploaded. + string artifact_manifest = 4; + + // Number of artifacts uploaded. Only populated when artifacts are uploaded. + int64 num_artifacts = 5; + + // List of build step outputs, produced by builder images, in the order + // corresponding to build step indices. + // + // [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) + // can produce this output by writing to `$BUILDER_OUTPUT/output`. + // Only the first 4KB of data is stored. + repeated bytes build_step_outputs = 6; + + // Time to push all non-container artifacts. + TimeSpan artifact_timing = 7; +} + +// An artifact that was uploaded during a build. This +// is a single record in the artifact manifest JSON file. +message ArtifactResult { + // The path of an artifact in a Google Cloud Storage bucket, with the + // generation number. For example, + // `gs://mybucket/path/to/output.jar#generation`. + string location = 1; + + // The file hash of the artifact. + repeated FileHashes file_hash = 2; +} + +// A build resource in the Cloud Build API. +// +// At a high level, a `Build` describes where to find source code, how to build +// it (for example, the builder image to run on the source), and where to store +// the built artifacts. +// +// Fields can include the following variables, which will be expanded when the +// build is created: +// +// - $PROJECT_ID: the project ID of the build. +// - $BUILD_ID: the autogenerated ID of the build. +// - $REPO_NAME: the source repository name specified by RepoSource. +// - $BRANCH_NAME: the branch name specified by RepoSource. +// - $TAG_NAME: the tag name specified by RepoSource. +// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or +// resolved from the specified branch or tag. +// - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. +message Build { + // Possible status of a build or build step. + enum Status { + // Status of the build is unknown. + STATUS_UNKNOWN = 0; + + // Build or step is queued; work has not yet begun. + QUEUED = 1; + + // Build or step is being executed. + WORKING = 2; + + // Build or step finished successfully. + SUCCESS = 3; + + // Build or step failed to complete successfully. + FAILURE = 4; + + // Build or step failed due to an internal cause. + INTERNAL_ERROR = 5; + + // Build or step took longer than was allowed. + TIMEOUT = 6; + + // Build or step was canceled by a user. + CANCELLED = 7; + } + + // Output only. Unique identifier of the build. + string id = 1; + + // Output only. ID of the project. + string project_id = 16; + + // Output only. Status of the build. + Status status = 2; + + // Output only. Customer-readable message about the current status. + string status_detail = 24; + + // The location of the source files to build. + Source source = 3; + + // Required. The operations to be performed on the workspace. + repeated BuildStep steps = 11; + + // Output only. Results of the build. + Results results = 10; + + // Output only. Time at which the request to create the build was received. + google.protobuf.Timestamp create_time = 6; + + // Output only. Time at which execution of the build was started. + google.protobuf.Timestamp start_time = 7; + + // Output only. Time at which execution of the build was finished. + // + // The difference between finish_time and start_time is the duration of the + // build's execution. + google.protobuf.Timestamp finish_time = 8; + + // Amount of time that this build should be allowed to run, to second + // granularity. If this amount of time elapses, work on the build will cease + // and the build status will be `TIMEOUT`. + // + // Default time is ten minutes. + google.protobuf.Duration timeout = 12; + + // A list of images to be pushed upon the successful completion of all build + // steps. + // + // The images are pushed using the builder service account's credentials. + // + // The digests of the pushed images will be stored in the `Build` resource's + // results field. + // + // If any of the images fail to be pushed, the build status is marked + // `FAILURE`. + repeated string images = 13; + + // Artifacts produced by the build that should be uploaded upon + // successful completion of all build steps. + Artifacts artifacts = 37; + + // Google Cloud Storage bucket where logs should be written (see + // [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + // Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + string logs_bucket = 19; + + // Output only. A permanent fixed identifier for source. + SourceProvenance source_provenance = 21; + + // Output only. The ID of the `BuildTrigger` that triggered this build, if it + // was triggered automatically. + string build_trigger_id = 22; + + // Special options for this build. + BuildOptions options = 23; + + // Output only. URL to logs for this build in Google Cloud Console. + string log_url = 25; + + // Substitutions data for `Build` resource. + map substitutions = 29; + + // Tags for annotation of a `Build`. These are not docker tags. + repeated string tags = 31; + + // Secrets to decrypt using Cloud Key Management Service. + repeated Secret secrets = 32; + + // Output only. Stores timing information for phases of the build. Valid keys + // are: + // + // * BUILD: time to execute all build steps + // * PUSH: time to push all specified images. + // * FETCHSOURCE: time to fetch source. + // + // If the build does not specify source or images, + // these keys will not be included. + map timing = 33; +} + +// Artifacts produced by a build that should be uploaded upon +// successful completion of all build steps. +message Artifacts { + // Files in the workspace to upload to Cloud Storage upon successful + // completion of all build steps. + message ArtifactObjects { + // Cloud Storage bucket and optional object path, in the form + // "gs://bucket/path/to/somewhere/". (see [Bucket Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + // + // Files in the workspace matching any path pattern will be uploaded to + // Cloud Storage with this location as a prefix. + string location = 1; + + // Path globs used to match files in the build's workspace. + repeated string paths = 2; + + // Output only. Stores timing information for pushing all artifact objects. + TimeSpan timing = 3; + } + + // A list of images to be pushed upon the successful completion of all build + // steps. + // + // The images will be pushed using the builder service account's credentials. + // + // The digests of the pushed images will be stored in the Build resource's + // results field. + // + // If any of the images fail to be pushed, the build is marked FAILURE. + repeated string images = 1; + + // A list of objects to be uploaded to Cloud Storage upon successful + // completion of all build steps. + // + // Files in the workspace matching specified paths globs will be uploaded to + // the specified Cloud Storage location using the builder service account's + // credentials. + // + // The location and generation of the uploaded objects will be stored in the + // Build resource's results field. + // + // If any objects fail to be pushed, the build is marked FAILURE. + ArtifactObjects objects = 2; +} + +// Start and end times for a build execution phase. +message TimeSpan { + // Start of time span. + google.protobuf.Timestamp start_time = 1; + + // End of time span. + google.protobuf.Timestamp end_time = 2; +} + +// Metadata for build operations. +message BuildOperationMetadata { + // The build that the operation is tracking. + Build build = 1; +} + +// Provenance of the source. Ways to find the original source, or verify that +// some source was used for this build. +message SourceProvenance { + // A copy of the build's `source.storage_source`, if exists, with any + // generations resolved. + StorageSource resolved_storage_source = 3; + + // A copy of the build's `source.repo_source`, if exists, with any + // revisions resolved. + RepoSource resolved_repo_source = 6; + + // Output only. Hash(es) of the build source, which can be used to verify that + // the original source integrity was maintained in the build. Note that + // `FileHashes` will only be populated if `BuildOptions` has requested a + // `SourceProvenanceHash`. + // + // The keys to this map are file paths used as build source and the values + // contain the hash values for those files. + // + // If the build source came in a single package such as a gzipped tarfile + // (`.tar.gz`), the `FileHash` will be for the single path to that file. + map file_hashes = 4; +} + +// Container message for hashes of byte content of files, used in +// SourceProvenance messages to verify integrity of source input to the build. +message FileHashes { + // Collection of file hashes. + repeated Hash file_hash = 1; +} + +// Container message for hash values. +message Hash { + // Specifies the hash algorithm, if any. + enum HashType { + // No hash requested. + NONE = 0; + + // Use a sha256 hash. + SHA256 = 1; + + // Use a md5 hash. + MD5 = 2; + } + + // The type of hash that was performed. + HashType type = 1; + + // The hash value. + bytes value = 2; +} + +// Pairs a set of secret environment variables containing encrypted +// values with the Cloud KMS key to use to decrypt the value. +message Secret { + // Cloud KMS key name to use to decrypt these envs. + string kms_key_name = 1; + + // Map of environment variable name to its encrypted value. + // + // Secret environment variables must be unique across all of a build's + // secrets, and must be used by at least one build step. Values can be at most + // 64 KB in size. There can be at most 100 secret values across all of a + // build's secrets. + map secret_env = 3; +} + +// Request to create a new build. +message CreateBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Build resource to create. + Build build = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to get a build. +message GetBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list builds. +message ListBuildsRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Token to provide to skip to a particular spot in the list. + string page_token = 3; + + // The raw filter text to constrain the results. + string filter = 8; +} + +// Response including listed builds. +message ListBuildsResponse { + // Builds will be sorted by `create_time`, descending. + repeated Build builds = 1; + + // Token to receive the next page of results. + string next_page_token = 2; +} + +// Request to cancel an ongoing build. +message CancelBuildRequest { + // Required. ID of the project. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the build. + string id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Configuration for an automated build in response to source repository +// changes. +message BuildTrigger { + // Output only. Unique identifier of the trigger. + string id = 1; + + // Human-readable description of this trigger. + string description = 10; + + // User assigned name of the trigger. Must be unique within the project. + string name = 21; + + // Tags for annotation of a `BuildTrigger` + repeated string tags = 19; + + // Template describing the types of source changes to trigger a build. + // + // Branch and tag names in trigger templates are interpreted as regular + // expressions. Any branch or tag change that matches that regular expression + // will trigger a build. + RepoSource trigger_template = 7; + + // GitHubEventsConfig describes the configuration of a trigger that creates + // a build whenever a GitHub event is received. + GitHubEventsConfig github = 13; + + // Template describing the Build request to make when the trigger is matched. + oneof build_template { + // Contents of the build template. + Build build = 4; + + // Path, from the source root, to a file whose contents is used for the + // template. + string filename = 8; + } + + // Output only. Time when the trigger was created. + google.protobuf.Timestamp create_time = 5; + + // If true, the trigger will never result in a build. + bool disabled = 9; + + // Substitutions data for Build resource. + map substitutions = 11; + + // ignored_files and included_files are file glob matches using + // http://godoc/pkg/path/filepath#Match extended with support for "**". + // + // If ignored_files and changed files are both empty, then they are + // not used to determine whether or not to trigger a build. + // + // If ignored_files is not empty, then we ignore any files that match + // any of the ignored_file globs. If the change has no files that are + // outside of the ignored_files globs, then we do not trigger a build. + repeated string ignored_files = 15; + + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is empty, then as far as this filter is + // concerned, we should trigger the build. + // + // If any of the files altered in the commit pass the ignored_files + // filter and included_files is not empty, then we make sure that at + // least one of those files matches a included_files glob. If not, + // then we do not trigger a build. + repeated string included_files = 16; +} + +// GitHubEventsConfig describes the configuration of a trigger that creates a +// build whenever a GitHub event is received. +// +// This message is experimental. +message GitHubEventsConfig { + // The installationID that emits the GitHub event. + int64 installation_id = 1; + + // Owner of the repository. For example: The owner for + // https://github.com/googlecloudplatform/cloud-builders is + // "googlecloudplatform". + string owner = 6; + + // Name of the repository. For example: The name for + // https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". + string name = 7; + + // Filter describing the types of events to trigger a build. + // Currently supported event types: push, pull_request. + oneof event { + // filter to match changes in pull requests. + PullRequestFilter pull_request = 4; + + // filter to match changes in refs like branches, tags. + PushFilter push = 5; + } +} + +// PullRequestFilter contains filter properties for matching GitHub Pull +// Requests. +message PullRequestFilter { + // Controls behavior of Pull Request comments. + enum CommentControl { + // Do not require comments on Pull Requests before builds are triggered. + COMMENTS_DISABLED = 0; + + // Enforce that repository owners or collaborators must comment on Pull + // Requests before builds are triggered. + COMMENTS_ENABLED = 1; + } + + // Target refs to match. + // A target ref is the git reference where the pull request will be applied. + oneof git_ref { + // Regex of branches to match. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + } + + // Whether to block builds on a "/gcbrun" comment from a repository owner or + // collaborator. + CommentControl comment_control = 5; +} + +// Push contains filter properties for matching GitHub git pushes. +message PushFilter { + // Modified refs to match. + // A modified refs are the refs modified by a git push operation. + oneof git_ref { + // Regexes matching branches to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string branch = 2; + + // Regexes matching tags to build. + // + // The syntax of the regular expressions accepted is the syntax accepted by + // RE2 and described at https://github.com/google/re2/wiki/Syntax + string tag = 3; + } +} + +// Request to create a new `BuildTrigger`. +message CreateBuildTriggerRequest { + // Required. ID of the project for which to configure automatic builds. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. `BuildTrigger` to create. + BuildTrigger trigger = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Returns the `BuildTrigger` with the specified ID. +message GetBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to get. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to list existing `BuildTriggers`. +message ListBuildTriggersRequest { + // Required. ID of the project for which to list BuildTriggers. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Number of results to return in the list. + int32 page_size = 2; + + // Token to provide to skip to a particular spot in the list. + string page_token = 3; +} + +// Response containing existing `BuildTriggers`. +message ListBuildTriggersResponse { + // `BuildTriggers` for the project, sorted by `create_time` descending. + repeated BuildTrigger triggers = 1; + + // Token to receive the next page of results. + string next_page_token = 2; +} + +// Request to delete a `BuildTrigger`. +message DeleteBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to delete. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update an existing `BuildTrigger`. +message UpdateBuildTriggerRequest { + // Required. ID of the project that owns the trigger. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. ID of the `BuildTrigger` to update. + string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. `BuildTrigger` to update. + BuildTrigger trigger = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Optional arguments to enable specific features of builds. +message BuildOptions { + // Specifies the manner in which the build should be verified, if at all. + enum VerifyOption { + // Not a verifiable build. (default) + NOT_VERIFIED = 0; + + // Verified build. + VERIFIED = 1; + } + + // Supported VM sizes. + enum MachineType { + // Standard machine type. + UNSPECIFIED = 0; + + // Highcpu machine with 8 CPUs. + N1_HIGHCPU_8 = 1; + + // Highcpu machine with 32 CPUs. + N1_HIGHCPU_32 = 2; + } + + // Specifies the behavior when there is an error in the substitution checks. + enum SubstitutionOption { + // Fails the build if error in substitutions checks, like missing + // a substitution in the template or in the map. + MUST_MATCH = 0; + + // Do not fail the build if error in substitutions checks. + ALLOW_LOOSE = 1; + } + + // Specifies the behavior when writing build logs to Google Cloud Storage. + enum LogStreamingOption { + // Service may automatically determine build log streaming behavior. + STREAM_DEFAULT = 0; + + // Build logs should be streamed to Google Cloud Storage. + STREAM_ON = 1; + + // Build logs should not be streamed to Google Cloud Storage; they will be + // written when the build is completed. + STREAM_OFF = 2; + } + + // Specifies the logging mode. + enum LoggingMode { + // The service determines the logging mode. The default is `LEGACY`. Do not + // rely on the default logging behavior as it may change in the future. + LOGGING_UNSPECIFIED = 0; + + // Stackdriver logging and Cloud Storage logging are enabled. + LEGACY = 1; + + // Only Cloud Storage logging is enabled. + GCS_ONLY = 2; + } + + // Requested hash for SourceProvenance. + repeated Hash.HashType source_provenance_hash = 1; + + // Requested verifiability options. + VerifyOption requested_verify_option = 2; + + // Compute Engine machine type on which to run the build. + MachineType machine_type = 3; + + // Requested disk size for the VM that runs the build. Note that this is *NOT* + // "disk free"; some of the space will be used by the operating system and + // build utilities. Also note that this is the minimum disk size that will be + // allocated for the build -- the build may run with a larger disk than + // requested. At present, the maximum disk size is 1000GB; builds that request + // more than the maximum are rejected with an error. + int64 disk_size_gb = 6; + + // Option to specify behavior when there is an error in the substitution + // checks. + SubstitutionOption substitution_option = 4; + + // Option to define build log streaming behavior to Google Cloud + // Storage. + LogStreamingOption log_streaming_option = 5; + + // Option to specify a `WorkerPool` for the build. User specifies the pool + // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". + // This is an experimental field. + string worker_pool = 7; + + // Option to specify the logging mode, which determines where the logs are + // stored. + LoggingMode logging = 11; + + // A list of global environment variable definitions that will exist for all + // build steps in this build. If a variable is defined in both globally and in + // a build step, the variable will use the build step value. + // + // The elements are of the form "KEY=VALUE" for the environment variable "KEY" + // being given the value "VALUE". + repeated string env = 12; + + // A list of global environment variables, which are encrypted using a Cloud + // Key Management Service crypto key. These values must be specified in the + // build's `Secret`. These variables will be available to all build steps + // in this build. + repeated string secret_env = 13; + + // Global list of volumes to mount for ALL build steps + // + // Each volume is created as an empty volume prior to starting the build + // process. Upon completion of the build, volumes and their contents are + // discarded. Global volume names and paths cannot conflict with the volumes + // defined a build step. + // + // Using a global volume in a build with only one step is not valid as + // it is indicative of a build request with an incorrect configuration. + repeated Volume volumes = 14; +} + +// Configuration for a WorkerPool to run the builds. +// +// Workers are machines that Cloud Build uses to run your builds. By default, +// all workers run in a project owned by Cloud Build. To have full control over +// the workers that execute your builds -- such as enabling them to access +// private resources on your private network -- you can request Cloud Build to +// run the workers in your own project by creating a custom workers pool. +message WorkerPool { + // Supported GCP regions to create the `WorkerPool`. + enum Region { + // no region + REGION_UNSPECIFIED = 0; + + // us-central1 region + US_CENTRAL1 = 1; + + // us-west1 region + US_WEST1 = 2; + + // us-east1 region + US_EAST1 = 3; + + // us-east4 region + US_EAST4 = 4; + } + + // `WorkerPool` status + enum Status { + // Status of the `WorkerPool` is unknown. + STATUS_UNSPECIFIED = 0; + + // `WorkerPool` is being created. + CREATING = 1; + + // `WorkerPool` is running. + RUNNING = 2; + + // `WorkerPool` is being deleting: cancelling builds and draining workers. + DELETING = 3; + + // `WorkerPool` is deleted. + DELETED = 4; + } + + // User-defined name of the `WorkerPool`. + string name = 14; + + // The project ID of the GCP project for which the `WorkerPool` is created. + string project_id = 2; + + // Output only. The service account used to manage the `WorkerPool`. The + // service account must have the Compute Instance Admin (Beta) permission at + // the project level. + string service_account_email = 3; + + // Total number of workers to be created across all requested regions. + int64 worker_count = 4; + + // Configuration to be used for a creating workers in the `WorkerPool`. + WorkerConfig worker_config = 16; + + // List of regions to create the `WorkerPool`. Regions can't be empty. + // If Cloud Build adds a new GCP region in the future, the existing + // `WorkerPool` will not be enabled in the new region automatically; + // you must add the new region to the `regions` field to enable the + // `WorkerPool` in that region. + repeated Region regions = 9; + + // Output only. Time at which the request to create the `WorkerPool` was + // received. + google.protobuf.Timestamp create_time = 11; + + // Output only. Time at which the request to update the `WorkerPool` was + // received. + google.protobuf.Timestamp update_time = 17; + + // Output only. Time at which the request to delete the `WorkerPool` was + // received. + google.protobuf.Timestamp delete_time = 12; + + // Output only. WorkerPool Status. + Status status = 13; +} + +// WorkerConfig defines the configuration to be used for a creating workers in +// the pool. +message WorkerConfig { + // Machine Type of the worker, such as n1-standard-1. + // See https://cloud.google.com/compute/docs/machine-types. + // If left blank, Cloud Build will use a standard unspecified machine to + // create the worker pool. + // `machine_type` is overridden if you specify a different machine type in + // `build_options`. In this case, the VM specified in the `build_options` + // will be created on demand at build time. For more information see + // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes + string machine_type = 1; + + // Size of the disk attached to the worker, in GB. + // See https://cloud.google.com/compute/docs/disks/ + // If `0` is specified, Cloud Build will use a standard disk size. + // `disk_size` is overridden if you specify a different disk size in + // `build_options`. In this case, a VM with a disk size specified in the + // `build_options` will be created on demand at build time. For more + // information see + // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions + int64 disk_size_gb = 2; + + // The network definition used to create the worker. + // If this section is left empty, the workers will be created in + // WorkerPool.project_id on the default network. + Network network = 3; + + // The tag applied to the worker, and the same tag used by the firewall rule. + // It is used to identify the Cloud Build workers among other VMs. + // The default value for tag is `worker`. + string tag = 4; +} + +// Network describes the GCP network used to create workers in. +message Network { + // Project id containing the defined network and subnetwork. For a peered VPC, + // this will be the same as the project_id in which the workers are created. + // For a shared VPC, this will be the project sharing the network with the + // project_id project in which workers will be created. For custom workers + // with no VPC, this will be the same as project_id. + string project_id = 1; + + // Network on which the workers are created. + // "default" network is used if empty. + string network = 2; + + // Subnetwork on which the workers are created. + // "default" subnetwork is used if empty. + string subnetwork = 3; +} + +// Request to create a new `WorkerPool`. +message CreateWorkerPoolRequest { + // ID of the parent project. + string parent = 1; + + // `WorkerPool` resource to create. + WorkerPool worker_pool = 2; +} + +// Request to get a `WorkerPool` with the specified name. +message GetWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to delete a `WorkerPool`. +message DeleteWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 1; +} + +// Request to update a `WorkerPool`. +message UpdateWorkerPoolRequest { + // The field will contain name of the resource requested, for example: + // "projects/project-1/workerPools/workerpool-name" + string name = 2; + + // `WorkerPool` resource to update. + WorkerPool worker_pool = 3; +} + +// Request to list `WorkerPool`s. +message ListWorkerPoolsRequest { + // ID of the parent project. + string parent = 1; +} + +// Response containing existing `WorkerPools`. +message ListWorkerPoolsResponse { + // `WorkerPools` for the project. + repeated WorkerPool worker_pools = 1; +} diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts new file mode 100644 index 000000000000..35b1ba618a42 --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -0,0 +1,10033 @@ +import * as $protobuf from "protobufjs"; +/** Namespace google. */ +export namespace google { + + /** Namespace devtools. */ + namespace devtools { + + /** Namespace cloudbuild. */ + namespace cloudbuild { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a CloudBuild */ + class CloudBuild extends $protobuf.rpc.Service { + + /** + * Constructs a new CloudBuild 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 CloudBuild 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): CloudBuild; + + /** + * Calls CreateBuild. + * @param request CreateBuildRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createBuild(request: google.devtools.cloudbuild.v1.ICreateBuildRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.CreateBuildCallback): void; + + /** + * Calls CreateBuild. + * @param request CreateBuildRequest message or plain object + * @returns Promise + */ + public createBuild(request: google.devtools.cloudbuild.v1.ICreateBuildRequest): Promise; + + /** + * Calls GetBuild. + * @param request GetBuildRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Build + */ + public getBuild(request: google.devtools.cloudbuild.v1.IGetBuildRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.GetBuildCallback): void; + + /** + * Calls GetBuild. + * @param request GetBuildRequest message or plain object + * @returns Promise + */ + public getBuild(request: google.devtools.cloudbuild.v1.IGetBuildRequest): Promise; + + /** + * Calls ListBuilds. + * @param request ListBuildsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBuildsResponse + */ + public listBuilds(request: google.devtools.cloudbuild.v1.IListBuildsRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.ListBuildsCallback): void; + + /** + * Calls ListBuilds. + * @param request ListBuildsRequest message or plain object + * @returns Promise + */ + public listBuilds(request: google.devtools.cloudbuild.v1.IListBuildsRequest): Promise; + + /** + * Calls CancelBuild. + * @param request CancelBuildRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Build + */ + public cancelBuild(request: google.devtools.cloudbuild.v1.ICancelBuildRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.CancelBuildCallback): void; + + /** + * Calls CancelBuild. + * @param request CancelBuildRequest message or plain object + * @returns Promise + */ + public cancelBuild(request: google.devtools.cloudbuild.v1.ICancelBuildRequest): Promise; + + /** + * Calls RetryBuild. + * @param request RetryBuildRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public retryBuild(request: google.devtools.cloudbuild.v1.IRetryBuildRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.RetryBuildCallback): void; + + /** + * Calls RetryBuild. + * @param request RetryBuildRequest message or plain object + * @returns Promise + */ + public retryBuild(request: google.devtools.cloudbuild.v1.IRetryBuildRequest): Promise; + + /** + * Calls CreateBuildTrigger. + * @param request CreateBuildTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BuildTrigger + */ + public createBuildTrigger(request: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTriggerCallback): void; + + /** + * Calls CreateBuildTrigger. + * @param request CreateBuildTriggerRequest message or plain object + * @returns Promise + */ + public createBuildTrigger(request: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest): Promise; + + /** + * Calls GetBuildTrigger. + * @param request GetBuildTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BuildTrigger + */ + public getBuildTrigger(request: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.GetBuildTriggerCallback): void; + + /** + * Calls GetBuildTrigger. + * @param request GetBuildTriggerRequest message or plain object + * @returns Promise + */ + public getBuildTrigger(request: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest): Promise; + + /** + * Calls ListBuildTriggers. + * @param request ListBuildTriggersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBuildTriggersResponse + */ + public listBuildTriggers(request: google.devtools.cloudbuild.v1.IListBuildTriggersRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggersCallback): void; + + /** + * Calls ListBuildTriggers. + * @param request ListBuildTriggersRequest message or plain object + * @returns Promise + */ + public listBuildTriggers(request: google.devtools.cloudbuild.v1.IListBuildTriggersRequest): Promise; + + /** + * Calls DeleteBuildTrigger. + * @param request DeleteBuildTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteBuildTrigger(request: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTriggerCallback): void; + + /** + * Calls DeleteBuildTrigger. + * @param request DeleteBuildTriggerRequest message or plain object + * @returns Promise + */ + public deleteBuildTrigger(request: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest): Promise; + + /** + * Calls UpdateBuildTrigger. + * @param request UpdateBuildTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BuildTrigger + */ + public updateBuildTrigger(request: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTriggerCallback): void; + + /** + * Calls UpdateBuildTrigger. + * @param request UpdateBuildTriggerRequest message or plain object + * @returns Promise + */ + public updateBuildTrigger(request: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest): Promise; + + /** + * Calls RunBuildTrigger. + * @param request RunBuildTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public runBuildTrigger(request: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.RunBuildTriggerCallback): void; + + /** + * Calls RunBuildTrigger. + * @param request RunBuildTriggerRequest message or plain object + * @returns Promise + */ + public runBuildTrigger(request: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest): Promise; + + /** + * Calls CreateWorkerPool. + * @param request CreateWorkerPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkerPool + */ + public createWorkerPool(request: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPoolCallback): void; + + /** + * Calls CreateWorkerPool. + * @param request CreateWorkerPoolRequest message or plain object + * @returns Promise + */ + public createWorkerPool(request: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest): Promise; + + /** + * Calls GetWorkerPool. + * @param request GetWorkerPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkerPool + */ + public getWorkerPool(request: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPoolCallback): void; + + /** + * Calls GetWorkerPool. + * @param request GetWorkerPoolRequest message or plain object + * @returns Promise + */ + public getWorkerPool(request: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest): Promise; + + /** + * Calls DeleteWorkerPool. + * @param request DeleteWorkerPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteWorkerPool(request: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPoolCallback): void; + + /** + * Calls DeleteWorkerPool. + * @param request DeleteWorkerPoolRequest message or plain object + * @returns Promise + */ + public deleteWorkerPool(request: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest): Promise; + + /** + * Calls UpdateWorkerPool. + * @param request UpdateWorkerPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and WorkerPool + */ + public updateWorkerPool(request: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPoolCallback): void; + + /** + * Calls UpdateWorkerPool. + * @param request UpdateWorkerPoolRequest message or plain object + * @returns Promise + */ + public updateWorkerPool(request: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest): Promise; + + /** + * Calls ListWorkerPools. + * @param request ListWorkerPoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkerPoolsResponse + */ + public listWorkerPools(request: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPoolsCallback): void; + + /** + * Calls ListWorkerPools. + * @param request ListWorkerPoolsRequest message or plain object + * @returns Promise + */ + public listWorkerPools(request: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest): Promise; + } + + namespace CloudBuild { + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuild}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuild}. + * @param error Error, if any + * @param [response] Build + */ + type GetBuildCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.Build) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuilds}. + * @param error Error, if any + * @param [response] ListBuildsResponse + */ + type ListBuildsCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ListBuildsResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#cancelBuild}. + * @param error Error, if any + * @param [response] Build + */ + type CancelBuildCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.Build) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#retryBuild}. + * @param error Error, if any + * @param [response] Operation + */ + type RetryBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. + * @param error Error, if any + * @param [response] BuildTrigger + */ + type CreateBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuildTrigger}. + * @param error Error, if any + * @param [response] BuildTrigger + */ + type GetBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuildTriggers}. + * @param error Error, if any + * @param [response] ListBuildTriggersResponse + */ + type ListBuildTriggersCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ListBuildTriggersResponse) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteBuildTrigger}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteBuildTriggerCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateBuildTrigger}. + * @param error Error, if any + * @param [response] BuildTrigger + */ + type UpdateBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#runBuildTrigger}. + * @param error Error, if any + * @param [response] Operation + */ + type RunBuildTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. + * @param error Error, if any + * @param [response] WorkerPool + */ + type CreateWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getWorkerPool}. + * @param error Error, if any + * @param [response] WorkerPool + */ + type GetWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteWorkerPool}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteWorkerPoolCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateWorkerPool}. + * @param error Error, if any + * @param [response] WorkerPool + */ + type UpdateWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listWorkerPools}. + * @param error Error, if any + * @param [response] ListWorkerPoolsResponse + */ + type ListWorkerPoolsCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ListWorkerPoolsResponse) => void; + } + + /** Properties of a RetryBuildRequest. */ + interface IRetryBuildRequest { + + /** RetryBuildRequest projectId */ + projectId?: (string|null); + + /** RetryBuildRequest id */ + id?: (string|null); + } + + /** Represents a RetryBuildRequest. */ + class RetryBuildRequest implements IRetryBuildRequest { + + /** + * Constructs a new RetryBuildRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IRetryBuildRequest); + + /** RetryBuildRequest projectId. */ + public projectId: string; + + /** RetryBuildRequest id. */ + public id: string; + + /** + * Creates a new RetryBuildRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryBuildRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IRetryBuildRequest): google.devtools.cloudbuild.v1.RetryBuildRequest; + + /** + * Encodes the specified RetryBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.RetryBuildRequest.verify|verify} messages. + * @param message RetryBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IRetryBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RetryBuildRequest.verify|verify} messages. + * @param message RetryBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IRetryBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryBuildRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.RetryBuildRequest; + + /** + * Decodes a RetryBuildRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.RetryBuildRequest; + + /** + * Verifies a RetryBuildRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RetryBuildRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryBuildRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.RetryBuildRequest; + + /** + * Creates a plain object from a RetryBuildRequest message. Also converts values to other types if specified. + * @param message RetryBuildRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.RetryBuildRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryBuildRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RunBuildTriggerRequest. */ + interface IRunBuildTriggerRequest { + + /** RunBuildTriggerRequest projectId */ + projectId?: (string|null); + + /** RunBuildTriggerRequest triggerId */ + triggerId?: (string|null); + + /** RunBuildTriggerRequest source */ + source?: (google.devtools.cloudbuild.v1.IRepoSource|null); + } + + /** Represents a RunBuildTriggerRequest. */ + class RunBuildTriggerRequest implements IRunBuildTriggerRequest { + + /** + * Constructs a new RunBuildTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest); + + /** RunBuildTriggerRequest projectId. */ + public projectId: string; + + /** RunBuildTriggerRequest triggerId. */ + public triggerId: string; + + /** RunBuildTriggerRequest source. */ + public source?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** + * Creates a new RunBuildTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunBuildTriggerRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest): google.devtools.cloudbuild.v1.RunBuildTriggerRequest; + + /** + * Encodes the specified RunBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.RunBuildTriggerRequest.verify|verify} messages. + * @param message RunBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RunBuildTriggerRequest.verify|verify} messages. + * @param message RunBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunBuildTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.RunBuildTriggerRequest; + + /** + * Decodes a RunBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.RunBuildTriggerRequest; + + /** + * Verifies a RunBuildTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunBuildTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.RunBuildTriggerRequest; + + /** + * Creates a plain object from a RunBuildTriggerRequest message. Also converts values to other types if specified. + * @param message RunBuildTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.RunBuildTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunBuildTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StorageSource. */ + interface IStorageSource { + + /** StorageSource bucket */ + bucket?: (string|null); + + /** StorageSource object */ + object?: (string|null); + + /** StorageSource generation */ + generation?: (number|Long|null); + } + + /** Represents a StorageSource. */ + class StorageSource implements IStorageSource { + + /** + * Constructs a new StorageSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IStorageSource); + + /** StorageSource bucket. */ + public bucket: string; + + /** StorageSource object. */ + public object: string; + + /** StorageSource generation. */ + public generation: (number|Long); + + /** + * Creates a new StorageSource instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageSource instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IStorageSource): google.devtools.cloudbuild.v1.StorageSource; + + /** + * Encodes the specified StorageSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSource.verify|verify} messages. + * @param message StorageSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IStorageSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSource.verify|verify} messages. + * @param message StorageSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IStorageSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.StorageSource; + + /** + * Decodes a StorageSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.StorageSource; + + /** + * Verifies a StorageSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.StorageSource; + + /** + * Creates a plain object from a StorageSource message. Also converts values to other types if specified. + * @param message StorageSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.StorageSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RepoSource. */ + interface IRepoSource { + + /** RepoSource projectId */ + projectId?: (string|null); + + /** RepoSource repoName */ + repoName?: (string|null); + + /** RepoSource branchName */ + branchName?: (string|null); + + /** RepoSource tagName */ + tagName?: (string|null); + + /** RepoSource commitSha */ + commitSha?: (string|null); + + /** RepoSource dir */ + dir?: (string|null); + } + + /** Represents a RepoSource. */ + class RepoSource implements IRepoSource { + + /** + * Constructs a new RepoSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IRepoSource); + + /** RepoSource projectId. */ + public projectId: string; + + /** RepoSource repoName. */ + public repoName: string; + + /** RepoSource branchName. */ + public branchName: string; + + /** RepoSource tagName. */ + public tagName: string; + + /** RepoSource commitSha. */ + public commitSha: string; + + /** RepoSource dir. */ + public dir: string; + + /** RepoSource revision. */ + public revision?: ("branchName"|"tagName"|"commitSha"); + + /** + * Creates a new RepoSource instance using the specified properties. + * @param [properties] Properties to set + * @returns RepoSource instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IRepoSource): google.devtools.cloudbuild.v1.RepoSource; + + /** + * Encodes the specified RepoSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.RepoSource.verify|verify} messages. + * @param message RepoSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IRepoSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RepoSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RepoSource.verify|verify} messages. + * @param message RepoSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IRepoSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RepoSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RepoSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.RepoSource; + + /** + * Decodes a RepoSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RepoSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.RepoSource; + + /** + * Verifies a RepoSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RepoSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RepoSource + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.RepoSource; + + /** + * Creates a plain object from a RepoSource message. Also converts values to other types if specified. + * @param message RepoSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.RepoSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RepoSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Source. */ + interface ISource { + + /** Source storageSource */ + storageSource?: (google.devtools.cloudbuild.v1.IStorageSource|null); + + /** Source repoSource */ + repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + } + + /** Represents a Source. */ + class Source implements ISource { + + /** + * Constructs a new Source. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ISource); + + /** Source storageSource. */ + public storageSource?: (google.devtools.cloudbuild.v1.IStorageSource|null); + + /** Source repoSource. */ + public repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** Source source. */ + public source?: ("storageSource"|"repoSource"); + + /** + * Creates a new Source instance using the specified properties. + * @param [properties] Properties to set + * @returns Source instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ISource): google.devtools.cloudbuild.v1.Source; + + /** + * Encodes the specified Source message. Does not implicitly {@link google.devtools.cloudbuild.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Source.verify|verify} messages. + * @param message Source message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ISource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Source message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Source; + + /** + * Decodes a Source message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Source; + + /** + * Verifies a Source message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Source message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Source + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Source; + + /** + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @param message Source + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Source, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Source to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuiltImage. */ + interface IBuiltImage { + + /** BuiltImage name */ + name?: (string|null); + + /** BuiltImage digest */ + digest?: (string|null); + + /** BuiltImage pushTiming */ + pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents a BuiltImage. */ + class BuiltImage implements IBuiltImage { + + /** + * Constructs a new BuiltImage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuiltImage); + + /** BuiltImage name. */ + public name: string; + + /** BuiltImage digest. */ + public digest: string; + + /** BuiltImage pushTiming. */ + public pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new BuiltImage instance using the specified properties. + * @param [properties] Properties to set + * @returns BuiltImage instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuiltImage): google.devtools.cloudbuild.v1.BuiltImage; + + /** + * Encodes the specified BuiltImage message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuiltImage.verify|verify} messages. + * @param message BuiltImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuiltImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuiltImage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuiltImage.verify|verify} messages. + * @param message BuiltImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuiltImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuiltImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuiltImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuiltImage; + + /** + * Decodes a BuiltImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuiltImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuiltImage; + + /** + * Verifies a BuiltImage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuiltImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuiltImage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuiltImage; + + /** + * Creates a plain object from a BuiltImage message. Also converts values to other types if specified. + * @param message BuiltImage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuiltImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuiltImage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuildStep. */ + interface IBuildStep { + + /** BuildStep name */ + name?: (string|null); + + /** BuildStep env */ + env?: (string[]|null); + + /** BuildStep args */ + args?: (string[]|null); + + /** BuildStep dir */ + dir?: (string|null); + + /** BuildStep id */ + id?: (string|null); + + /** BuildStep waitFor */ + waitFor?: (string[]|null); + + /** BuildStep entrypoint */ + entrypoint?: (string|null); + + /** BuildStep secretEnv */ + secretEnv?: (string[]|null); + + /** BuildStep volumes */ + volumes?: (google.devtools.cloudbuild.v1.IVolume[]|null); + + /** BuildStep timing */ + timing?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** BuildStep pullTiming */ + pullTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** BuildStep timeout */ + timeout?: (google.protobuf.IDuration|null); + + /** BuildStep status */ + status?: (google.devtools.cloudbuild.v1.Build.Status|null); + } + + /** Represents a BuildStep. */ + class BuildStep implements IBuildStep { + + /** + * Constructs a new BuildStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuildStep); + + /** BuildStep name. */ + public name: string; + + /** BuildStep env. */ + public env: string[]; + + /** BuildStep args. */ + public args: string[]; + + /** BuildStep dir. */ + public dir: string; + + /** BuildStep id. */ + public id: string; + + /** BuildStep waitFor. */ + public waitFor: string[]; + + /** BuildStep entrypoint. */ + public entrypoint: string; + + /** BuildStep secretEnv. */ + public secretEnv: string[]; + + /** BuildStep volumes. */ + public volumes: google.devtools.cloudbuild.v1.IVolume[]; + + /** BuildStep timing. */ + public timing?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** BuildStep pullTiming. */ + public pullTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** BuildStep timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** BuildStep status. */ + public status: google.devtools.cloudbuild.v1.Build.Status; + + /** + * Creates a new BuildStep instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildStep instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuildStep): google.devtools.cloudbuild.v1.BuildStep; + + /** + * Encodes the specified BuildStep message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * @param message BuildStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuildStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildStep message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * @param message BuildStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuildStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildStep; + + /** + * Decodes a BuildStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildStep; + + /** + * Verifies a BuildStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildStep + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildStep; + + /** + * Creates a plain object from a BuildStep message. Also converts values to other types if specified. + * @param message BuildStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Volume. */ + interface IVolume { + + /** Volume name */ + name?: (string|null); + + /** Volume path */ + path?: (string|null); + } + + /** Represents a Volume. */ + class Volume implements IVolume { + + /** + * Constructs a new Volume. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IVolume); + + /** Volume name. */ + public name: string; + + /** Volume path. */ + public path: string; + + /** + * Creates a new Volume instance using the specified properties. + * @param [properties] Properties to set + * @returns Volume instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IVolume): google.devtools.cloudbuild.v1.Volume; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * @param message Volume message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IVolume, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Volume; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Volume; + + /** + * Verifies a Volume message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Volume + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Volume; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @param message Volume + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Volume, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Volume to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Results. */ + interface IResults { + + /** Results images */ + images?: (google.devtools.cloudbuild.v1.IBuiltImage[]|null); + + /** Results buildStepImages */ + buildStepImages?: (string[]|null); + + /** Results artifactManifest */ + artifactManifest?: (string|null); + + /** Results numArtifacts */ + numArtifacts?: (number|Long|null); + + /** Results buildStepOutputs */ + buildStepOutputs?: (Uint8Array[]|null); + + /** Results artifactTiming */ + artifactTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents a Results. */ + class Results implements IResults { + + /** + * Constructs a new Results. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IResults); + + /** Results images. */ + public images: google.devtools.cloudbuild.v1.IBuiltImage[]; + + /** Results buildStepImages. */ + public buildStepImages: string[]; + + /** Results artifactManifest. */ + public artifactManifest: string; + + /** Results numArtifacts. */ + public numArtifacts: (number|Long); + + /** Results buildStepOutputs. */ + public buildStepOutputs: Uint8Array[]; + + /** Results artifactTiming. */ + public artifactTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new Results instance using the specified properties. + * @param [properties] Properties to set + * @returns Results instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IResults): google.devtools.cloudbuild.v1.Results; + + /** + * Encodes the specified Results message. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @param message Results message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Results message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @param message Results message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IResults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Results message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Results; + + /** + * Decodes a Results message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Results; + + /** + * Verifies a Results message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Results message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Results + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Results; + + /** + * Creates a plain object from a Results message. Also converts values to other types if specified. + * @param message Results + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Results, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Results to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ArtifactResult. */ + interface IArtifactResult { + + /** ArtifactResult location */ + location?: (string|null); + + /** ArtifactResult fileHash */ + fileHash?: (google.devtools.cloudbuild.v1.IFileHashes[]|null); + } + + /** Represents an ArtifactResult. */ + class ArtifactResult implements IArtifactResult { + + /** + * Constructs a new ArtifactResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IArtifactResult); + + /** ArtifactResult location. */ + public location: string; + + /** ArtifactResult fileHash. */ + public fileHash: google.devtools.cloudbuild.v1.IFileHashes[]; + + /** + * Creates a new ArtifactResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ArtifactResult instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IArtifactResult): google.devtools.cloudbuild.v1.ArtifactResult; + + /** + * Encodes the specified ArtifactResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * @param message ArtifactResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IArtifactResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArtifactResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * @param message ArtifactResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IArtifactResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArtifactResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArtifactResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ArtifactResult; + + /** + * Decodes an ArtifactResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArtifactResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ArtifactResult; + + /** + * Verifies an ArtifactResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArtifactResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArtifactResult + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ArtifactResult; + + /** + * Creates a plain object from an ArtifactResult message. Also converts values to other types if specified. + * @param message ArtifactResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ArtifactResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArtifactResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Build. */ + interface IBuild { + + /** Build id */ + id?: (string|null); + + /** Build projectId */ + projectId?: (string|null); + + /** Build status */ + status?: (google.devtools.cloudbuild.v1.Build.Status|null); + + /** Build statusDetail */ + statusDetail?: (string|null); + + /** Build source */ + source?: (google.devtools.cloudbuild.v1.ISource|null); + + /** Build steps */ + steps?: (google.devtools.cloudbuild.v1.IBuildStep[]|null); + + /** Build results */ + results?: (google.devtools.cloudbuild.v1.IResults|null); + + /** Build createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Build startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Build finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** Build timeout */ + timeout?: (google.protobuf.IDuration|null); + + /** Build images */ + images?: (string[]|null); + + /** Build artifacts */ + artifacts?: (google.devtools.cloudbuild.v1.IArtifacts|null); + + /** Build logsBucket */ + logsBucket?: (string|null); + + /** Build sourceProvenance */ + sourceProvenance?: (google.devtools.cloudbuild.v1.ISourceProvenance|null); + + /** Build buildTriggerId */ + buildTriggerId?: (string|null); + + /** Build options */ + options?: (google.devtools.cloudbuild.v1.IBuildOptions|null); + + /** Build logUrl */ + logUrl?: (string|null); + + /** Build substitutions */ + substitutions?: ({ [k: string]: string }|null); + + /** Build tags */ + tags?: (string[]|null); + + /** Build secrets */ + secrets?: (google.devtools.cloudbuild.v1.ISecret[]|null); + + /** Build timing */ + timing?: ({ [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }|null); + } + + /** Represents a Build. */ + class Build implements IBuild { + + /** + * Constructs a new Build. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuild); + + /** Build id. */ + public id: string; + + /** Build projectId. */ + public projectId: string; + + /** Build status. */ + public status: google.devtools.cloudbuild.v1.Build.Status; + + /** Build statusDetail. */ + public statusDetail: string; + + /** Build source. */ + public source?: (google.devtools.cloudbuild.v1.ISource|null); + + /** Build steps. */ + public steps: google.devtools.cloudbuild.v1.IBuildStep[]; + + /** Build results. */ + public results?: (google.devtools.cloudbuild.v1.IResults|null); + + /** Build createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Build startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Build finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** Build timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** Build images. */ + public images: string[]; + + /** Build artifacts. */ + public artifacts?: (google.devtools.cloudbuild.v1.IArtifacts|null); + + /** Build logsBucket. */ + public logsBucket: string; + + /** Build sourceProvenance. */ + public sourceProvenance?: (google.devtools.cloudbuild.v1.ISourceProvenance|null); + + /** Build buildTriggerId. */ + public buildTriggerId: string; + + /** Build options. */ + public options?: (google.devtools.cloudbuild.v1.IBuildOptions|null); + + /** Build logUrl. */ + public logUrl: string; + + /** Build substitutions. */ + public substitutions: { [k: string]: string }; + + /** Build tags. */ + public tags: string[]; + + /** Build secrets. */ + public secrets: google.devtools.cloudbuild.v1.ISecret[]; + + /** Build timing. */ + public timing: { [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }; + + /** + * Creates a new Build instance using the specified properties. + * @param [properties] Properties to set + * @returns Build instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuild): google.devtools.cloudbuild.v1.Build; + + /** + * Encodes the specified Build message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @param message Build message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuild, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Build message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @param message Build message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuild, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Build message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Build; + + /** + * Decodes a Build message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Build; + + /** + * Verifies a Build message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Build message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Build + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Build; + + /** + * Creates a plain object from a Build message. Also converts values to other types if specified. + * @param message Build + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Build, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Build to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Build { + + /** Status enum. */ + enum Status { + STATUS_UNKNOWN = 0, + QUEUED = 1, + WORKING = 2, + SUCCESS = 3, + FAILURE = 4, + INTERNAL_ERROR = 5, + TIMEOUT = 6, + CANCELLED = 7 + } + } + + /** Properties of an Artifacts. */ + interface IArtifacts { + + /** Artifacts images */ + images?: (string[]|null); + + /** Artifacts objects */ + objects?: (google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null); + } + + /** Represents an Artifacts. */ + class Artifacts implements IArtifacts { + + /** + * Constructs a new Artifacts. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IArtifacts); + + /** Artifacts images. */ + public images: string[]; + + /** Artifacts objects. */ + public objects?: (google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null); + + /** + * Creates a new Artifacts instance using the specified properties. + * @param [properties] Properties to set + * @returns Artifacts instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IArtifacts): google.devtools.cloudbuild.v1.Artifacts; + + /** + * Encodes the specified Artifacts message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @param message Artifacts message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Artifacts message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @param message Artifacts message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IArtifacts, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Artifacts message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Artifacts; + + /** + * Decodes an Artifacts message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Artifacts; + + /** + * Verifies an Artifacts message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Artifacts message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Artifacts + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Artifacts; + + /** + * Creates a plain object from an Artifacts message. Also converts values to other types if specified. + * @param message Artifacts + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Artifacts, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Artifacts to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Artifacts { + + /** Properties of an ArtifactObjects. */ + interface IArtifactObjects { + + /** ArtifactObjects location */ + location?: (string|null); + + /** ArtifactObjects paths */ + paths?: (string[]|null); + + /** ArtifactObjects timing */ + timing?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents an ArtifactObjects. */ + class ArtifactObjects implements IArtifactObjects { + + /** + * Constructs a new ArtifactObjects. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects); + + /** ArtifactObjects location. */ + public location: string; + + /** ArtifactObjects paths. */ + public paths: string[]; + + /** ArtifactObjects timing. */ + public timing?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new ArtifactObjects instance using the specified properties. + * @param [properties] Properties to set + * @returns ArtifactObjects instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects): google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects; + + /** + * Encodes the specified ArtifactObjects message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * @param message ArtifactObjects message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArtifactObjects message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * @param message ArtifactObjects message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArtifactObjects message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArtifactObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects; + + /** + * Decodes an ArtifactObjects message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArtifactObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects; + + /** + * Verifies an ArtifactObjects message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArtifactObjects message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArtifactObjects + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects; + + /** + * Creates a plain object from an ArtifactObjects message. Also converts values to other types if specified. + * @param message ArtifactObjects + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArtifactObjects to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a TimeSpan. */ + interface ITimeSpan { + + /** TimeSpan startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeSpan endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeSpan. */ + class TimeSpan implements ITimeSpan { + + /** + * Constructs a new TimeSpan. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ITimeSpan); + + /** TimeSpan startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeSpan endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TimeSpan instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSpan instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ITimeSpan): google.devtools.cloudbuild.v1.TimeSpan; + + /** + * Encodes the specified TimeSpan message. Does not implicitly {@link google.devtools.cloudbuild.v1.TimeSpan.verify|verify} messages. + * @param message TimeSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ITimeSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSpan message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.TimeSpan.verify|verify} messages. + * @param message TimeSpan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ITimeSpan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSpan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.TimeSpan; + + /** + * Decodes a TimeSpan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.TimeSpan; + + /** + * Verifies a TimeSpan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeSpan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSpan + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.TimeSpan; + + /** + * Creates a plain object from a TimeSpan message. Also converts values to other types if specified. + * @param message TimeSpan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.TimeSpan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSpan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuildOperationMetadata. */ + interface IBuildOperationMetadata { + + /** BuildOperationMetadata build */ + build?: (google.devtools.cloudbuild.v1.IBuild|null); + } + + /** Represents a BuildOperationMetadata. */ + class BuildOperationMetadata implements IBuildOperationMetadata { + + /** + * Constructs a new BuildOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuildOperationMetadata); + + /** BuildOperationMetadata build. */ + public build?: (google.devtools.cloudbuild.v1.IBuild|null); + + /** + * Creates a new BuildOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildOperationMetadata instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuildOperationMetadata): google.devtools.cloudbuild.v1.BuildOperationMetadata; + + /** + * Encodes the specified BuildOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOperationMetadata.verify|verify} messages. + * @param message BuildOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuildOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOperationMetadata.verify|verify} messages. + * @param message BuildOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuildOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildOperationMetadata; + + /** + * Decodes a BuildOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildOperationMetadata; + + /** + * Verifies a BuildOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildOperationMetadata; + + /** + * Creates a plain object from a BuildOperationMetadata message. Also converts values to other types if specified. + * @param message BuildOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SourceProvenance. */ + interface ISourceProvenance { + + /** SourceProvenance resolvedStorageSource */ + resolvedStorageSource?: (google.devtools.cloudbuild.v1.IStorageSource|null); + + /** SourceProvenance resolvedRepoSource */ + resolvedRepoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** SourceProvenance fileHashes */ + fileHashes?: ({ [k: string]: google.devtools.cloudbuild.v1.IFileHashes }|null); + } + + /** Represents a SourceProvenance. */ + class SourceProvenance implements ISourceProvenance { + + /** + * Constructs a new SourceProvenance. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ISourceProvenance); + + /** SourceProvenance resolvedStorageSource. */ + public resolvedStorageSource?: (google.devtools.cloudbuild.v1.IStorageSource|null); + + /** SourceProvenance resolvedRepoSource. */ + public resolvedRepoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** SourceProvenance fileHashes. */ + public fileHashes: { [k: string]: google.devtools.cloudbuild.v1.IFileHashes }; + + /** + * Creates a new SourceProvenance instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceProvenance instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ISourceProvenance): google.devtools.cloudbuild.v1.SourceProvenance; + + /** + * Encodes the specified SourceProvenance message. Does not implicitly {@link google.devtools.cloudbuild.v1.SourceProvenance.verify|verify} messages. + * @param message SourceProvenance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ISourceProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceProvenance message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.SourceProvenance.verify|verify} messages. + * @param message SourceProvenance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ISourceProvenance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceProvenance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceProvenance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.SourceProvenance; + + /** + * Decodes a SourceProvenance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceProvenance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.SourceProvenance; + + /** + * Verifies a SourceProvenance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceProvenance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceProvenance + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.SourceProvenance; + + /** + * Creates a plain object from a SourceProvenance message. Also converts values to other types if specified. + * @param message SourceProvenance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.SourceProvenance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceProvenance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileHashes. */ + interface IFileHashes { + + /** FileHashes fileHash */ + fileHash?: (google.devtools.cloudbuild.v1.IHash[]|null); + } + + /** Represents a FileHashes. */ + class FileHashes implements IFileHashes { + + /** + * Constructs a new FileHashes. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IFileHashes); + + /** FileHashes fileHash. */ + public fileHash: google.devtools.cloudbuild.v1.IHash[]; + + /** + * Creates a new FileHashes instance using the specified properties. + * @param [properties] Properties to set + * @returns FileHashes instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IFileHashes): google.devtools.cloudbuild.v1.FileHashes; + + /** + * Encodes the specified FileHashes message. Does not implicitly {@link google.devtools.cloudbuild.v1.FileHashes.verify|verify} messages. + * @param message FileHashes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.FileHashes.verify|verify} messages. + * @param message FileHashes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IFileHashes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileHashes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.FileHashes; + + /** + * Decodes a FileHashes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.FileHashes; + + /** + * Verifies a FileHashes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileHashes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileHashes + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.FileHashes; + + /** + * Creates a plain object from a FileHashes message. Also converts values to other types if specified. + * @param message FileHashes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.FileHashes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileHashes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Hash. */ + interface IHash { + + /** Hash type */ + type?: (google.devtools.cloudbuild.v1.Hash.HashType|null); + + /** Hash value */ + value?: (Uint8Array|null); + } + + /** Represents a Hash. */ + class Hash implements IHash { + + /** + * Constructs a new Hash. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IHash); + + /** Hash type. */ + public type: google.devtools.cloudbuild.v1.Hash.HashType; + + /** Hash value. */ + public value: Uint8Array; + + /** + * Creates a new Hash instance using the specified properties. + * @param [properties] Properties to set + * @returns Hash instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IHash): google.devtools.cloudbuild.v1.Hash; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.cloudbuild.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Hash.verify|verify} messages. + * @param message Hash message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IHash, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Hash; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Hash; + + /** + * Verifies a Hash message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Hash + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Hash; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @param message Hash + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Hash, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Hash to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Hash { + + /** HashType enum. */ + enum HashType { + NONE = 0, + SHA256 = 1, + MD5 = 2 + } + } + + /** Properties of a Secret. */ + interface ISecret { + + /** Secret kmsKeyName */ + kmsKeyName?: (string|null); + + /** Secret secretEnv */ + secretEnv?: ({ [k: string]: Uint8Array }|null); + } + + /** Represents a Secret. */ + class Secret implements ISecret { + + /** + * Constructs a new Secret. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ISecret); + + /** Secret kmsKeyName. */ + public kmsKeyName: string; + + /** Secret secretEnv. */ + public secretEnv: { [k: string]: Uint8Array }; + + /** + * Creates a new Secret instance using the specified properties. + * @param [properties] Properties to set + * @returns Secret instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ISecret): google.devtools.cloudbuild.v1.Secret; + + /** + * Encodes the specified Secret message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * @param message Secret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ISecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Secret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Secret; + + /** + * Decodes a Secret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Secret; + + /** + * Verifies a Secret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Secret + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Secret; + + /** + * Creates a plain object from a Secret message. Also converts values to other types if specified. + * @param message Secret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Secret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Secret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateBuildRequest. */ + interface ICreateBuildRequest { + + /** CreateBuildRequest projectId */ + projectId?: (string|null); + + /** CreateBuildRequest build */ + build?: (google.devtools.cloudbuild.v1.IBuild|null); + } + + /** Represents a CreateBuildRequest. */ + class CreateBuildRequest implements ICreateBuildRequest { + + /** + * Constructs a new CreateBuildRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ICreateBuildRequest); + + /** CreateBuildRequest projectId. */ + public projectId: string; + + /** CreateBuildRequest build. */ + public build?: (google.devtools.cloudbuild.v1.IBuild|null); + + /** + * Creates a new CreateBuildRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBuildRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ICreateBuildRequest): google.devtools.cloudbuild.v1.CreateBuildRequest; + + /** + * Encodes the specified CreateBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * @param message CreateBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ICreateBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * @param message CreateBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ICreateBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBuildRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.CreateBuildRequest; + + /** + * Decodes a CreateBuildRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.CreateBuildRequest; + + /** + * Verifies a CreateBuildRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBuildRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBuildRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.CreateBuildRequest; + + /** + * Creates a plain object from a CreateBuildRequest message. Also converts values to other types if specified. + * @param message CreateBuildRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.CreateBuildRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBuildRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetBuildRequest. */ + interface IGetBuildRequest { + + /** GetBuildRequest projectId */ + projectId?: (string|null); + + /** GetBuildRequest id */ + id?: (string|null); + } + + /** Represents a GetBuildRequest. */ + class GetBuildRequest implements IGetBuildRequest { + + /** + * Constructs a new GetBuildRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IGetBuildRequest); + + /** GetBuildRequest projectId. */ + public projectId: string; + + /** GetBuildRequest id. */ + public id: string; + + /** + * Creates a new GetBuildRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBuildRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IGetBuildRequest): google.devtools.cloudbuild.v1.GetBuildRequest; + + /** + * Encodes the specified GetBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * @param message GetBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IGetBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * @param message GetBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IGetBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBuildRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.GetBuildRequest; + + /** + * Decodes a GetBuildRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.GetBuildRequest; + + /** + * Verifies a GetBuildRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBuildRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBuildRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.GetBuildRequest; + + /** + * Creates a plain object from a GetBuildRequest message. Also converts values to other types if specified. + * @param message GetBuildRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.GetBuildRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBuildRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListBuildsRequest. */ + interface IListBuildsRequest { + + /** ListBuildsRequest projectId */ + projectId?: (string|null); + + /** ListBuildsRequest pageSize */ + pageSize?: (number|null); + + /** ListBuildsRequest pageToken */ + pageToken?: (string|null); + + /** ListBuildsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListBuildsRequest. */ + class ListBuildsRequest implements IListBuildsRequest { + + /** + * Constructs a new ListBuildsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListBuildsRequest); + + /** ListBuildsRequest projectId. */ + public projectId: string; + + /** ListBuildsRequest pageSize. */ + public pageSize: number; + + /** ListBuildsRequest pageToken. */ + public pageToken: string; + + /** ListBuildsRequest filter. */ + public filter: string; + + /** + * Creates a new ListBuildsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBuildsRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListBuildsRequest): google.devtools.cloudbuild.v1.ListBuildsRequest; + + /** + * Encodes the specified ListBuildsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * @param message ListBuildsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListBuildsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBuildsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * @param message ListBuildsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListBuildsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBuildsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBuildsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListBuildsRequest; + + /** + * Decodes a ListBuildsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBuildsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListBuildsRequest; + + /** + * Verifies a ListBuildsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBuildsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBuildsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListBuildsRequest; + + /** + * Creates a plain object from a ListBuildsRequest message. Also converts values to other types if specified. + * @param message ListBuildsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListBuildsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBuildsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListBuildsResponse. */ + interface IListBuildsResponse { + + /** ListBuildsResponse builds */ + builds?: (google.devtools.cloudbuild.v1.IBuild[]|null); + + /** ListBuildsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBuildsResponse. */ + class ListBuildsResponse implements IListBuildsResponse { + + /** + * Constructs a new ListBuildsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListBuildsResponse); + + /** ListBuildsResponse builds. */ + public builds: google.devtools.cloudbuild.v1.IBuild[]; + + /** ListBuildsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBuildsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBuildsResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListBuildsResponse): google.devtools.cloudbuild.v1.ListBuildsResponse; + + /** + * Encodes the specified ListBuildsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * @param message ListBuildsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListBuildsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBuildsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * @param message ListBuildsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListBuildsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBuildsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBuildsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListBuildsResponse; + + /** + * Decodes a ListBuildsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBuildsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListBuildsResponse; + + /** + * Verifies a ListBuildsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBuildsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBuildsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListBuildsResponse; + + /** + * Creates a plain object from a ListBuildsResponse message. Also converts values to other types if specified. + * @param message ListBuildsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListBuildsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBuildsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelBuildRequest. */ + interface ICancelBuildRequest { + + /** CancelBuildRequest projectId */ + projectId?: (string|null); + + /** CancelBuildRequest id */ + id?: (string|null); + } + + /** Represents a CancelBuildRequest. */ + class CancelBuildRequest implements ICancelBuildRequest { + + /** + * Constructs a new CancelBuildRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ICancelBuildRequest); + + /** CancelBuildRequest projectId. */ + public projectId: string; + + /** CancelBuildRequest id. */ + public id: string; + + /** + * Creates a new CancelBuildRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelBuildRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ICancelBuildRequest): google.devtools.cloudbuild.v1.CancelBuildRequest; + + /** + * Encodes the specified CancelBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * @param message CancelBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ICancelBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * @param message CancelBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ICancelBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelBuildRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.CancelBuildRequest; + + /** + * Decodes a CancelBuildRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.CancelBuildRequest; + + /** + * Verifies a CancelBuildRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelBuildRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelBuildRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.CancelBuildRequest; + + /** + * Creates a plain object from a CancelBuildRequest message. Also converts values to other types if specified. + * @param message CancelBuildRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.CancelBuildRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelBuildRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuildTrigger. */ + interface IBuildTrigger { + + /** BuildTrigger id */ + id?: (string|null); + + /** BuildTrigger description */ + description?: (string|null); + + /** BuildTrigger name */ + name?: (string|null); + + /** BuildTrigger tags */ + tags?: (string[]|null); + + /** BuildTrigger triggerTemplate */ + triggerTemplate?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** BuildTrigger github */ + github?: (google.devtools.cloudbuild.v1.IGitHubEventsConfig|null); + + /** BuildTrigger build */ + build?: (google.devtools.cloudbuild.v1.IBuild|null); + + /** BuildTrigger filename */ + filename?: (string|null); + + /** BuildTrigger createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BuildTrigger disabled */ + disabled?: (boolean|null); + + /** BuildTrigger substitutions */ + substitutions?: ({ [k: string]: string }|null); + + /** BuildTrigger ignoredFiles */ + ignoredFiles?: (string[]|null); + + /** BuildTrigger includedFiles */ + includedFiles?: (string[]|null); + } + + /** Represents a BuildTrigger. */ + class BuildTrigger implements IBuildTrigger { + + /** + * Constructs a new BuildTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuildTrigger); + + /** BuildTrigger id. */ + public id: string; + + /** BuildTrigger description. */ + public description: string; + + /** BuildTrigger name. */ + public name: string; + + /** BuildTrigger tags. */ + public tags: string[]; + + /** BuildTrigger triggerTemplate. */ + public triggerTemplate?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** BuildTrigger github. */ + public github?: (google.devtools.cloudbuild.v1.IGitHubEventsConfig|null); + + /** BuildTrigger build. */ + public build?: (google.devtools.cloudbuild.v1.IBuild|null); + + /** BuildTrigger filename. */ + public filename: string; + + /** BuildTrigger createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BuildTrigger disabled. */ + public disabled: boolean; + + /** BuildTrigger substitutions. */ + public substitutions: { [k: string]: string }; + + /** BuildTrigger ignoredFiles. */ + public ignoredFiles: string[]; + + /** BuildTrigger includedFiles. */ + public includedFiles: string[]; + + /** BuildTrigger buildTemplate. */ + public buildTemplate?: ("build"|"filename"); + + /** + * Creates a new BuildTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildTrigger instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuildTrigger): google.devtools.cloudbuild.v1.BuildTrigger; + + /** + * Encodes the specified BuildTrigger message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * @param message BuildTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuildTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildTrigger message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * @param message BuildTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuildTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildTrigger; + + /** + * Decodes a BuildTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildTrigger; + + /** + * Verifies a BuildTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildTrigger + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildTrigger; + + /** + * Creates a plain object from a BuildTrigger message. Also converts values to other types if specified. + * @param message BuildTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GitHubEventsConfig. */ + interface IGitHubEventsConfig { + + /** GitHubEventsConfig installationId */ + installationId?: (number|Long|null); + + /** GitHubEventsConfig owner */ + owner?: (string|null); + + /** GitHubEventsConfig name */ + name?: (string|null); + + /** GitHubEventsConfig pullRequest */ + pullRequest?: (google.devtools.cloudbuild.v1.IPullRequestFilter|null); + + /** GitHubEventsConfig push */ + push?: (google.devtools.cloudbuild.v1.IPushFilter|null); + } + + /** Represents a GitHubEventsConfig. */ + class GitHubEventsConfig implements IGitHubEventsConfig { + + /** + * Constructs a new GitHubEventsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IGitHubEventsConfig); + + /** GitHubEventsConfig installationId. */ + public installationId: (number|Long); + + /** GitHubEventsConfig owner. */ + public owner: string; + + /** GitHubEventsConfig name. */ + public name: string; + + /** GitHubEventsConfig pullRequest. */ + public pullRequest?: (google.devtools.cloudbuild.v1.IPullRequestFilter|null); + + /** GitHubEventsConfig push. */ + public push?: (google.devtools.cloudbuild.v1.IPushFilter|null); + + /** GitHubEventsConfig event. */ + public event?: ("pullRequest"|"push"); + + /** + * Creates a new GitHubEventsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GitHubEventsConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IGitHubEventsConfig): google.devtools.cloudbuild.v1.GitHubEventsConfig; + + /** + * Encodes the specified GitHubEventsConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * @param message GitHubEventsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IGitHubEventsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GitHubEventsConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * @param message GitHubEventsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IGitHubEventsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GitHubEventsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GitHubEventsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.GitHubEventsConfig; + + /** + * Decodes a GitHubEventsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GitHubEventsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.GitHubEventsConfig; + + /** + * Verifies a GitHubEventsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GitHubEventsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GitHubEventsConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.GitHubEventsConfig; + + /** + * Creates a plain object from a GitHubEventsConfig message. Also converts values to other types if specified. + * @param message GitHubEventsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.GitHubEventsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GitHubEventsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PullRequestFilter. */ + interface IPullRequestFilter { + + /** PullRequestFilter branch */ + branch?: (string|null); + + /** PullRequestFilter commentControl */ + commentControl?: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null); + } + + /** Represents a PullRequestFilter. */ + class PullRequestFilter implements IPullRequestFilter { + + /** + * Constructs a new PullRequestFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IPullRequestFilter); + + /** PullRequestFilter branch. */ + public branch: string; + + /** PullRequestFilter commentControl. */ + public commentControl: google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl; + + /** PullRequestFilter gitRef. */ + public gitRef?: "branch"; + + /** + * Creates a new PullRequestFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PullRequestFilter instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IPullRequestFilter): google.devtools.cloudbuild.v1.PullRequestFilter; + + /** + * Encodes the specified PullRequestFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * @param message PullRequestFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IPullRequestFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PullRequestFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * @param message PullRequestFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IPullRequestFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PullRequestFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PullRequestFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PullRequestFilter; + + /** + * Decodes a PullRequestFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PullRequestFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PullRequestFilter; + + /** + * Verifies a PullRequestFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PullRequestFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PullRequestFilter + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PullRequestFilter; + + /** + * Creates a plain object from a PullRequestFilter message. Also converts values to other types if specified. + * @param message PullRequestFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PullRequestFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PullRequestFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PullRequestFilter { + + /** CommentControl enum. */ + enum CommentControl { + COMMENTS_DISABLED = 0, + COMMENTS_ENABLED = 1 + } + } + + /** Properties of a PushFilter. */ + interface IPushFilter { + + /** PushFilter branch */ + branch?: (string|null); + + /** PushFilter tag */ + tag?: (string|null); + } + + /** Represents a PushFilter. */ + class PushFilter implements IPushFilter { + + /** + * Constructs a new PushFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IPushFilter); + + /** PushFilter branch. */ + public branch: string; + + /** PushFilter tag. */ + public tag: string; + + /** PushFilter gitRef. */ + public gitRef?: ("branch"|"tag"); + + /** + * Creates a new PushFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns PushFilter instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IPushFilter): google.devtools.cloudbuild.v1.PushFilter; + + /** + * Encodes the specified PushFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. + * @param message PushFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IPushFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PushFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. + * @param message PushFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IPushFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PushFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PushFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PushFilter; + + /** + * Decodes a PushFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PushFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PushFilter; + + /** + * Verifies a PushFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PushFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PushFilter + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PushFilter; + + /** + * Creates a plain object from a PushFilter message. Also converts values to other types if specified. + * @param message PushFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PushFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PushFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateBuildTriggerRequest. */ + interface ICreateBuildTriggerRequest { + + /** CreateBuildTriggerRequest projectId */ + projectId?: (string|null); + + /** CreateBuildTriggerRequest trigger */ + trigger?: (google.devtools.cloudbuild.v1.IBuildTrigger|null); + } + + /** Represents a CreateBuildTriggerRequest. */ + class CreateBuildTriggerRequest implements ICreateBuildTriggerRequest { + + /** + * Constructs a new CreateBuildTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest); + + /** CreateBuildTriggerRequest projectId. */ + public projectId: string; + + /** CreateBuildTriggerRequest trigger. */ + public trigger?: (google.devtools.cloudbuild.v1.IBuildTrigger|null); + + /** + * Creates a new CreateBuildTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateBuildTriggerRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest): google.devtools.cloudbuild.v1.CreateBuildTriggerRequest; + + /** + * Encodes the specified CreateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. + * @param message CreateBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. + * @param message CreateBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.CreateBuildTriggerRequest; + + /** + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.CreateBuildTriggerRequest; + + /** + * Verifies a CreateBuildTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateBuildTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.CreateBuildTriggerRequest; + + /** + * Creates a plain object from a CreateBuildTriggerRequest message. Also converts values to other types if specified. + * @param message CreateBuildTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.CreateBuildTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateBuildTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetBuildTriggerRequest. */ + interface IGetBuildTriggerRequest { + + /** GetBuildTriggerRequest projectId */ + projectId?: (string|null); + + /** GetBuildTriggerRequest triggerId */ + triggerId?: (string|null); + } + + /** Represents a GetBuildTriggerRequest. */ + class GetBuildTriggerRequest implements IGetBuildTriggerRequest { + + /** + * Constructs a new GetBuildTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest); + + /** GetBuildTriggerRequest projectId. */ + public projectId: string; + + /** GetBuildTriggerRequest triggerId. */ + public triggerId: string; + + /** + * Creates a new GetBuildTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetBuildTriggerRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest): google.devtools.cloudbuild.v1.GetBuildTriggerRequest; + + /** + * Encodes the specified GetBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * @param message GetBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * @param message GetBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.GetBuildTriggerRequest; + + /** + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.GetBuildTriggerRequest; + + /** + * Verifies a GetBuildTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetBuildTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.GetBuildTriggerRequest; + + /** + * Creates a plain object from a GetBuildTriggerRequest message. Also converts values to other types if specified. + * @param message GetBuildTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.GetBuildTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetBuildTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListBuildTriggersRequest. */ + interface IListBuildTriggersRequest { + + /** ListBuildTriggersRequest projectId */ + projectId?: (string|null); + + /** ListBuildTriggersRequest pageSize */ + pageSize?: (number|null); + + /** ListBuildTriggersRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListBuildTriggersRequest. */ + class ListBuildTriggersRequest implements IListBuildTriggersRequest { + + /** + * Constructs a new ListBuildTriggersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListBuildTriggersRequest); + + /** ListBuildTriggersRequest projectId. */ + public projectId: string; + + /** ListBuildTriggersRequest pageSize. */ + public pageSize: number; + + /** ListBuildTriggersRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListBuildTriggersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBuildTriggersRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListBuildTriggersRequest): google.devtools.cloudbuild.v1.ListBuildTriggersRequest; + + /** + * Encodes the specified ListBuildTriggersRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * @param message ListBuildTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListBuildTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBuildTriggersRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * @param message ListBuildTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListBuildTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBuildTriggersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBuildTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListBuildTriggersRequest; + + /** + * Decodes a ListBuildTriggersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBuildTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListBuildTriggersRequest; + + /** + * Verifies a ListBuildTriggersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBuildTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBuildTriggersRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListBuildTriggersRequest; + + /** + * Creates a plain object from a ListBuildTriggersRequest message. Also converts values to other types if specified. + * @param message ListBuildTriggersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListBuildTriggersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBuildTriggersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListBuildTriggersResponse. */ + interface IListBuildTriggersResponse { + + /** ListBuildTriggersResponse triggers */ + triggers?: (google.devtools.cloudbuild.v1.IBuildTrigger[]|null); + + /** ListBuildTriggersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBuildTriggersResponse. */ + class ListBuildTriggersResponse implements IListBuildTriggersResponse { + + /** + * Constructs a new ListBuildTriggersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListBuildTriggersResponse); + + /** ListBuildTriggersResponse triggers. */ + public triggers: google.devtools.cloudbuild.v1.IBuildTrigger[]; + + /** ListBuildTriggersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBuildTriggersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBuildTriggersResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListBuildTriggersResponse): google.devtools.cloudbuild.v1.ListBuildTriggersResponse; + + /** + * Encodes the specified ListBuildTriggersResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @param message ListBuildTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListBuildTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBuildTriggersResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @param message ListBuildTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListBuildTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListBuildTriggersResponse; + + /** + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListBuildTriggersResponse; + + /** + * Verifies a ListBuildTriggersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBuildTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBuildTriggersResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListBuildTriggersResponse; + + /** + * Creates a plain object from a ListBuildTriggersResponse message. Also converts values to other types if specified. + * @param message ListBuildTriggersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListBuildTriggersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBuildTriggersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteBuildTriggerRequest. */ + interface IDeleteBuildTriggerRequest { + + /** DeleteBuildTriggerRequest projectId */ + projectId?: (string|null); + + /** DeleteBuildTriggerRequest triggerId */ + triggerId?: (string|null); + } + + /** Represents a DeleteBuildTriggerRequest. */ + class DeleteBuildTriggerRequest implements IDeleteBuildTriggerRequest { + + /** + * Constructs a new DeleteBuildTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest); + + /** DeleteBuildTriggerRequest projectId. */ + public projectId: string; + + /** DeleteBuildTriggerRequest triggerId. */ + public triggerId: string; + + /** + * Creates a new DeleteBuildTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteBuildTriggerRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest): google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest; + + /** + * Encodes the specified DeleteBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * @param message DeleteBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * @param message DeleteBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest; + + /** + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest; + + /** + * Verifies a DeleteBuildTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteBuildTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest; + + /** + * Creates a plain object from a DeleteBuildTriggerRequest message. Also converts values to other types if specified. + * @param message DeleteBuildTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteBuildTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateBuildTriggerRequest. */ + interface IUpdateBuildTriggerRequest { + + /** UpdateBuildTriggerRequest projectId */ + projectId?: (string|null); + + /** UpdateBuildTriggerRequest triggerId */ + triggerId?: (string|null); + + /** UpdateBuildTriggerRequest trigger */ + trigger?: (google.devtools.cloudbuild.v1.IBuildTrigger|null); + } + + /** Represents an UpdateBuildTriggerRequest. */ + class UpdateBuildTriggerRequest implements IUpdateBuildTriggerRequest { + + /** + * Constructs a new UpdateBuildTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest); + + /** UpdateBuildTriggerRequest projectId. */ + public projectId: string; + + /** UpdateBuildTriggerRequest triggerId. */ + public triggerId: string; + + /** UpdateBuildTriggerRequest trigger. */ + public trigger?: (google.devtools.cloudbuild.v1.IBuildTrigger|null); + + /** + * Creates a new UpdateBuildTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateBuildTriggerRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest): google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest; + + /** + * Encodes the specified UpdateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @param message UpdateBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @param message UpdateBuildTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest; + + /** + * Verifies an UpdateBuildTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateBuildTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest; + + /** + * Creates a plain object from an UpdateBuildTriggerRequest message. Also converts values to other types if specified. + * @param message UpdateBuildTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateBuildTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuildOptions. */ + interface IBuildOptions { + + /** BuildOptions sourceProvenanceHash */ + sourceProvenanceHash?: (google.devtools.cloudbuild.v1.Hash.HashType[]|null); + + /** BuildOptions requestedVerifyOption */ + requestedVerifyOption?: (google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null); + + /** BuildOptions machineType */ + machineType?: (google.devtools.cloudbuild.v1.BuildOptions.MachineType|null); + + /** BuildOptions diskSizeGb */ + diskSizeGb?: (number|Long|null); + + /** BuildOptions substitutionOption */ + substitutionOption?: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null); + + /** BuildOptions logStreamingOption */ + logStreamingOption?: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null); + + /** BuildOptions workerPool */ + workerPool?: (string|null); + + /** BuildOptions logging */ + logging?: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null); + + /** BuildOptions env */ + env?: (string[]|null); + + /** BuildOptions secretEnv */ + secretEnv?: (string[]|null); + + /** BuildOptions volumes */ + volumes?: (google.devtools.cloudbuild.v1.IVolume[]|null); + } + + /** Represents a BuildOptions. */ + class BuildOptions implements IBuildOptions { + + /** + * Constructs a new BuildOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuildOptions); + + /** BuildOptions sourceProvenanceHash. */ + public sourceProvenanceHash: google.devtools.cloudbuild.v1.Hash.HashType[]; + + /** BuildOptions requestedVerifyOption. */ + public requestedVerifyOption: google.devtools.cloudbuild.v1.BuildOptions.VerifyOption; + + /** BuildOptions machineType. */ + public machineType: google.devtools.cloudbuild.v1.BuildOptions.MachineType; + + /** BuildOptions diskSizeGb. */ + public diskSizeGb: (number|Long); + + /** BuildOptions substitutionOption. */ + public substitutionOption: google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption; + + /** BuildOptions logStreamingOption. */ + public logStreamingOption: google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption; + + /** BuildOptions workerPool. */ + public workerPool: string; + + /** BuildOptions logging. */ + public logging: google.devtools.cloudbuild.v1.BuildOptions.LoggingMode; + + /** BuildOptions env. */ + public env: string[]; + + /** BuildOptions secretEnv. */ + public secretEnv: string[]; + + /** BuildOptions volumes. */ + public volumes: google.devtools.cloudbuild.v1.IVolume[]; + + /** + * Creates a new BuildOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildOptions instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuildOptions): google.devtools.cloudbuild.v1.BuildOptions; + + /** + * Encodes the specified BuildOptions message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @param message BuildOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuildOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildOptions message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @param message BuildOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuildOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildOptions; + + /** + * Decodes a BuildOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildOptions; + + /** + * Verifies a BuildOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildOptions + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildOptions; + + /** + * Creates a plain object from a BuildOptions message. Also converts values to other types if specified. + * @param message BuildOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BuildOptions { + + /** VerifyOption enum. */ + enum VerifyOption { + NOT_VERIFIED = 0, + VERIFIED = 1 + } + + /** MachineType enum. */ + enum MachineType { + UNSPECIFIED = 0, + N1_HIGHCPU_8 = 1, + N1_HIGHCPU_32 = 2 + } + + /** SubstitutionOption enum. */ + enum SubstitutionOption { + MUST_MATCH = 0, + ALLOW_LOOSE = 1 + } + + /** LogStreamingOption enum. */ + enum LogStreamingOption { + STREAM_DEFAULT = 0, + STREAM_ON = 1, + STREAM_OFF = 2 + } + + /** LoggingMode enum. */ + enum LoggingMode { + LOGGING_UNSPECIFIED = 0, + LEGACY = 1, + GCS_ONLY = 2 + } + } + + /** Properties of a WorkerPool. */ + interface IWorkerPool { + + /** WorkerPool name */ + name?: (string|null); + + /** WorkerPool projectId */ + projectId?: (string|null); + + /** WorkerPool serviceAccountEmail */ + serviceAccountEmail?: (string|null); + + /** WorkerPool workerCount */ + workerCount?: (number|Long|null); + + /** WorkerPool workerConfig */ + workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); + + /** WorkerPool regions */ + regions?: (google.devtools.cloudbuild.v1.WorkerPool.Region[]|null); + + /** WorkerPool createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool status */ + status?: (google.devtools.cloudbuild.v1.WorkerPool.Status|null); + } + + /** Represents a WorkerPool. */ + class WorkerPool implements IWorkerPool { + + /** + * Constructs a new WorkerPool. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IWorkerPool); + + /** WorkerPool name. */ + public name: string; + + /** WorkerPool projectId. */ + public projectId: string; + + /** WorkerPool serviceAccountEmail. */ + public serviceAccountEmail: string; + + /** WorkerPool workerCount. */ + public workerCount: (number|Long); + + /** WorkerPool workerConfig. */ + public workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); + + /** WorkerPool regions. */ + public regions: google.devtools.cloudbuild.v1.WorkerPool.Region[]; + + /** WorkerPool createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** WorkerPool status. */ + public status: google.devtools.cloudbuild.v1.WorkerPool.Status; + + /** + * Creates a new WorkerPool instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerPool instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IWorkerPool): google.devtools.cloudbuild.v1.WorkerPool; + + /** + * Encodes the specified WorkerPool message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerPool.verify|verify} messages. + * @param message WorkerPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IWorkerPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkerPool message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerPool.verify|verify} messages. + * @param message WorkerPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IWorkerPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkerPool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.WorkerPool; + + /** + * Decodes a WorkerPool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.WorkerPool; + + /** + * Verifies a WorkerPool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkerPool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerPool + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.WorkerPool; + + /** + * Creates a plain object from a WorkerPool message. Also converts values to other types if specified. + * @param message WorkerPool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.WorkerPool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkerPool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WorkerPool { + + /** Region enum. */ + enum Region { + REGION_UNSPECIFIED = 0, + US_CENTRAL1 = 1, + US_WEST1 = 2, + US_EAST1 = 3, + US_EAST4 = 4 + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2, + DELETING = 3, + DELETED = 4 + } + } + + /** Properties of a WorkerConfig. */ + interface IWorkerConfig { + + /** WorkerConfig machineType */ + machineType?: (string|null); + + /** WorkerConfig diskSizeGb */ + diskSizeGb?: (number|Long|null); + + /** WorkerConfig network */ + network?: (google.devtools.cloudbuild.v1.INetwork|null); + + /** WorkerConfig tag */ + tag?: (string|null); + } + + /** Represents a WorkerConfig. */ + class WorkerConfig implements IWorkerConfig { + + /** + * Constructs a new WorkerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IWorkerConfig); + + /** WorkerConfig machineType. */ + public machineType: string; + + /** WorkerConfig diskSizeGb. */ + public diskSizeGb: (number|Long); + + /** WorkerConfig network. */ + public network?: (google.devtools.cloudbuild.v1.INetwork|null); + + /** WorkerConfig tag. */ + public tag: string; + + /** + * Creates a new WorkerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IWorkerConfig): google.devtools.cloudbuild.v1.WorkerConfig; + + /** + * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * @param message WorkerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * @param message WorkerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.WorkerConfig; + + /** + * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.WorkerConfig; + + /** + * Verifies a WorkerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.WorkerConfig; + + /** + * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. + * @param message WorkerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.WorkerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Network. */ + interface INetwork { + + /** Network projectId */ + projectId?: (string|null); + + /** Network network */ + network?: (string|null); + + /** Network subnetwork */ + subnetwork?: (string|null); + } + + /** Represents a Network. */ + class Network implements INetwork { + + /** + * Constructs a new Network. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.INetwork); + + /** Network projectId. */ + public projectId: string; + + /** Network network. */ + public network: string; + + /** Network subnetwork. */ + public subnetwork: string; + + /** + * Creates a new Network instance using the specified properties. + * @param [properties] Properties to set + * @returns Network instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.INetwork): google.devtools.cloudbuild.v1.Network; + + /** + * Encodes the specified Network message. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. + * @param message Network message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Network message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. + * @param message Network message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Network message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Network; + + /** + * Decodes a Network message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Network; + + /** + * Verifies a Network message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Network message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Network + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Network; + + /** + * Creates a plain object from a Network message. Also converts values to other types if specified. + * @param message Network + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Network, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Network to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateWorkerPoolRequest. */ + interface ICreateWorkerPoolRequest { + + /** CreateWorkerPoolRequest parent */ + parent?: (string|null); + + /** CreateWorkerPoolRequest workerPool */ + workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + } + + /** Represents a CreateWorkerPoolRequest. */ + class CreateWorkerPoolRequest implements ICreateWorkerPoolRequest { + + /** + * Constructs a new CreateWorkerPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest); + + /** CreateWorkerPoolRequest parent. */ + public parent: string; + + /** CreateWorkerPoolRequest workerPool. */ + public workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + + /** + * Creates a new CreateWorkerPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkerPoolRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest): google.devtools.cloudbuild.v1.CreateWorkerPoolRequest; + + /** + * Encodes the specified CreateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @param message CreateWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @param message CreateWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.CreateWorkerPoolRequest; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.CreateWorkerPoolRequest; + + /** + * Verifies a CreateWorkerPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkerPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.CreateWorkerPoolRequest; + + /** + * Creates a plain object from a CreateWorkerPoolRequest message. Also converts values to other types if specified. + * @param message CreateWorkerPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.CreateWorkerPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkerPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetWorkerPoolRequest. */ + interface IGetWorkerPoolRequest { + + /** GetWorkerPoolRequest name */ + name?: (string|null); + } + + /** Represents a GetWorkerPoolRequest. */ + class GetWorkerPoolRequest implements IGetWorkerPoolRequest { + + /** + * Constructs a new GetWorkerPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest); + + /** GetWorkerPoolRequest name. */ + public name: string; + + /** + * Creates a new GetWorkerPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetWorkerPoolRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest): google.devtools.cloudbuild.v1.GetWorkerPoolRequest; + + /** + * Encodes the specified GetWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @param message GetWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @param message GetWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetWorkerPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.GetWorkerPoolRequest; + + /** + * Decodes a GetWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.GetWorkerPoolRequest; + + /** + * Verifies a GetWorkerPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetWorkerPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.GetWorkerPoolRequest; + + /** + * Creates a plain object from a GetWorkerPoolRequest message. Also converts values to other types if specified. + * @param message GetWorkerPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.GetWorkerPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetWorkerPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkerPoolRequest. */ + interface IDeleteWorkerPoolRequest { + + /** DeleteWorkerPoolRequest name */ + name?: (string|null); + } + + /** Represents a DeleteWorkerPoolRequest. */ + class DeleteWorkerPoolRequest implements IDeleteWorkerPoolRequest { + + /** + * Constructs a new DeleteWorkerPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest); + + /** DeleteWorkerPoolRequest name. */ + public name: string; + + /** + * Creates a new DeleteWorkerPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkerPoolRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest): google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest; + + /** + * Encodes the specified DeleteWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @param message DeleteWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @param message DeleteWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest; + + /** + * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest; + + /** + * Verifies a DeleteWorkerPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkerPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest; + + /** + * Creates a plain object from a DeleteWorkerPoolRequest message. Also converts values to other types if specified. + * @param message DeleteWorkerPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkerPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateWorkerPoolRequest. */ + interface IUpdateWorkerPoolRequest { + + /** UpdateWorkerPoolRequest name */ + name?: (string|null); + + /** UpdateWorkerPoolRequest workerPool */ + workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + } + + /** Represents an UpdateWorkerPoolRequest. */ + class UpdateWorkerPoolRequest implements IUpdateWorkerPoolRequest { + + /** + * Constructs a new UpdateWorkerPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest); + + /** UpdateWorkerPoolRequest name. */ + public name: string; + + /** UpdateWorkerPoolRequest workerPool. */ + public workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + + /** + * Creates a new UpdateWorkerPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateWorkerPoolRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest): google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest; + + /** + * Encodes the specified UpdateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * @param message UpdateWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * @param message UpdateWorkerPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest; + + /** + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest; + + /** + * Verifies an UpdateWorkerPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateWorkerPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest; + + /** + * Creates a plain object from an UpdateWorkerPoolRequest message. Also converts values to other types if specified. + * @param message UpdateWorkerPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateWorkerPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkerPoolsRequest. */ + interface IListWorkerPoolsRequest { + + /** ListWorkerPoolsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListWorkerPoolsRequest. */ + class ListWorkerPoolsRequest implements IListWorkerPoolsRequest { + + /** + * Constructs a new ListWorkerPoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest); + + /** ListWorkerPoolsRequest parent. */ + public parent: string; + + /** + * Creates a new ListWorkerPoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkerPoolsRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest): google.devtools.cloudbuild.v1.ListWorkerPoolsRequest; + + /** + * Encodes the specified ListWorkerPoolsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * @param message ListWorkerPoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkerPoolsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * @param message ListWorkerPoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkerPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListWorkerPoolsRequest; + + /** + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkerPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListWorkerPoolsRequest; + + /** + * Verifies a ListWorkerPoolsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkerPoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkerPoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListWorkerPoolsRequest; + + /** + * Creates a plain object from a ListWorkerPoolsRequest message. Also converts values to other types if specified. + * @param message ListWorkerPoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListWorkerPoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkerPoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListWorkerPoolsResponse. */ + interface IListWorkerPoolsResponse { + + /** ListWorkerPoolsResponse workerPools */ + workerPools?: (google.devtools.cloudbuild.v1.IWorkerPool[]|null); + } + + /** Represents a ListWorkerPoolsResponse. */ + class ListWorkerPoolsResponse implements IListWorkerPoolsResponse { + + /** + * Constructs a new ListWorkerPoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IListWorkerPoolsResponse); + + /** ListWorkerPoolsResponse workerPools. */ + public workerPools: google.devtools.cloudbuild.v1.IWorkerPool[]; + + /** + * Creates a new ListWorkerPoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkerPoolsResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IListWorkerPoolsResponse): google.devtools.cloudbuild.v1.ListWorkerPoolsResponse; + + /** + * Encodes the specified ListWorkerPoolsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * @param message ListWorkerPoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkerPoolsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * @param message ListWorkerPoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkerPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ListWorkerPoolsResponse; + + /** + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkerPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ListWorkerPoolsResponse; + + /** + * Verifies a ListWorkerPoolsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkerPoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkerPoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ListWorkerPoolsResponse; + + /** + * Creates a plain object from a ListWorkerPoolsResponse message. Also converts values to other types if specified. + * @param message ListWorkerPoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ListWorkerPoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkerPoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get: string; + + /** HttpRule put. */ + public put: string; + + /** HttpRule post. */ + public post: string; + + /** HttpRule delete. */ + public delete: string; + + /** HttpRule patch. */ + public patch: string; + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5 + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (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); + } + + /** 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; + + /** FieldDescriptorProto type. */ + public type: 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); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|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); + } + + /** 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; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + } + + /** 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; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|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); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: Uint8Array; + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|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); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js new file mode 100644 index 000000000000..0c903c9d3fdd --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -0,0 +1,25691 @@ +/*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("protobufjs/minimal")); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.devtools = (function() { + + /** + * Namespace devtools. + * @memberof google + * @namespace + */ + var devtools = {}; + + devtools.cloudbuild = (function() { + + /** + * Namespace cloudbuild. + * @memberof google.devtools + * @namespace + */ + var cloudbuild = {}; + + cloudbuild.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.devtools.cloudbuild + * @namespace + */ + var v1 = {}; + + v1.CloudBuild = (function() { + + /** + * Constructs a new CloudBuild service. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CloudBuild + * @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 CloudBuild(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CloudBuild.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CloudBuild; + + /** + * Creates new CloudBuild service using the specified rpc implementation. + * @function create + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @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 {CloudBuild} RPC service. Useful where requests and/or responses are streamed. + */ + CloudBuild.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuild}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef CreateBuildCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateBuild. + * @function createBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} request CreateBuildRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.CreateBuildCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.createBuild = function createBuild(request, callback) { + return this.rpcCall(createBuild, $root.google.devtools.cloudbuild.v1.CreateBuildRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateBuild" }); + + /** + * Calls CreateBuild. + * @function createBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} request CreateBuildRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuild}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef GetBuildCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.Build} [response] Build + */ + + /** + * Calls GetBuild. + * @function getBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} request GetBuildRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.GetBuildCallback} callback Node-style callback called with the error, if any, and Build + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.getBuild = function getBuild(request, callback) { + return this.rpcCall(getBuild, $root.google.devtools.cloudbuild.v1.GetBuildRequest, $root.google.devtools.cloudbuild.v1.Build, request, callback); + }, "name", { value: "GetBuild" }); + + /** + * Calls GetBuild. + * @function getBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} request GetBuildRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuilds}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef ListBuildsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.ListBuildsResponse} [response] ListBuildsResponse + */ + + /** + * Calls ListBuilds. + * @function listBuilds + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} request ListBuildsRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.ListBuildsCallback} callback Node-style callback called with the error, if any, and ListBuildsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.listBuilds = function listBuilds(request, callback) { + return this.rpcCall(listBuilds, $root.google.devtools.cloudbuild.v1.ListBuildsRequest, $root.google.devtools.cloudbuild.v1.ListBuildsResponse, request, callback); + }, "name", { value: "ListBuilds" }); + + /** + * Calls ListBuilds. + * @function listBuilds + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} request ListBuildsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#cancelBuild}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef CancelBuildCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.Build} [response] Build + */ + + /** + * Calls CancelBuild. + * @function cancelBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} request CancelBuildRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.CancelBuildCallback} callback Node-style callback called with the error, if any, and Build + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.cancelBuild = function cancelBuild(request, callback) { + return this.rpcCall(cancelBuild, $root.google.devtools.cloudbuild.v1.CancelBuildRequest, $root.google.devtools.cloudbuild.v1.Build, request, callback); + }, "name", { value: "CancelBuild" }); + + /** + * Calls CancelBuild. + * @function cancelBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} request CancelBuildRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#retryBuild}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef RetryBuildCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RetryBuild. + * @function retryBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest} request RetryBuildRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.RetryBuildCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.retryBuild = function retryBuild(request, callback) { + return this.rpcCall(retryBuild, $root.google.devtools.cloudbuild.v1.RetryBuildRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RetryBuild" }); + + /** + * Calls RetryBuild. + * @function retryBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest} request RetryBuildRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef CreateBuildTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.BuildTrigger} [response] BuildTrigger + */ + + /** + * Calls CreateBuildTrigger. + * @function createBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} request CreateBuildTriggerRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTriggerCallback} callback Node-style callback called with the error, if any, and BuildTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.createBuildTrigger = function createBuildTrigger(request, callback) { + return this.rpcCall(createBuildTrigger, $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest, $root.google.devtools.cloudbuild.v1.BuildTrigger, request, callback); + }, "name", { value: "CreateBuildTrigger" }); + + /** + * Calls CreateBuildTrigger. + * @function createBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} request CreateBuildTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuildTrigger}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef GetBuildTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.BuildTrigger} [response] BuildTrigger + */ + + /** + * Calls GetBuildTrigger. + * @function getBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} request GetBuildTriggerRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.GetBuildTriggerCallback} callback Node-style callback called with the error, if any, and BuildTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.getBuildTrigger = function getBuildTrigger(request, callback) { + return this.rpcCall(getBuildTrigger, $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest, $root.google.devtools.cloudbuild.v1.BuildTrigger, request, callback); + }, "name", { value: "GetBuildTrigger" }); + + /** + * Calls GetBuildTrigger. + * @function getBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} request GetBuildTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuildTriggers}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef ListBuildTriggersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} [response] ListBuildTriggersResponse + */ + + /** + * Calls ListBuildTriggers. + * @function listBuildTriggers + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} request ListBuildTriggersRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggersCallback} callback Node-style callback called with the error, if any, and ListBuildTriggersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.listBuildTriggers = function listBuildTriggers(request, callback) { + return this.rpcCall(listBuildTriggers, $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest, $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse, request, callback); + }, "name", { value: "ListBuildTriggers" }); + + /** + * Calls ListBuildTriggers. + * @function listBuildTriggers + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} request ListBuildTriggersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteBuildTrigger}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef DeleteBuildTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteBuildTrigger. + * @function deleteBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} request DeleteBuildTriggerRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTriggerCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.deleteBuildTrigger = function deleteBuildTrigger(request, callback) { + return this.rpcCall(deleteBuildTrigger, $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteBuildTrigger" }); + + /** + * Calls DeleteBuildTrigger. + * @function deleteBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} request DeleteBuildTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateBuildTrigger}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef UpdateBuildTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.BuildTrigger} [response] BuildTrigger + */ + + /** + * Calls UpdateBuildTrigger. + * @function updateBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} request UpdateBuildTriggerRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTriggerCallback} callback Node-style callback called with the error, if any, and BuildTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.updateBuildTrigger = function updateBuildTrigger(request, callback) { + return this.rpcCall(updateBuildTrigger, $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest, $root.google.devtools.cloudbuild.v1.BuildTrigger, request, callback); + }, "name", { value: "UpdateBuildTrigger" }); + + /** + * Calls UpdateBuildTrigger. + * @function updateBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} request UpdateBuildTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#runBuildTrigger}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef RunBuildTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RunBuildTrigger. + * @function runBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest} request RunBuildTriggerRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.RunBuildTriggerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.runBuildTrigger = function runBuildTrigger(request, callback) { + return this.rpcCall(runBuildTrigger, $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RunBuildTrigger" }); + + /** + * Calls RunBuildTrigger. + * @function runBuildTrigger + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest} request RunBuildTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef CreateWorkerPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.WorkerPool} [response] WorkerPool + */ + + /** + * Calls CreateWorkerPool. + * @function createWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} request CreateWorkerPoolRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPoolCallback} callback Node-style callback called with the error, if any, and WorkerPool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.createWorkerPool = function createWorkerPool(request, callback) { + return this.rpcCall(createWorkerPool, $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest, $root.google.devtools.cloudbuild.v1.WorkerPool, request, callback); + }, "name", { value: "CreateWorkerPool" }); + + /** + * Calls CreateWorkerPool. + * @function createWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} request CreateWorkerPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getWorkerPool}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef GetWorkerPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.WorkerPool} [response] WorkerPool + */ + + /** + * Calls GetWorkerPool. + * @function getWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} request GetWorkerPoolRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPoolCallback} callback Node-style callback called with the error, if any, and WorkerPool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.getWorkerPool = function getWorkerPool(request, callback) { + return this.rpcCall(getWorkerPool, $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest, $root.google.devtools.cloudbuild.v1.WorkerPool, request, callback); + }, "name", { value: "GetWorkerPool" }); + + /** + * Calls GetWorkerPool. + * @function getWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} request GetWorkerPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteWorkerPool}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef DeleteWorkerPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteWorkerPool. + * @function deleteWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} request DeleteWorkerPoolRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPoolCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.deleteWorkerPool = function deleteWorkerPool(request, callback) { + return this.rpcCall(deleteWorkerPool, $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteWorkerPool" }); + + /** + * Calls DeleteWorkerPool. + * @function deleteWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} request DeleteWorkerPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateWorkerPool}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef UpdateWorkerPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.WorkerPool} [response] WorkerPool + */ + + /** + * Calls UpdateWorkerPool. + * @function updateWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} request UpdateWorkerPoolRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPoolCallback} callback Node-style callback called with the error, if any, and WorkerPool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.updateWorkerPool = function updateWorkerPool(request, callback) { + return this.rpcCall(updateWorkerPool, $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest, $root.google.devtools.cloudbuild.v1.WorkerPool, request, callback); + }, "name", { value: "UpdateWorkerPool" }); + + /** + * Calls UpdateWorkerPool. + * @function updateWorkerPool + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} request UpdateWorkerPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listWorkerPools}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef ListWorkerPoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} [response] ListWorkerPoolsResponse + */ + + /** + * Calls ListWorkerPools. + * @function listWorkerPools + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} request ListWorkerPoolsRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPoolsCallback} callback Node-style callback called with the error, if any, and ListWorkerPoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.listWorkerPools = function listWorkerPools(request, callback) { + return this.rpcCall(listWorkerPools, $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest, $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse, request, callback); + }, "name", { value: "ListWorkerPools" }); + + /** + * Calls ListWorkerPools. + * @function listWorkerPools + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} request ListWorkerPoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CloudBuild; + })(); + + v1.RetryBuildRequest = (function() { + + /** + * Properties of a RetryBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IRetryBuildRequest + * @property {string|null} [projectId] RetryBuildRequest projectId + * @property {string|null} [id] RetryBuildRequest id + */ + + /** + * Constructs a new RetryBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a RetryBuildRequest. + * @implements IRetryBuildRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest=} [properties] Properties to set + */ + function RetryBuildRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RetryBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @instance + */ + RetryBuildRequest.prototype.projectId = ""; + + /** + * RetryBuildRequest id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @instance + */ + RetryBuildRequest.prototype.id = ""; + + /** + * Creates a new RetryBuildRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.RetryBuildRequest} RetryBuildRequest instance + */ + RetryBuildRequest.create = function create(properties) { + return new RetryBuildRequest(properties); + }; + + /** + * Encodes the specified RetryBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.RetryBuildRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest} message RetryBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryBuildRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified RetryBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RetryBuildRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRetryBuildRequest} message RetryBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryBuildRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.RetryBuildRequest} RetryBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryBuildRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RetryBuildRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetryBuildRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.RetryBuildRequest} RetryBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryBuildRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryBuildRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryBuildRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a RetryBuildRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.RetryBuildRequest} RetryBuildRequest + */ + RetryBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.RetryBuildRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.RetryBuildRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a RetryBuildRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.RetryBuildRequest} message RetryBuildRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryBuildRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.id = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this RetryBuildRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @instance + * @returns {Object.} JSON object + */ + RetryBuildRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RetryBuildRequest; + })(); + + v1.RunBuildTriggerRequest = (function() { + + /** + * Properties of a RunBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IRunBuildTriggerRequest + * @property {string|null} [projectId] RunBuildTriggerRequest projectId + * @property {string|null} [triggerId] RunBuildTriggerRequest triggerId + * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [source] RunBuildTriggerRequest source + */ + + /** + * Constructs a new RunBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a RunBuildTriggerRequest. + * @implements IRunBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest=} [properties] Properties to set + */ + function RunBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @instance + */ + RunBuildTriggerRequest.prototype.projectId = ""; + + /** + * RunBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @instance + */ + RunBuildTriggerRequest.prototype.triggerId = ""; + + /** + * RunBuildTriggerRequest source. + * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} source + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @instance + */ + RunBuildTriggerRequest.prototype.source = null; + + /** + * Creates a new RunBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.RunBuildTriggerRequest} RunBuildTriggerRequest instance + */ + RunBuildTriggerRequest.create = function create(properties) { + return new RunBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified RunBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.RunBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest} message RunBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RunBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IRunBuildTriggerRequest} message RunBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.RunBuildTriggerRequest} RunBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.triggerId = reader.string(); + break; + case 3: + message.source = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.RunBuildTriggerRequest} RunBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.source); + if (error) + return "source." + error; + } + return null; + }; + + /** + * Creates a RunBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.RunBuildTriggerRequest} RunBuildTriggerRequest + */ + RunBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.RunBuildTriggerRequest.source: object expected"); + message.source = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.source); + } + return message; + }; + + /** + * Creates a plain object from a RunBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.RunBuildTriggerRequest} message RunBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.triggerId = ""; + object.source = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.source, options); + return object; + }; + + /** + * Converts this RunBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + RunBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RunBuildTriggerRequest; + })(); + + v1.StorageSource = (function() { + + /** + * Properties of a StorageSource. + * @memberof google.devtools.cloudbuild.v1 + * @interface IStorageSource + * @property {string|null} [bucket] StorageSource bucket + * @property {string|null} [object] StorageSource object + * @property {number|Long|null} [generation] StorageSource generation + */ + + /** + * Constructs a new StorageSource. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a StorageSource. + * @implements IStorageSource + * @constructor + * @param {google.devtools.cloudbuild.v1.IStorageSource=} [properties] Properties to set + */ + function StorageSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageSource bucket. + * @member {string} bucket + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @instance + */ + StorageSource.prototype.bucket = ""; + + /** + * StorageSource object. + * @member {string} object + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @instance + */ + StorageSource.prototype.object = ""; + + /** + * StorageSource generation. + * @member {number|Long} generation + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @instance + */ + StorageSource.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new StorageSource instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSource=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.StorageSource} StorageSource instance + */ + StorageSource.create = function create(properties) { + return new StorageSource(properties); + }; + + /** + * Encodes the specified StorageSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSource} message StorageSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && message.hasOwnProperty("bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && message.hasOwnProperty("object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generation != null && message.hasOwnProperty("generation")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + return writer; + }; + + /** + * Encodes the specified StorageSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSource} message StorageSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.StorageSource} StorageSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.StorageSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generation = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.StorageSource} StorageSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageSource message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + return null; + }; + + /** + * Creates a StorageSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.StorageSource} StorageSource + */ + StorageSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.StorageSource) + return object; + var message = new $root.google.devtools.cloudbuild.v1.StorageSource(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generation != null) + if ($util.Long) + (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; + else if (typeof object.generation === "string") + message.generation = parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a StorageSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {google.devtools.cloudbuild.v1.StorageSource} message StorageSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generation = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generation != null && message.hasOwnProperty("generation")) + if (typeof message.generation === "number") + object.generation = options.longs === String ? String(message.generation) : message.generation; + else + object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; + return object; + }; + + /** + * Converts this StorageSource to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @instance + * @returns {Object.} JSON object + */ + StorageSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StorageSource; + })(); + + v1.RepoSource = (function() { + + /** + * Properties of a RepoSource. + * @memberof google.devtools.cloudbuild.v1 + * @interface IRepoSource + * @property {string|null} [projectId] RepoSource projectId + * @property {string|null} [repoName] RepoSource repoName + * @property {string|null} [branchName] RepoSource branchName + * @property {string|null} [tagName] RepoSource tagName + * @property {string|null} [commitSha] RepoSource commitSha + * @property {string|null} [dir] RepoSource dir + */ + + /** + * Constructs a new RepoSource. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a RepoSource. + * @implements IRepoSource + * @constructor + * @param {google.devtools.cloudbuild.v1.IRepoSource=} [properties] Properties to set + */ + function RepoSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RepoSource projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.projectId = ""; + + /** + * RepoSource repoName. + * @member {string} repoName + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.repoName = ""; + + /** + * RepoSource branchName. + * @member {string} branchName + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.branchName = ""; + + /** + * RepoSource tagName. + * @member {string} tagName + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.tagName = ""; + + /** + * RepoSource commitSha. + * @member {string} commitSha + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.commitSha = ""; + + /** + * RepoSource dir. + * @member {string} dir + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.dir = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RepoSource revision. + * @member {"branchName"|"tagName"|"commitSha"|undefined} revision + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + Object.defineProperty(RepoSource.prototype, "revision", { + get: $util.oneOfGetter($oneOfFields = ["branchName", "tagName", "commitSha"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RepoSource instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {google.devtools.cloudbuild.v1.IRepoSource=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.RepoSource} RepoSource instance + */ + RepoSource.create = function create(properties) { + return new RepoSource(properties); + }; + + /** + * Encodes the specified RepoSource message. Does not implicitly {@link google.devtools.cloudbuild.v1.RepoSource.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {google.devtools.cloudbuild.v1.IRepoSource} message RepoSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepoSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.repoName != null && message.hasOwnProperty("repoName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.repoName); + if (message.branchName != null && message.hasOwnProperty("branchName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.branchName); + if (message.tagName != null && message.hasOwnProperty("tagName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tagName); + if (message.commitSha != null && message.hasOwnProperty("commitSha")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.commitSha); + if (message.dir != null && message.hasOwnProperty("dir")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.dir); + return writer; + }; + + /** + * Encodes the specified RepoSource message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.RepoSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {google.devtools.cloudbuild.v1.IRepoSource} message RepoSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RepoSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RepoSource message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.RepoSource} RepoSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepoSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RepoSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.repoName = reader.string(); + break; + case 3: + message.branchName = reader.string(); + break; + case 4: + message.tagName = reader.string(); + break; + case 5: + message.commitSha = reader.string(); + break; + case 7: + message.dir = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RepoSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.RepoSource} RepoSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RepoSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RepoSource message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RepoSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.repoName != null && message.hasOwnProperty("repoName")) + if (!$util.isString(message.repoName)) + return "repoName: string expected"; + if (message.branchName != null && message.hasOwnProperty("branchName")) { + properties.revision = 1; + if (!$util.isString(message.branchName)) + return "branchName: string expected"; + } + if (message.tagName != null && message.hasOwnProperty("tagName")) { + if (properties.revision === 1) + return "revision: multiple values"; + properties.revision = 1; + if (!$util.isString(message.tagName)) + return "tagName: string expected"; + } + if (message.commitSha != null && message.hasOwnProperty("commitSha")) { + if (properties.revision === 1) + return "revision: multiple values"; + properties.revision = 1; + if (!$util.isString(message.commitSha)) + return "commitSha: string expected"; + } + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + return null; + }; + + /** + * Creates a RepoSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.RepoSource} RepoSource + */ + RepoSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.RepoSource) + return object; + var message = new $root.google.devtools.cloudbuild.v1.RepoSource(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.repoName != null) + message.repoName = String(object.repoName); + if (object.branchName != null) + message.branchName = String(object.branchName); + if (object.tagName != null) + message.tagName = String(object.tagName); + if (object.commitSha != null) + message.commitSha = String(object.commitSha); + if (object.dir != null) + message.dir = String(object.dir); + return message; + }; + + /** + * Creates a plain object from a RepoSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {google.devtools.cloudbuild.v1.RepoSource} message RepoSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RepoSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.repoName = ""; + object.dir = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.repoName != null && message.hasOwnProperty("repoName")) + object.repoName = message.repoName; + if (message.branchName != null && message.hasOwnProperty("branchName")) { + object.branchName = message.branchName; + if (options.oneofs) + object.revision = "branchName"; + } + if (message.tagName != null && message.hasOwnProperty("tagName")) { + object.tagName = message.tagName; + if (options.oneofs) + object.revision = "tagName"; + } + if (message.commitSha != null && message.hasOwnProperty("commitSha")) { + object.commitSha = message.commitSha; + if (options.oneofs) + object.revision = "commitSha"; + } + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + return object; + }; + + /** + * Converts this RepoSource to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + * @returns {Object.} JSON object + */ + RepoSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RepoSource; + })(); + + v1.Source = (function() { + + /** + * Properties of a Source. + * @memberof google.devtools.cloudbuild.v1 + * @interface ISource + * @property {google.devtools.cloudbuild.v1.IStorageSource|null} [storageSource] Source storageSource + * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [repoSource] Source repoSource + */ + + /** + * Constructs a new Source. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Source. + * @implements ISource + * @constructor + * @param {google.devtools.cloudbuild.v1.ISource=} [properties] Properties to set + */ + function Source(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Source storageSource. + * @member {google.devtools.cloudbuild.v1.IStorageSource|null|undefined} storageSource + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + */ + Source.prototype.storageSource = null; + + /** + * Source repoSource. + * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} repoSource + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + */ + Source.prototype.repoSource = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Source source. + * @member {"storageSource"|"repoSource"|undefined} source + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + */ + Object.defineProperty(Source.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["storageSource", "repoSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {google.devtools.cloudbuild.v1.ISource=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); + }; + + /** + * Encodes the specified Source message. Does not implicitly {@link google.devtools.cloudbuild.v1.Source.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {google.devtools.cloudbuild.v1.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storageSource != null && message.hasOwnProperty("storageSource")) + $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.storageSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.repoSource != null && message.hasOwnProperty("repoSource")) + $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.repoSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Source.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {google.devtools.cloudbuild.v1.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Source message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Source(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.storageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); + break; + case 3: + message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Source message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Source message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Source.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.storageSource != null && message.hasOwnProperty("storageSource")) { + properties.source = 1; + { + var error = $root.google.devtools.cloudbuild.v1.StorageSource.verify(message.storageSource); + if (error) + return "storageSource." + error; + } + } + if (message.repoSource != null && message.hasOwnProperty("repoSource")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.repoSource); + if (error) + return "repoSource." + error; + } + } + return null; + }; + + /** + * Creates a Source message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Source} Source + */ + Source.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Source) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Source(); + if (object.storageSource != null) { + if (typeof object.storageSource !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Source.storageSource: object expected"); + message.storageSource = $root.google.devtools.cloudbuild.v1.StorageSource.fromObject(object.storageSource); + } + if (object.repoSource != null) { + if (typeof object.repoSource !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Source.repoSource: object expected"); + message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.repoSource); + } + return message; + }; + + /** + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {google.devtools.cloudbuild.v1.Source} message Source + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Source.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.storageSource != null && message.hasOwnProperty("storageSource")) { + object.storageSource = $root.google.devtools.cloudbuild.v1.StorageSource.toObject(message.storageSource, options); + if (options.oneofs) + object.source = "storageSource"; + } + if (message.repoSource != null && message.hasOwnProperty("repoSource")) { + object.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.repoSource, options); + if (options.oneofs) + object.source = "repoSource"; + } + return object; + }; + + /** + * Converts this Source to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + * @returns {Object.} JSON object + */ + Source.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Source; + })(); + + v1.BuiltImage = (function() { + + /** + * Properties of a BuiltImage. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuiltImage + * @property {string|null} [name] BuiltImage name + * @property {string|null} [digest] BuiltImage digest + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pushTiming] BuiltImage pushTiming + */ + + /** + * Constructs a new BuiltImage. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuiltImage. + * @implements IBuiltImage + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuiltImage=} [properties] Properties to set + */ + function BuiltImage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuiltImage name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @instance + */ + BuiltImage.prototype.name = ""; + + /** + * BuiltImage digest. + * @member {string} digest + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @instance + */ + BuiltImage.prototype.digest = ""; + + /** + * BuiltImage pushTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pushTiming + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @instance + */ + BuiltImage.prototype.pushTiming = null; + + /** + * Creates a new BuiltImage instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {google.devtools.cloudbuild.v1.IBuiltImage=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuiltImage} BuiltImage instance + */ + BuiltImage.create = function create(properties) { + return new BuiltImage(properties); + }; + + /** + * Encodes the specified BuiltImage message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuiltImage.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {google.devtools.cloudbuild.v1.IBuiltImage} message BuiltImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuiltImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.digest != null && message.hasOwnProperty("digest")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.digest); + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pushTiming, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuiltImage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuiltImage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {google.devtools.cloudbuild.v1.IBuiltImage} message BuiltImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuiltImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuiltImage message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuiltImage} BuiltImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuiltImage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuiltImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.digest = reader.string(); + break; + case 4: + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuiltImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuiltImage} BuiltImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuiltImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuiltImage message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuiltImage.verify = function verify(message) { + if (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.digest != null && message.hasOwnProperty("digest")) + if (!$util.isString(message.digest)) + return "digest: string expected"; + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pushTiming); + if (error) + return "pushTiming." + error; + } + return null; + }; + + /** + * Creates a BuiltImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuiltImage} BuiltImage + */ + BuiltImage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuiltImage) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuiltImage(); + if (object.name != null) + message.name = String(object.name); + if (object.digest != null) + message.digest = String(object.digest); + if (object.pushTiming != null) { + if (typeof object.pushTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuiltImage.pushTiming: object expected"); + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pushTiming); + } + return message; + }; + + /** + * Creates a plain object from a BuiltImage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {google.devtools.cloudbuild.v1.BuiltImage} message BuiltImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuiltImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.digest = ""; + object.pushTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.digest != null && message.hasOwnProperty("digest")) + object.digest = message.digest; + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + object.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pushTiming, options); + return object; + }; + + /** + * Converts this BuiltImage to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @instance + * @returns {Object.} JSON object + */ + BuiltImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuiltImage; + })(); + + v1.BuildStep = (function() { + + /** + * Properties of a BuildStep. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildStep + * @property {string|null} [name] BuildStep name + * @property {Array.|null} [env] BuildStep env + * @property {Array.|null} [args] BuildStep args + * @property {string|null} [dir] BuildStep dir + * @property {string|null} [id] BuildStep id + * @property {Array.|null} [waitFor] BuildStep waitFor + * @property {string|null} [entrypoint] BuildStep entrypoint + * @property {Array.|null} [secretEnv] BuildStep secretEnv + * @property {Array.|null} [volumes] BuildStep volumes + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] BuildStep timing + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pullTiming] BuildStep pullTiming + * @property {google.protobuf.IDuration|null} [timeout] BuildStep timeout + * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] BuildStep status + */ + + /** + * Constructs a new BuildStep. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildStep. + * @implements IBuildStep + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set + */ + function BuildStep(properties) { + this.env = []; + this.args = []; + this.waitFor = []; + this.secretEnv = []; + this.volumes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildStep name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.name = ""; + + /** + * BuildStep env. + * @member {Array.} env + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.env = $util.emptyArray; + + /** + * BuildStep args. + * @member {Array.} args + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.args = $util.emptyArray; + + /** + * BuildStep dir. + * @member {string} dir + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.dir = ""; + + /** + * BuildStep id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.id = ""; + + /** + * BuildStep waitFor. + * @member {Array.} waitFor + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.waitFor = $util.emptyArray; + + /** + * BuildStep entrypoint. + * @member {string} entrypoint + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.entrypoint = ""; + + /** + * BuildStep secretEnv. + * @member {Array.} secretEnv + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.secretEnv = $util.emptyArray; + + /** + * BuildStep volumes. + * @member {Array.} volumes + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.volumes = $util.emptyArray; + + /** + * BuildStep timing. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.timing = null; + + /** + * BuildStep pullTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pullTiming + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.pullTiming = null; + + /** + * BuildStep timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.timeout = null; + + /** + * BuildStep status. + * @member {google.devtools.cloudbuild.v1.Build.Status} status + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.status = 0; + + /** + * Creates a new BuildStep instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep instance + */ + BuildStep.create = function create(properties) { + return new BuildStep(properties); + }; + + /** + * Encodes the specified BuildStep message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.env != null && message.env.length) + for (var i = 0; i < message.env.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.env[i]); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.dir != null && message.hasOwnProperty("dir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); + if (message.waitFor != null && message.waitFor.length) + for (var i = 0; i < message.waitFor.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); + if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.entrypoint); + if (message.secretEnv != null && message.secretEnv.length) + for (var i = 0; i < message.secretEnv.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.secretEnv[i]); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.timing != null && message.hasOwnProperty("timing")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.timeout != null && message.hasOwnProperty("timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.status); + if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pullTiming, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuildStep message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildStep message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); + break; + case 3: + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + case 4: + message.dir = reader.string(); + break; + case 5: + message.id = reader.string(); + break; + case 6: + if (!(message.waitFor && message.waitFor.length)) + message.waitFor = []; + message.waitFor.push(reader.string()); + break; + case 7: + message.entrypoint = reader.string(); + break; + case 8: + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + case 9: + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + case 10: + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + case 13: + message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + case 11: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 12: + message.status = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildStep message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildStep.verify = function verify(message) { + if (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.env != null && message.hasOwnProperty("env")) { + if (!Array.isArray(message.env)) + return "env: array expected"; + for (var i = 0; i < message.env.length; ++i) + if (!$util.isString(message.env[i])) + return "env: string[] expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.waitFor != null && message.hasOwnProperty("waitFor")) { + if (!Array.isArray(message.waitFor)) + return "waitFor: array expected"; + for (var i = 0; i < message.waitFor.length; ++i) + if (!$util.isString(message.waitFor[i])) + return "waitFor: string[] expected"; + } + if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + if (!$util.isString(message.entrypoint)) + return "entrypoint: string expected"; + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!Array.isArray(message.secretEnv)) + return "secretEnv: array expected"; + for (var i = 0; i < message.secretEnv.length; ++i) + if (!$util.isString(message.secretEnv[i])) + return "secretEnv: string[] expected"; + } + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + if (message.timing != null && message.hasOwnProperty("timing")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); + if (error) + return "timing." + error; + } + if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pullTiming); + if (error) + return "pullTiming." + error; + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates a BuildStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + */ + BuildStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildStep) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildStep(); + if (object.name != null) + message.name = String(object.name); + if (object.env) { + if (!Array.isArray(object.env)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.env: array expected"); + message.env = []; + for (var i = 0; i < object.env.length; ++i) + message.env[i] = String(object.env[i]); + } + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); + } + if (object.dir != null) + message.dir = String(object.dir); + if (object.id != null) + message.id = String(object.id); + if (object.waitFor) { + if (!Array.isArray(object.waitFor)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.waitFor: array expected"); + message.waitFor = []; + for (var i = 0; i < object.waitFor.length; ++i) + message.waitFor[i] = String(object.waitFor[i]); + } + if (object.entrypoint != null) + message.entrypoint = String(object.entrypoint); + if (object.secretEnv) { + if (!Array.isArray(object.secretEnv)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.secretEnv: array expected"); + message.secretEnv = []; + for (var i = 0; i < object.secretEnv.length; ++i) + message.secretEnv[i] = String(object.secretEnv[i]); + } + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: object expected"); + message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); + } + } + if (object.timing != null) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timing: object expected"); + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); + } + if (object.pullTiming != null) { + if (typeof object.pullTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.pullTiming: object expected"); + message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pullTiming); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + switch (object.status) { + case "STATUS_UNKNOWN": + case 0: + message.status = 0; + break; + case "QUEUED": + case 1: + message.status = 1; + break; + case "WORKING": + case 2: + message.status = 2; + break; + case "SUCCESS": + case 3: + message.status = 3; + break; + case "FAILURE": + case 4: + message.status = 4; + break; + case "INTERNAL_ERROR": + case 5: + message.status = 5; + break; + case "TIMEOUT": + case 6: + message.status = 6; + break; + case "CANCELLED": + case 7: + message.status = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a BuildStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {google.devtools.cloudbuild.v1.BuildStep} message BuildStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.env = []; + object.args = []; + object.waitFor = []; + object.secretEnv = []; + object.volumes = []; + } + if (options.defaults) { + object.name = ""; + object.dir = ""; + object.id = ""; + object.entrypoint = ""; + object.timing = null; + object.timeout = null; + object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; + object.pullTiming = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.env && message.env.length) { + object.env = []; + for (var j = 0; j < message.env.length; ++j) + object.env[j] = message.env[j]; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.waitFor && message.waitFor.length) { + object.waitFor = []; + for (var j = 0; j < message.waitFor.length; ++j) + object.waitFor[j] = message.waitFor[j]; + } + if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + object.entrypoint = message.entrypoint; + if (message.secretEnv && message.secretEnv.length) { + object.secretEnv = []; + for (var j = 0; j < message.secretEnv.length; ++j) + object.secretEnv[j] = message.secretEnv[j]; + } + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); + } + if (message.timing != null && message.hasOwnProperty("timing")) + object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) + object.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pullTiming, options); + return object; + }; + + /** + * Converts this BuildStep to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + * @returns {Object.} JSON object + */ + BuildStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuildStep; + })(); + + v1.Volume = (function() { + + /** + * Properties of a Volume. + * @memberof google.devtools.cloudbuild.v1 + * @interface IVolume + * @property {string|null} [name] Volume name + * @property {string|null} [path] Volume path + */ + + /** + * Constructs a new Volume. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Volume. + * @implements IVolume + * @constructor + * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set + */ + function Volume(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Volume name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.Volume + * @instance + */ + Volume.prototype.name = ""; + + /** + * Volume path. + * @member {string} path + * @memberof google.devtools.cloudbuild.v1.Volume + * @instance + */ + Volume.prototype.path = ""; + + /** + * Creates a new Volume instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Volume} Volume instance + */ + Volume.create = function create(properties) { + return new Volume(properties); + }; + + /** + * Encodes the specified Volume message. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Volume.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Volume message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Volume(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Volume message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Volume} Volume + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Volume.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Volume message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Volume.verify = function verify(message) { + if (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.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Volume} Volume + */ + Volume.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Volume) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Volume(); + if (object.name != null) + message.name = String(object.name); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a Volume message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {google.devtools.cloudbuild.v1.Volume} message Volume + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Volume.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.path = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this Volume to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Volume + * @instance + * @returns {Object.} JSON object + */ + Volume.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Volume; + })(); + + v1.Results = (function() { + + /** + * Properties of a Results. + * @memberof google.devtools.cloudbuild.v1 + * @interface IResults + * @property {Array.|null} [images] Results images + * @property {Array.|null} [buildStepImages] Results buildStepImages + * @property {string|null} [artifactManifest] Results artifactManifest + * @property {number|Long|null} [numArtifacts] Results numArtifacts + * @property {Array.|null} [buildStepOutputs] Results buildStepOutputs + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [artifactTiming] Results artifactTiming + */ + + /** + * Constructs a new Results. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Results. + * @implements IResults + * @constructor + * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set + */ + function Results(properties) { + this.images = []; + this.buildStepImages = []; + this.buildStepOutputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Results images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.images = $util.emptyArray; + + /** + * Results buildStepImages. + * @member {Array.} buildStepImages + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.buildStepImages = $util.emptyArray; + + /** + * Results artifactManifest. + * @member {string} artifactManifest + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.artifactManifest = ""; + + /** + * Results numArtifacts. + * @member {number|Long} numArtifacts + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.numArtifacts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Results buildStepOutputs. + * @member {Array.} buildStepOutputs + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.buildStepOutputs = $util.emptyArray; + + /** + * Results artifactTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} artifactTiming + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + */ + Results.prototype.artifactTiming = null; + + /** + * Creates a new Results instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Results} Results instance + */ + Results.create = function create(properties) { + return new Results(properties); + }; + + /** + * Encodes the specified Results message. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Results.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + $root.google.devtools.cloudbuild.v1.BuiltImage.encode(message.images[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.buildStepImages != null && message.buildStepImages.length) + for (var i = 0; i < message.buildStepImages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.buildStepImages[i]); + if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactManifest); + if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.numArtifacts); + if (message.buildStepOutputs != null && message.buildStepOutputs.length) + for (var i = 0; i < message.buildStepOutputs.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.buildStepOutputs[i]); + if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.artifactTiming, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Results message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Results.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Results message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Results} Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Results.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Results(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.images && message.images.length)) + message.images = []; + message.images.push($root.google.devtools.cloudbuild.v1.BuiltImage.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.buildStepImages && message.buildStepImages.length)) + message.buildStepImages = []; + message.buildStepImages.push(reader.string()); + break; + case 4: + message.artifactManifest = reader.string(); + break; + case 5: + message.numArtifacts = reader.int64(); + break; + case 6: + if (!(message.buildStepOutputs && message.buildStepOutputs.length)) + message.buildStepOutputs = []; + message.buildStepOutputs.push(reader.bytes()); + break; + case 7: + message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Results message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Results} Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Results.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Results message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Results.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuiltImage.verify(message.images[i]); + if (error) + return "images." + error; + } + } + if (message.buildStepImages != null && message.hasOwnProperty("buildStepImages")) { + if (!Array.isArray(message.buildStepImages)) + return "buildStepImages: array expected"; + for (var i = 0; i < message.buildStepImages.length; ++i) + if (!$util.isString(message.buildStepImages[i])) + return "buildStepImages: string[] expected"; + } + if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + if (!$util.isString(message.artifactManifest)) + return "artifactManifest: string expected"; + if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + if (!$util.isInteger(message.numArtifacts) && !(message.numArtifacts && $util.isInteger(message.numArtifacts.low) && $util.isInteger(message.numArtifacts.high))) + return "numArtifacts: integer|Long expected"; + if (message.buildStepOutputs != null && message.hasOwnProperty("buildStepOutputs")) { + if (!Array.isArray(message.buildStepOutputs)) + return "buildStepOutputs: array expected"; + for (var i = 0; i < message.buildStepOutputs.length; ++i) + if (!(message.buildStepOutputs[i] && typeof message.buildStepOutputs[i].length === "number" || $util.isString(message.buildStepOutputs[i]))) + return "buildStepOutputs: buffer[] expected"; + } + if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.artifactTiming); + if (error) + return "artifactTiming." + error; + } + return null; + }; + + /** + * Creates a Results message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Results} Results + */ + Results.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Results) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Results(); + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) { + if (typeof object.images[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.images: object expected"); + message.images[i] = $root.google.devtools.cloudbuild.v1.BuiltImage.fromObject(object.images[i]); + } + } + if (object.buildStepImages) { + if (!Array.isArray(object.buildStepImages)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepImages: array expected"); + message.buildStepImages = []; + for (var i = 0; i < object.buildStepImages.length; ++i) + message.buildStepImages[i] = String(object.buildStepImages[i]); + } + if (object.artifactManifest != null) + message.artifactManifest = String(object.artifactManifest); + if (object.numArtifacts != null) + if ($util.Long) + (message.numArtifacts = $util.Long.fromValue(object.numArtifacts)).unsigned = false; + else if (typeof object.numArtifacts === "string") + message.numArtifacts = parseInt(object.numArtifacts, 10); + else if (typeof object.numArtifacts === "number") + message.numArtifacts = object.numArtifacts; + else if (typeof object.numArtifacts === "object") + message.numArtifacts = new $util.LongBits(object.numArtifacts.low >>> 0, object.numArtifacts.high >>> 0).toNumber(); + if (object.buildStepOutputs) { + if (!Array.isArray(object.buildStepOutputs)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepOutputs: array expected"); + message.buildStepOutputs = []; + for (var i = 0; i < object.buildStepOutputs.length; ++i) + if (typeof object.buildStepOutputs[i] === "string") + $util.base64.decode(object.buildStepOutputs[i], message.buildStepOutputs[i] = $util.newBuffer($util.base64.length(object.buildStepOutputs[i])), 0); + else if (object.buildStepOutputs[i].length) + message.buildStepOutputs[i] = object.buildStepOutputs[i]; + } + if (object.artifactTiming != null) { + if (typeof object.artifactTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.artifactTiming: object expected"); + message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.artifactTiming); + } + return message; + }; + + /** + * Creates a plain object from a Results message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.Results} message Results + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Results.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.images = []; + object.buildStepImages = []; + object.buildStepOutputs = []; + } + if (options.defaults) { + object.artifactManifest = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numArtifacts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numArtifacts = options.longs === String ? "0" : 0; + object.artifactTiming = null; + } + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = $root.google.devtools.cloudbuild.v1.BuiltImage.toObject(message.images[j], options); + } + if (message.buildStepImages && message.buildStepImages.length) { + object.buildStepImages = []; + for (var j = 0; j < message.buildStepImages.length; ++j) + object.buildStepImages[j] = message.buildStepImages[j]; + } + if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + object.artifactManifest = message.artifactManifest; + if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + if (typeof message.numArtifacts === "number") + object.numArtifacts = options.longs === String ? String(message.numArtifacts) : message.numArtifacts; + else + object.numArtifacts = options.longs === String ? $util.Long.prototype.toString.call(message.numArtifacts) : options.longs === Number ? new $util.LongBits(message.numArtifacts.low >>> 0, message.numArtifacts.high >>> 0).toNumber() : message.numArtifacts; + if (message.buildStepOutputs && message.buildStepOutputs.length) { + object.buildStepOutputs = []; + for (var j = 0; j < message.buildStepOutputs.length; ++j) + object.buildStepOutputs[j] = options.bytes === String ? $util.base64.encode(message.buildStepOutputs[j], 0, message.buildStepOutputs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.buildStepOutputs[j]) : message.buildStepOutputs[j]; + } + if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) + object.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.artifactTiming, options); + return object; + }; + + /** + * Converts this Results to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Results + * @instance + * @returns {Object.} JSON object + */ + Results.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Results; + })(); + + v1.ArtifactResult = (function() { + + /** + * Properties of an ArtifactResult. + * @memberof google.devtools.cloudbuild.v1 + * @interface IArtifactResult + * @property {string|null} [location] ArtifactResult location + * @property {Array.|null} [fileHash] ArtifactResult fileHash + */ + + /** + * Constructs a new ArtifactResult. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an ArtifactResult. + * @implements IArtifactResult + * @constructor + * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set + */ + function ArtifactResult(properties) { + this.fileHash = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArtifactResult location. + * @member {string} location + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @instance + */ + ArtifactResult.prototype.location = ""; + + /** + * ArtifactResult fileHash. + * @member {Array.} fileHash + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @instance + */ + ArtifactResult.prototype.fileHash = $util.emptyArray; + + /** + * Creates a new ArtifactResult instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult instance + */ + ArtifactResult.create = function create(properties) { + return new ArtifactResult(properties); + }; + + /** + * Encodes the specified ArtifactResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArtifactResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.fileHash != null && message.fileHash.length) + for (var i = 0; i < message.fileHash.length; ++i) + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHash[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ArtifactResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArtifactResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArtifactResult message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArtifactResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArtifactResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArtifactResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArtifactResult message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArtifactResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.fileHash != null && message.hasOwnProperty("fileHash")) { + if (!Array.isArray(message.fileHash)) + return "fileHash: array expected"; + for (var i = 0; i < message.fileHash.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHash[i]); + if (error) + return "fileHash." + error; + } + } + return null; + }; + + /** + * Creates an ArtifactResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + */ + ArtifactResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ArtifactResult) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); + if (object.location != null) + message.location = String(object.location); + if (object.fileHash) { + if (!Array.isArray(object.fileHash)) + throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: array expected"); + message.fileHash = []; + for (var i = 0; i < object.fileHash.length; ++i) { + if (typeof object.fileHash[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: object expected"); + message.fileHash[i] = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHash[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ArtifactResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {google.devtools.cloudbuild.v1.ArtifactResult} message ArtifactResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArtifactResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileHash = []; + if (options.defaults) + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.fileHash && message.fileHash.length) { + object.fileHash = []; + for (var j = 0; j < message.fileHash.length; ++j) + object.fileHash[j] = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHash[j], options); + } + return object; + }; + + /** + * Converts this ArtifactResult to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @instance + * @returns {Object.} JSON object + */ + ArtifactResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArtifactResult; + })(); + + v1.Build = (function() { + + /** + * Properties of a Build. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuild + * @property {string|null} [id] Build id + * @property {string|null} [projectId] Build projectId + * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] Build status + * @property {string|null} [statusDetail] Build statusDetail + * @property {google.devtools.cloudbuild.v1.ISource|null} [source] Build source + * @property {Array.|null} [steps] Build steps + * @property {google.devtools.cloudbuild.v1.IResults|null} [results] Build results + * @property {google.protobuf.ITimestamp|null} [createTime] Build createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Build startTime + * @property {google.protobuf.ITimestamp|null} [finishTime] Build finishTime + * @property {google.protobuf.IDuration|null} [timeout] Build timeout + * @property {Array.|null} [images] Build images + * @property {google.devtools.cloudbuild.v1.IArtifacts|null} [artifacts] Build artifacts + * @property {string|null} [logsBucket] Build logsBucket + * @property {google.devtools.cloudbuild.v1.ISourceProvenance|null} [sourceProvenance] Build sourceProvenance + * @property {string|null} [buildTriggerId] Build buildTriggerId + * @property {google.devtools.cloudbuild.v1.IBuildOptions|null} [options] Build options + * @property {string|null} [logUrl] Build logUrl + * @property {Object.|null} [substitutions] Build substitutions + * @property {Array.|null} [tags] Build tags + * @property {Array.|null} [secrets] Build secrets + * @property {Object.|null} [timing] Build timing + */ + + /** + * Constructs a new Build. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Build. + * @implements IBuild + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set + */ + function Build(properties) { + this.steps = []; + this.images = []; + this.substitutions = {}; + this.tags = []; + this.secrets = []; + this.timing = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Build id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.id = ""; + + /** + * Build projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.projectId = ""; + + /** + * Build status. + * @member {google.devtools.cloudbuild.v1.Build.Status} status + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.status = 0; + + /** + * Build statusDetail. + * @member {string} statusDetail + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.statusDetail = ""; + + /** + * Build source. + * @member {google.devtools.cloudbuild.v1.ISource|null|undefined} source + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.source = null; + + /** + * Build steps. + * @member {Array.} steps + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.steps = $util.emptyArray; + + /** + * Build results. + * @member {google.devtools.cloudbuild.v1.IResults|null|undefined} results + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.results = null; + + /** + * Build createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.createTime = null; + + /** + * Build startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.startTime = null; + + /** + * Build finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.finishTime = null; + + /** + * Build timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.timeout = null; + + /** + * Build images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.images = $util.emptyArray; + + /** + * Build artifacts. + * @member {google.devtools.cloudbuild.v1.IArtifacts|null|undefined} artifacts + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.artifacts = null; + + /** + * Build logsBucket. + * @member {string} logsBucket + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.logsBucket = ""; + + /** + * Build sourceProvenance. + * @member {google.devtools.cloudbuild.v1.ISourceProvenance|null|undefined} sourceProvenance + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.sourceProvenance = null; + + /** + * Build buildTriggerId. + * @member {string} buildTriggerId + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.buildTriggerId = ""; + + /** + * Build options. + * @member {google.devtools.cloudbuild.v1.IBuildOptions|null|undefined} options + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.options = null; + + /** + * Build logUrl. + * @member {string} logUrl + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.logUrl = ""; + + /** + * Build substitutions. + * @member {Object.} substitutions + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.substitutions = $util.emptyObject; + + /** + * Build tags. + * @member {Array.} tags + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.tags = $util.emptyArray; + + /** + * Build secrets. + * @member {Array.} secrets + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.secrets = $util.emptyArray; + + /** + * Build timing. + * @member {Object.} timing + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.timing = $util.emptyObject; + + /** + * Creates a new Build instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build} Build instance + */ + Build.create = function create(properties) { + return new Build(properties); + }; + + /** + * Encodes the specified Build message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Build.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); + if (message.source != null && message.hasOwnProperty("source")) + $root.google.devtools.cloudbuild.v1.Source.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.results != null && message.hasOwnProperty("results")) + $root.google.devtools.cloudbuild.v1.Results.encode(message.results, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.devtools.cloudbuild.v1.BuildStep.encode(message.steps[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.timeout != null && message.hasOwnProperty("timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.images[i]); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.projectId); + if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.logsBucket); + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) + $root.google.devtools.cloudbuild.v1.SourceProvenance.encode(message.sourceProvenance, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.buildTriggerId); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.devtools.cloudbuild.v1.BuildOptions.encode(message.options, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.statusDetail); + if (message.logUrl != null && message.hasOwnProperty("logUrl")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.logUrl); + if (message.substitutions != null && message.hasOwnProperty("substitutions")) + for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 29, wireType 2 =*/234).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 31, wireType 2 =*/250).string(message.tags[i]); + if (message.secrets != null && message.secrets.length) + for (var i = 0; i < message.secrets.length; ++i) + $root.google.devtools.cloudbuild.v1.Secret.encode(message.secrets[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.timing != null && message.hasOwnProperty("timing")) + for (var keys = Object.keys(message.timing), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.artifacts != null && message.hasOwnProperty("artifacts")) + $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Build message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Build.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Build message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Build} Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Build.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 16: + message.projectId = reader.string(); + break; + case 2: + message.status = reader.int32(); + break; + case 24: + message.statusDetail = reader.string(); + break; + case 3: + message.source = $root.google.devtools.cloudbuild.v1.Source.decode(reader, reader.uint32()); + break; + case 11: + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.devtools.cloudbuild.v1.BuildStep.decode(reader, reader.uint32())); + break; + case 10: + message.results = $root.google.devtools.cloudbuild.v1.Results.decode(reader, reader.uint32()); + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 12: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 13: + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); + break; + case 37: + message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); + break; + case 19: + message.logsBucket = reader.string(); + break; + case 21: + message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.decode(reader, reader.uint32()); + break; + case 22: + message.buildTriggerId = reader.string(); + break; + case 23: + message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.decode(reader, reader.uint32()); + break; + case 25: + message.logUrl = reader.string(); + break; + case 29: + reader.skip().pos++; + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + key = reader.string(); + reader.pos++; + message.substitutions[key] = reader.string(); + break; + case 31: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 32: + if (!(message.secrets && message.secrets.length)) + message.secrets = []; + message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); + break; + case 33: + reader.skip().pos++; + if (message.timing === $util.emptyObject) + message.timing = {}; + key = reader.string(); + reader.pos++; + message.timing[key] = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Build message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build} Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Build.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Build message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Build.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.devtools.cloudbuild.v1.Source.verify(message.source); + if (error) + return "source." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuildStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.results != null && message.hasOwnProperty("results")) { + var error = $root.google.devtools.cloudbuild.v1.Results.verify(message.results); + if (error) + return "results." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) + if (!$util.isString(message.images[i])) + return "images: string[] expected"; + } + if (message.artifacts != null && message.hasOwnProperty("artifacts")) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.verify(message.artifacts); + if (error) + return "artifacts." + error; + } + if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + if (!$util.isString(message.logsBucket)) + return "logsBucket: string expected"; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) { + var error = $root.google.devtools.cloudbuild.v1.SourceProvenance.verify(message.sourceProvenance); + if (error) + return "sourceProvenance." + error; + } + if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + if (!$util.isString(message.buildTriggerId)) + return "buildTriggerId: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.devtools.cloudbuild.v1.BuildOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.logUrl != null && message.hasOwnProperty("logUrl")) + if (!$util.isString(message.logUrl)) + return "logUrl: string expected"; + if (message.substitutions != null && message.hasOwnProperty("substitutions")) { + if (!$util.isObject(message.substitutions)) + return "substitutions: object expected"; + var key = Object.keys(message.substitutions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.substitutions[key[i]])) + return "substitutions: string{k:string} expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.secrets != null && message.hasOwnProperty("secrets")) { + if (!Array.isArray(message.secrets)) + return "secrets: array expected"; + for (var i = 0; i < message.secrets.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Secret.verify(message.secrets[i]); + if (error) + return "secrets." + error; + } + } + if (message.timing != null && message.hasOwnProperty("timing")) { + if (!$util.isObject(message.timing)) + return "timing: object expected"; + var key = Object.keys(message.timing); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing[key[i]]); + if (error) + return "timing." + error; + } + } + return null; + }; + + /** + * Creates a Build message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build} Build + */ + Build.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build(); + if (object.id != null) + message.id = String(object.id); + if (object.projectId != null) + message.projectId = String(object.projectId); + switch (object.status) { + case "STATUS_UNKNOWN": + case 0: + message.status = 0; + break; + case "QUEUED": + case 1: + message.status = 1; + break; + case "WORKING": + case 2: + message.status = 2; + break; + case "SUCCESS": + case 3: + message.status = 3; + break; + case "FAILURE": + case 4: + message.status = 4; + break; + case "INTERNAL_ERROR": + case 5: + message.status = 5; + break; + case "TIMEOUT": + case 6: + message.status = 6; + break; + case "CANCELLED": + case 7: + message.status = 7; + break; + } + if (object.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.source: object expected"); + message.source = $root.google.devtools.cloudbuild.v1.Source.fromObject(object.source); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: object expected"); + message.steps[i] = $root.google.devtools.cloudbuild.v1.BuildStep.fromObject(object.steps[i]); + } + } + if (object.results != null) { + if (typeof object.results !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.results: object expected"); + message.results = $root.google.devtools.cloudbuild.v1.Results.fromObject(object.results); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) + message.images[i] = String(object.images[i]); + } + if (object.artifacts != null) { + if (typeof object.artifacts !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.artifacts: object expected"); + message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.fromObject(object.artifacts); + } + if (object.logsBucket != null) + message.logsBucket = String(object.logsBucket); + if (object.sourceProvenance != null) { + if (typeof object.sourceProvenance !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.sourceProvenance: object expected"); + message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.fromObject(object.sourceProvenance); + } + if (object.buildTriggerId != null) + message.buildTriggerId = String(object.buildTriggerId); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.options: object expected"); + message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.fromObject(object.options); + } + if (object.logUrl != null) + message.logUrl = String(object.logUrl); + if (object.substitutions) { + if (typeof object.substitutions !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.substitutions: object expected"); + message.substitutions = {}; + for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) + message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.secrets) { + if (!Array.isArray(object.secrets)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: array expected"); + message.secrets = []; + for (var i = 0; i < object.secrets.length; ++i) { + if (typeof object.secrets[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: object expected"); + message.secrets[i] = $root.google.devtools.cloudbuild.v1.Secret.fromObject(object.secrets[i]); + } + } + if (object.timing) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); + message.timing = {}; + for (var keys = Object.keys(object.timing), i = 0; i < keys.length; ++i) { + if (typeof object.timing[keys[i]] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); + message.timing[keys[i]] = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a Build message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.Build} message Build + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Build.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.steps = []; + object.images = []; + object.tags = []; + object.secrets = []; + } + if (options.objects || options.defaults) { + object.substitutions = {}; + object.timing = {}; + } + if (options.defaults) { + object.id = ""; + object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; + object.source = null; + object.createTime = null; + object.startTime = null; + object.finishTime = null; + object.results = null; + object.timeout = null; + object.projectId = ""; + object.logsBucket = ""; + object.sourceProvenance = null; + object.buildTriggerId = ""; + object.options = null; + object.statusDetail = ""; + object.logUrl = ""; + object.artifacts = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.devtools.cloudbuild.v1.Source.toObject(message.source, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.results != null && message.hasOwnProperty("results")) + object.results = $root.google.devtools.cloudbuild.v1.Results.toObject(message.results, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.devtools.cloudbuild.v1.BuildStep.toObject(message.steps[j], options); + } + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = message.images[j]; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + object.logsBucket = message.logsBucket; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) + object.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.toObject(message.sourceProvenance, options); + if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + object.buildTriggerId = message.buildTriggerId; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.devtools.cloudbuild.v1.BuildOptions.toObject(message.options, options); + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.logUrl != null && message.hasOwnProperty("logUrl")) + object.logUrl = message.logUrl; + var keys2; + if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { + object.substitutions = {}; + for (var j = 0; j < keys2.length; ++j) + object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.secrets && message.secrets.length) { + object.secrets = []; + for (var j = 0; j < message.secrets.length; ++j) + object.secrets[j] = $root.google.devtools.cloudbuild.v1.Secret.toObject(message.secrets[j], options); + } + if (message.timing && (keys2 = Object.keys(message.timing)).length) { + object.timing = {}; + for (var j = 0; j < keys2.length; ++j) + object.timing[keys2[j]] = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing[keys2[j]], options); + } + if (message.artifacts != null && message.hasOwnProperty("artifacts")) + object.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.toObject(message.artifacts, options); + return object; + }; + + /** + * Converts this Build to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + * @returns {Object.} JSON object + */ + Build.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Status enum. + * @name google.devtools.cloudbuild.v1.Build.Status + * @enum {string} + * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value + * @property {number} QUEUED=1 QUEUED value + * @property {number} WORKING=2 WORKING value + * @property {number} SUCCESS=3 SUCCESS value + * @property {number} FAILURE=4 FAILURE value + * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value + * @property {number} TIMEOUT=6 TIMEOUT value + * @property {number} CANCELLED=7 CANCELLED value + */ + Build.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNKNOWN"] = 0; + values[valuesById[1] = "QUEUED"] = 1; + values[valuesById[2] = "WORKING"] = 2; + values[valuesById[3] = "SUCCESS"] = 3; + values[valuesById[4] = "FAILURE"] = 4; + values[valuesById[5] = "INTERNAL_ERROR"] = 5; + values[valuesById[6] = "TIMEOUT"] = 6; + values[valuesById[7] = "CANCELLED"] = 7; + return values; + })(); + + return Build; + })(); + + v1.Artifacts = (function() { + + /** + * Properties of an Artifacts. + * @memberof google.devtools.cloudbuild.v1 + * @interface IArtifacts + * @property {Array.|null} [images] Artifacts images + * @property {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null} [objects] Artifacts objects + */ + + /** + * Constructs a new Artifacts. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an Artifacts. + * @implements IArtifacts + * @constructor + * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set + */ + function Artifacts(properties) { + this.images = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Artifacts images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.images = $util.emptyArray; + + /** + * Artifacts objects. + * @member {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null|undefined} objects + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.objects = null; + + /** + * Creates a new Artifacts instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts instance + */ + Artifacts.create = function create(properties) { + return new Artifacts(properties); + }; + + /** + * Encodes the specified Artifacts message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifacts.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.images[i]); + if (message.objects != null && message.hasOwnProperty("objects")) + $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.encode(message.objects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Artifacts message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifacts.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Artifacts message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifacts.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); + break; + case 2: + message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Artifacts message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifacts.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Artifacts message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Artifacts.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) + if (!$util.isString(message.images[i])) + return "images: string[] expected"; + } + if (message.objects != null && message.hasOwnProperty("objects")) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify(message.objects); + if (error) + return "objects." + error; + } + return null; + }; + + /** + * Creates an Artifacts message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + */ + Artifacts.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts(); + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) + message.images[i] = String(object.images[i]); + } + if (object.objects != null) { + if (typeof object.objects !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.objects: object expected"); + message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.fromObject(object.objects); + } + return message; + }; + + /** + * Creates a plain object from an Artifacts message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts} message Artifacts + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Artifacts.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.images = []; + if (options.defaults) + object.objects = null; + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = message.images[j]; + } + if (message.objects != null && message.hasOwnProperty("objects")) + object.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.toObject(message.objects, options); + return object; + }; + + /** + * Converts this Artifacts to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + * @returns {Object.} JSON object + */ + Artifacts.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Artifacts.ArtifactObjects = (function() { + + /** + * Properties of an ArtifactObjects. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @interface IArtifactObjects + * @property {string|null} [location] ArtifactObjects location + * @property {Array.|null} [paths] ArtifactObjects paths + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] ArtifactObjects timing + */ + + /** + * Constructs a new ArtifactObjects. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @classdesc Represents an ArtifactObjects. + * @implements IArtifactObjects + * @constructor + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set + */ + function ArtifactObjects(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]]; + } + + /** + * ArtifactObjects location. + * @member {string} location + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @instance + */ + ArtifactObjects.prototype.location = ""; + + /** + * ArtifactObjects paths. + * @member {Array.} paths + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @instance + */ + ArtifactObjects.prototype.paths = $util.emptyArray; + + /** + * ArtifactObjects timing. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @instance + */ + ArtifactObjects.prototype.timing = null; + + /** + * Creates a new ArtifactObjects instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects instance + */ + ArtifactObjects.create = function create(properties) { + return new ArtifactObjects(properties); + }; + + /** + * Encodes the specified ArtifactObjects message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArtifactObjects.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.hasOwnProperty("location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + 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.timing != null && message.hasOwnProperty("timing")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ArtifactObjects message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArtifactObjects.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArtifactObjects message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArtifactObjects.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.location = reader.string(); + break; + case 2: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + case 3: + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArtifactObjects message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArtifactObjects.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArtifactObjects message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArtifactObjects.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.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.timing != null && message.hasOwnProperty("timing")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); + if (error) + return "timing." + error; + } + return null; + }; + + /** + * Creates an ArtifactObjects message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + */ + ArtifactObjects.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); + if (object.location != null) + message.location = String(object.location); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.timing != null) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.timing: object expected"); + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); + } + return message; + }; + + /** + * Creates a plain object from an ArtifactObjects message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} message ArtifactObjects + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArtifactObjects.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (options.defaults) { + object.location = ""; + object.timing = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + 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.timing != null && message.hasOwnProperty("timing")) + object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); + return object; + }; + + /** + * Converts this ArtifactObjects to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @instance + * @returns {Object.} JSON object + */ + ArtifactObjects.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ArtifactObjects; + })(); + + return Artifacts; + })(); + + v1.TimeSpan = (function() { + + /** + * Properties of a TimeSpan. + * @memberof google.devtools.cloudbuild.v1 + * @interface ITimeSpan + * @property {google.protobuf.ITimestamp|null} [startTime] TimeSpan startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeSpan endTime + */ + + /** + * Constructs a new TimeSpan. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a TimeSpan. + * @implements ITimeSpan + * @constructor + * @param {google.devtools.cloudbuild.v1.ITimeSpan=} [properties] Properties to set + */ + function TimeSpan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeSpan startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @instance + */ + TimeSpan.prototype.startTime = null; + + /** + * TimeSpan endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @instance + */ + TimeSpan.prototype.endTime = null; + + /** + * Creates a new TimeSpan instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {google.devtools.cloudbuild.v1.ITimeSpan=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.TimeSpan} TimeSpan instance + */ + TimeSpan.create = function create(properties) { + return new TimeSpan(properties); + }; + + /** + * Encodes the specified TimeSpan message. Does not implicitly {@link google.devtools.cloudbuild.v1.TimeSpan.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {google.devtools.cloudbuild.v1.ITimeSpan} message TimeSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSpan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && message.hasOwnProperty("startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && message.hasOwnProperty("endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSpan message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.TimeSpan.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {google.devtools.cloudbuild.v1.ITimeSpan} message TimeSpan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSpan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSpan message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.TimeSpan} TimeSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSpan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.TimeSpan(); + 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 a TimeSpan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.TimeSpan} TimeSpan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeSpan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSpan message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeSpan.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 a TimeSpan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.TimeSpan} TimeSpan + */ + TimeSpan.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.TimeSpan) + return object; + var message = new $root.google.devtools.cloudbuild.v1.TimeSpan(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.TimeSpan.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.TimeSpan.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeSpan message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {google.devtools.cloudbuild.v1.TimeSpan} message TimeSpan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSpan.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 TimeSpan to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @instance + * @returns {Object.} JSON object + */ + TimeSpan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TimeSpan; + })(); + + v1.BuildOperationMetadata = (function() { + + /** + * Properties of a BuildOperationMetadata. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildOperationMetadata + * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildOperationMetadata build + */ + + /** + * Constructs a new BuildOperationMetadata. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildOperationMetadata. + * @implements IBuildOperationMetadata + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildOperationMetadata=} [properties] Properties to set + */ + function BuildOperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildOperationMetadata build. + * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @instance + */ + BuildOperationMetadata.prototype.build = null; + + /** + * Creates a new BuildOperationMetadata instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildOperationMetadata} BuildOperationMetadata instance + */ + BuildOperationMetadata.create = function create(properties) { + return new BuildOperationMetadata(properties); + }; + + /** + * Encodes the specified BuildOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOperationMetadata} message BuildOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.build != null && message.hasOwnProperty("build")) + $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuildOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOperationMetadata} message BuildOperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildOperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildOperationMetadata} BuildOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildOperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildOperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildOperationMetadata} BuildOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildOperationMetadata message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildOperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.build != null && message.hasOwnProperty("build")) { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); + if (error) + return "build." + error; + } + return null; + }; + + /** + * Creates a BuildOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildOperationMetadata} BuildOperationMetadata + */ + BuildOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildOperationMetadata) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildOperationMetadata(); + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildOperationMetadata.build: object expected"); + message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); + } + return message; + }; + + /** + * Creates a plain object from a BuildOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {google.devtools.cloudbuild.v1.BuildOperationMetadata} message BuildOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.build = null; + if (message.build != null && message.hasOwnProperty("build")) + object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); + return object; + }; + + /** + * Converts this BuildOperationMetadata to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + BuildOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuildOperationMetadata; + })(); + + v1.SourceProvenance = (function() { + + /** + * Properties of a SourceProvenance. + * @memberof google.devtools.cloudbuild.v1 + * @interface ISourceProvenance + * @property {google.devtools.cloudbuild.v1.IStorageSource|null} [resolvedStorageSource] SourceProvenance resolvedStorageSource + * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [resolvedRepoSource] SourceProvenance resolvedRepoSource + * @property {Object.|null} [fileHashes] SourceProvenance fileHashes + */ + + /** + * Constructs a new SourceProvenance. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a SourceProvenance. + * @implements ISourceProvenance + * @constructor + * @param {google.devtools.cloudbuild.v1.ISourceProvenance=} [properties] Properties to set + */ + function SourceProvenance(properties) { + this.fileHashes = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceProvenance resolvedStorageSource. + * @member {google.devtools.cloudbuild.v1.IStorageSource|null|undefined} resolvedStorageSource + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @instance + */ + SourceProvenance.prototype.resolvedStorageSource = null; + + /** + * SourceProvenance resolvedRepoSource. + * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} resolvedRepoSource + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @instance + */ + SourceProvenance.prototype.resolvedRepoSource = null; + + /** + * SourceProvenance fileHashes. + * @member {Object.} fileHashes + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @instance + */ + SourceProvenance.prototype.fileHashes = $util.emptyObject; + + /** + * Creates a new SourceProvenance instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {google.devtools.cloudbuild.v1.ISourceProvenance=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.SourceProvenance} SourceProvenance instance + */ + SourceProvenance.create = function create(properties) { + return new SourceProvenance(properties); + }; + + /** + * Encodes the specified SourceProvenance message. Does not implicitly {@link google.devtools.cloudbuild.v1.SourceProvenance.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {google.devtools.cloudbuild.v1.ISourceProvenance} message SourceProvenance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceProvenance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resolvedStorageSource != null && message.hasOwnProperty("resolvedStorageSource")) + $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.resolvedStorageSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) + for (var keys = Object.keys(message.fileHashes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHashes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.resolvedRepoSource != null && message.hasOwnProperty("resolvedRepoSource")) + $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.resolvedRepoSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceProvenance message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.SourceProvenance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {google.devtools.cloudbuild.v1.ISourceProvenance} message SourceProvenance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceProvenance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceProvenance message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.SourceProvenance} SourceProvenance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceProvenance.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.SourceProvenance(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); + break; + case 6: + message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + case 4: + reader.skip().pos++; + if (message.fileHashes === $util.emptyObject) + message.fileHashes = {}; + key = reader.string(); + reader.pos++; + message.fileHashes[key] = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceProvenance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.SourceProvenance} SourceProvenance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceProvenance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceProvenance message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceProvenance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resolvedStorageSource != null && message.hasOwnProperty("resolvedStorageSource")) { + var error = $root.google.devtools.cloudbuild.v1.StorageSource.verify(message.resolvedStorageSource); + if (error) + return "resolvedStorageSource." + error; + } + if (message.resolvedRepoSource != null && message.hasOwnProperty("resolvedRepoSource")) { + var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.resolvedRepoSource); + if (error) + return "resolvedRepoSource." + error; + } + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { + if (!$util.isObject(message.fileHashes)) + return "fileHashes: object expected"; + var key = Object.keys(message.fileHashes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHashes[key[i]]); + if (error) + return "fileHashes." + error; + } + } + return null; + }; + + /** + * Creates a SourceProvenance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.SourceProvenance} SourceProvenance + */ + SourceProvenance.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.SourceProvenance) + return object; + var message = new $root.google.devtools.cloudbuild.v1.SourceProvenance(); + if (object.resolvedStorageSource != null) { + if (typeof object.resolvedStorageSource !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.resolvedStorageSource: object expected"); + message.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.fromObject(object.resolvedStorageSource); + } + if (object.resolvedRepoSource != null) { + if (typeof object.resolvedRepoSource !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.resolvedRepoSource: object expected"); + message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.resolvedRepoSource); + } + if (object.fileHashes) { + if (typeof object.fileHashes !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.fileHashes: object expected"); + message.fileHashes = {}; + for (var keys = Object.keys(object.fileHashes), i = 0; i < keys.length; ++i) { + if (typeof object.fileHashes[keys[i]] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.fileHashes: object expected"); + message.fileHashes[keys[i]] = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHashes[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceProvenance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {google.devtools.cloudbuild.v1.SourceProvenance} message SourceProvenance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceProvenance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fileHashes = {}; + if (options.defaults) { + object.resolvedStorageSource = null; + object.resolvedRepoSource = null; + } + if (message.resolvedStorageSource != null && message.hasOwnProperty("resolvedStorageSource")) + object.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.toObject(message.resolvedStorageSource, options); + var keys2; + if (message.fileHashes && (keys2 = Object.keys(message.fileHashes)).length) { + object.fileHashes = {}; + for (var j = 0; j < keys2.length; ++j) + object.fileHashes[keys2[j]] = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHashes[keys2[j]], options); + } + if (message.resolvedRepoSource != null && message.hasOwnProperty("resolvedRepoSource")) + object.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.resolvedRepoSource, options); + return object; + }; + + /** + * Converts this SourceProvenance to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @instance + * @returns {Object.} JSON object + */ + SourceProvenance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SourceProvenance; + })(); + + v1.FileHashes = (function() { + + /** + * Properties of a FileHashes. + * @memberof google.devtools.cloudbuild.v1 + * @interface IFileHashes + * @property {Array.|null} [fileHash] FileHashes fileHash + */ + + /** + * Constructs a new FileHashes. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a FileHashes. + * @implements IFileHashes + * @constructor + * @param {google.devtools.cloudbuild.v1.IFileHashes=} [properties] Properties to set + */ + function FileHashes(properties) { + this.fileHash = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileHashes fileHash. + * @member {Array.} fileHash + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @instance + */ + FileHashes.prototype.fileHash = $util.emptyArray; + + /** + * Creates a new FileHashes instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {google.devtools.cloudbuild.v1.IFileHashes=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.FileHashes} FileHashes instance + */ + FileHashes.create = function create(properties) { + return new FileHashes(properties); + }; + + /** + * Encodes the specified FileHashes message. Does not implicitly {@link google.devtools.cloudbuild.v1.FileHashes.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {google.devtools.cloudbuild.v1.IFileHashes} message FileHashes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileHashes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileHash != null && message.fileHash.length) + for (var i = 0; i < message.fileHash.length; ++i) + $root.google.devtools.cloudbuild.v1.Hash.encode(message.fileHash[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileHashes message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.FileHashes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {google.devtools.cloudbuild.v1.IFileHashes} message FileHashes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileHashes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileHashes message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.FileHashes} FileHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileHashes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.FileHashes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.google.devtools.cloudbuild.v1.Hash.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileHashes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.FileHashes} FileHashes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileHashes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileHashes message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileHashes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fileHash != null && message.hasOwnProperty("fileHash")) { + if (!Array.isArray(message.fileHash)) + return "fileHash: array expected"; + for (var i = 0; i < message.fileHash.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Hash.verify(message.fileHash[i]); + if (error) + return "fileHash." + error; + } + } + return null; + }; + + /** + * Creates a FileHashes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.FileHashes} FileHashes + */ + FileHashes.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.FileHashes) + return object; + var message = new $root.google.devtools.cloudbuild.v1.FileHashes(); + if (object.fileHash) { + if (!Array.isArray(object.fileHash)) + throw TypeError(".google.devtools.cloudbuild.v1.FileHashes.fileHash: array expected"); + message.fileHash = []; + for (var i = 0; i < object.fileHash.length; ++i) { + if (typeof object.fileHash[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.FileHashes.fileHash: object expected"); + message.fileHash[i] = $root.google.devtools.cloudbuild.v1.Hash.fromObject(object.fileHash[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileHashes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {google.devtools.cloudbuild.v1.FileHashes} message FileHashes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileHashes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileHash = []; + if (message.fileHash && message.fileHash.length) { + object.fileHash = []; + for (var j = 0; j < message.fileHash.length; ++j) + object.fileHash[j] = $root.google.devtools.cloudbuild.v1.Hash.toObject(message.fileHash[j], options); + } + return object; + }; + + /** + * Converts this FileHashes to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @instance + * @returns {Object.} JSON object + */ + FileHashes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileHashes; + })(); + + v1.Hash = (function() { + + /** + * Properties of a Hash. + * @memberof google.devtools.cloudbuild.v1 + * @interface IHash + * @property {google.devtools.cloudbuild.v1.Hash.HashType|null} [type] Hash type + * @property {Uint8Array|null} [value] Hash value + */ + + /** + * Constructs a new Hash. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Hash. + * @implements IHash + * @constructor + * @param {google.devtools.cloudbuild.v1.IHash=} [properties] Properties to set + */ + function Hash(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Hash type. + * @member {google.devtools.cloudbuild.v1.Hash.HashType} type + * @memberof google.devtools.cloudbuild.v1.Hash + * @instance + */ + Hash.prototype.type = 0; + + /** + * Hash value. + * @member {Uint8Array} value + * @memberof google.devtools.cloudbuild.v1.Hash + * @instance + */ + Hash.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Hash instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {google.devtools.cloudbuild.v1.IHash=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Hash} Hash instance + */ + Hash.create = function create(properties) { + return new Hash(properties); + }; + + /** + * Encodes the specified Hash message. Does not implicitly {@link google.devtools.cloudbuild.v1.Hash.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {google.devtools.cloudbuild.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Hash message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Hash.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {google.devtools.cloudbuild.v1.IHash} message Hash message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Hash.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Hash message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Hash(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Hash message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Hash} Hash + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Hash.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Hash message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Hash.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Hash message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Hash} Hash + */ + Hash.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Hash) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Hash(); + switch (object.type) { + case "NONE": + case 0: + message.type = 0; + break; + case "SHA256": + case 1: + message.type = 1; + break; + case "MD5": + case 2: + message.type = 2; + break; + } + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Hash message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {google.devtools.cloudbuild.v1.Hash} message Hash + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Hash.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "NONE" : 0; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.type] : message.type; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Hash to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Hash + * @instance + * @returns {Object.} JSON object + */ + Hash.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * HashType enum. + * @name google.devtools.cloudbuild.v1.Hash.HashType + * @enum {string} + * @property {number} NONE=0 NONE value + * @property {number} SHA256=1 SHA256 value + * @property {number} MD5=2 MD5 value + */ + Hash.HashType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SHA256"] = 1; + values[valuesById[2] = "MD5"] = 2; + return values; + })(); + + return Hash; + })(); + + v1.Secret = (function() { + + /** + * Properties of a Secret. + * @memberof google.devtools.cloudbuild.v1 + * @interface ISecret + * @property {string|null} [kmsKeyName] Secret kmsKeyName + * @property {Object.|null} [secretEnv] Secret secretEnv + */ + + /** + * Constructs a new Secret. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Secret. + * @implements ISecret + * @constructor + * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set + */ + function Secret(properties) { + this.secretEnv = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Secret kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.cloudbuild.v1.Secret + * @instance + */ + Secret.prototype.kmsKeyName = ""; + + /** + * Secret secretEnv. + * @member {Object.} secretEnv + * @memberof google.devtools.cloudbuild.v1.Secret + * @instance + */ + Secret.prototype.secretEnv = $util.emptyObject; + + /** + * Creates a new Secret instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Secret} Secret instance + */ + Secret.create = function create(properties) { + return new Secret(properties); + }; + + /** + * Encodes the specified Secret message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Secret.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) + for (var keys = Object.keys(message.secretEnv), 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).bytes(message.secretEnv[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Secret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Secret message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Secret} Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Secret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secret(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kmsKeyName = reader.string(); + break; + case 3: + reader.skip().pos++; + if (message.secretEnv === $util.emptyObject) + message.secretEnv = {}; + key = reader.string(); + reader.pos++; + message.secretEnv[key] = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Secret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Secret} Secret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Secret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Secret message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Secret.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!$util.isObject(message.secretEnv)) + return "secretEnv: object expected"; + var key = Object.keys(message.secretEnv); + for (var i = 0; i < key.length; ++i) + if (!(message.secretEnv[key[i]] && typeof message.secretEnv[key[i]].length === "number" || $util.isString(message.secretEnv[key[i]]))) + return "secretEnv: buffer{k:string} expected"; + } + return null; + }; + + /** + * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Secret} Secret + */ + Secret.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Secret) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Secret(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.secretEnv) { + if (typeof object.secretEnv !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Secret.secretEnv: object expected"); + message.secretEnv = {}; + for (var keys = Object.keys(object.secretEnv), i = 0; i < keys.length; ++i) + if (typeof object.secretEnv[keys[i]] === "string") + $util.base64.decode(object.secretEnv[keys[i]], message.secretEnv[keys[i]] = $util.newBuffer($util.base64.length(object.secretEnv[keys[i]])), 0); + else if (object.secretEnv[keys[i]].length) + message.secretEnv[keys[i]] = object.secretEnv[keys[i]]; + } + return message; + }; + + /** + * Creates a plain object from a Secret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {google.devtools.cloudbuild.v1.Secret} message Secret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Secret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.secretEnv = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + var keys2; + if (message.secretEnv && (keys2 = Object.keys(message.secretEnv)).length) { + object.secretEnv = {}; + for (var j = 0; j < keys2.length; ++j) + object.secretEnv[keys2[j]] = options.bytes === String ? $util.base64.encode(message.secretEnv[keys2[j]], 0, message.secretEnv[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.secretEnv[keys2[j]]) : message.secretEnv[keys2[j]]; + } + return object; + }; + + /** + * Converts this Secret to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Secret + * @instance + * @returns {Object.} JSON object + */ + Secret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Secret; + })(); + + v1.CreateBuildRequest = (function() { + + /** + * Properties of a CreateBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface ICreateBuildRequest + * @property {string|null} [projectId] CreateBuildRequest projectId + * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] CreateBuildRequest build + */ + + /** + * Constructs a new CreateBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CreateBuildRequest. + * @implements ICreateBuildRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set + */ + function CreateBuildRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @instance + */ + CreateBuildRequest.prototype.projectId = ""; + + /** + * CreateBuildRequest build. + * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @instance + */ + CreateBuildRequest.prototype.build = null; + + /** + * Creates a new CreateBuildRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest instance + */ + CreateBuildRequest.create = function create(properties) { + return new CreateBuildRequest(properties); + }; + + /** + * Encodes the specified CreateBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBuildRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.build != null && message.hasOwnProperty("build")) + $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBuildRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBuildRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBuildRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBuildRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBuildRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBuildRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.build != null && message.hasOwnProperty("build")) { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); + if (error) + return "build." + error; + } + return null; + }; + + /** + * Creates a CreateBuildRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + */ + CreateBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildRequest.build: object expected"); + message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); + } + return message; + }; + + /** + * Creates a plain object from a CreateBuildRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.CreateBuildRequest} message CreateBuildRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBuildRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.build = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.build != null && message.hasOwnProperty("build")) + object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); + return object; + }; + + /** + * Converts this CreateBuildRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBuildRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateBuildRequest; + })(); + + v1.GetBuildRequest = (function() { + + /** + * Properties of a GetBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGetBuildRequest + * @property {string|null} [projectId] GetBuildRequest projectId + * @property {string|null} [id] GetBuildRequest id + */ + + /** + * Constructs a new GetBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GetBuildRequest. + * @implements IGetBuildRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set + */ + function GetBuildRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @instance + */ + GetBuildRequest.prototype.projectId = ""; + + /** + * GetBuildRequest id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @instance + */ + GetBuildRequest.prototype.id = ""; + + /** + * Creates a new GetBuildRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest instance + */ + GetBuildRequest.create = function create(properties) { + return new GetBuildRequest(properties); + }; + + /** + * Encodes the specified GetBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBuildRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified GetBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBuildRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBuildRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBuildRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBuildRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBuildRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBuildRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a GetBuildRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + */ + GetBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a GetBuildRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.GetBuildRequest} message GetBuildRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBuildRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.id = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this GetBuildRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @instance + * @returns {Object.} JSON object + */ + GetBuildRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetBuildRequest; + })(); + + v1.ListBuildsRequest = (function() { + + /** + * Properties of a ListBuildsRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListBuildsRequest + * @property {string|null} [projectId] ListBuildsRequest projectId + * @property {number|null} [pageSize] ListBuildsRequest pageSize + * @property {string|null} [pageToken] ListBuildsRequest pageToken + * @property {string|null} [filter] ListBuildsRequest filter + */ + + /** + * Constructs a new ListBuildsRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListBuildsRequest. + * @implements IListBuildsRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set + */ + function ListBuildsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBuildsRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + */ + ListBuildsRequest.prototype.projectId = ""; + + /** + * ListBuildsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + */ + ListBuildsRequest.prototype.pageSize = 0; + + /** + * ListBuildsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + */ + ListBuildsRequest.prototype.pageToken = ""; + + /** + * ListBuildsRequest filter. + * @member {string} filter + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + */ + ListBuildsRequest.prototype.filter = ""; + + /** + * Creates a new ListBuildsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest instance + */ + ListBuildsRequest.create = function create(properties) { + return new ListBuildsRequest(properties); + }; + + /** + * Encodes the specified ListBuildsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListBuildsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBuildsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + case 8: + message.filter = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBuildsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBuildsRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBuildsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.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 ListBuildsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + */ + ListBuildsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + 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 ListBuildsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {google.devtools.cloudbuild.v1.ListBuildsRequest} message ListBuildsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBuildsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + 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 ListBuildsRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBuildsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBuildsRequest; + })(); + + v1.ListBuildsResponse = (function() { + + /** + * Properties of a ListBuildsResponse. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListBuildsResponse + * @property {Array.|null} [builds] ListBuildsResponse builds + * @property {string|null} [nextPageToken] ListBuildsResponse nextPageToken + */ + + /** + * Constructs a new ListBuildsResponse. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListBuildsResponse. + * @implements IListBuildsResponse + * @constructor + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set + */ + function ListBuildsResponse(properties) { + this.builds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBuildsResponse builds. + * @member {Array.} builds + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @instance + */ + ListBuildsResponse.prototype.builds = $util.emptyArray; + + /** + * ListBuildsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @instance + */ + ListBuildsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBuildsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse instance + */ + ListBuildsResponse.create = function create(properties) { + return new ListBuildsResponse(properties); + }; + + /** + * Encodes the specified ListBuildsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.builds != null && message.builds.length) + for (var i = 0; i < message.builds.length; ++i) + $root.google.devtools.cloudbuild.v1.Build.encode(message.builds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBuildsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBuildsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.builds && message.builds.length)) + message.builds = []; + message.builds.push($root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBuildsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBuildsResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBuildsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.builds != null && message.hasOwnProperty("builds")) { + if (!Array.isArray(message.builds)) + return "builds: array expected"; + for (var i = 0; i < message.builds.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.builds[i]); + if (error) + return "builds." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBuildsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + */ + ListBuildsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); + if (object.builds) { + if (!Array.isArray(object.builds)) + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: array expected"); + message.builds = []; + for (var i = 0; i < object.builds.length; ++i) { + if (typeof object.builds[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: object expected"); + message.builds[i] = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.builds[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBuildsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {google.devtools.cloudbuild.v1.ListBuildsResponse} message ListBuildsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBuildsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.builds = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.builds && message.builds.length) { + object.builds = []; + for (var j = 0; j < message.builds.length; ++j) + object.builds[j] = $root.google.devtools.cloudbuild.v1.Build.toObject(message.builds[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBuildsResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBuildsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBuildsResponse; + })(); + + v1.CancelBuildRequest = (function() { + + /** + * Properties of a CancelBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface ICancelBuildRequest + * @property {string|null} [projectId] CancelBuildRequest projectId + * @property {string|null} [id] CancelBuildRequest id + */ + + /** + * Constructs a new CancelBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CancelBuildRequest. + * @implements ICancelBuildRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set + */ + function CancelBuildRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @instance + */ + CancelBuildRequest.prototype.projectId = ""; + + /** + * CancelBuildRequest id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @instance + */ + CancelBuildRequest.prototype.id = ""; + + /** + * Creates a new CancelBuildRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest instance + */ + CancelBuildRequest.create = function create(properties) { + return new CancelBuildRequest(properties); + }; + + /** + * Encodes the specified CancelBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelBuildRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + return writer; + }; + + /** + * Encodes the specified CancelBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelBuildRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelBuildRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.id = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelBuildRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelBuildRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelBuildRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelBuildRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + return null; + }; + + /** + * Creates a CancelBuildRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + */ + CancelBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CancelBuildRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.id != null) + message.id = String(object.id); + return message; + }; + + /** + * Creates a plain object from a CancelBuildRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.CancelBuildRequest} message CancelBuildRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelBuildRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.id = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this CancelBuildRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @instance + * @returns {Object.} JSON object + */ + CancelBuildRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelBuildRequest; + })(); + + v1.BuildTrigger = (function() { + + /** + * Properties of a BuildTrigger. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildTrigger + * @property {string|null} [id] BuildTrigger id + * @property {string|null} [description] BuildTrigger description + * @property {string|null} [name] BuildTrigger name + * @property {Array.|null} [tags] BuildTrigger tags + * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [triggerTemplate] BuildTrigger triggerTemplate + * @property {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null} [github] BuildTrigger github + * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildTrigger build + * @property {string|null} [filename] BuildTrigger filename + * @property {google.protobuf.ITimestamp|null} [createTime] BuildTrigger createTime + * @property {boolean|null} [disabled] BuildTrigger disabled + * @property {Object.|null} [substitutions] BuildTrigger substitutions + * @property {Array.|null} [ignoredFiles] BuildTrigger ignoredFiles + * @property {Array.|null} [includedFiles] BuildTrigger includedFiles + */ + + /** + * Constructs a new BuildTrigger. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildTrigger. + * @implements IBuildTrigger + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set + */ + function BuildTrigger(properties) { + this.tags = []; + this.substitutions = {}; + this.ignoredFiles = []; + this.includedFiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildTrigger id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.id = ""; + + /** + * BuildTrigger description. + * @member {string} description + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.description = ""; + + /** + * BuildTrigger name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.name = ""; + + /** + * BuildTrigger tags. + * @member {Array.} tags + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.tags = $util.emptyArray; + + /** + * BuildTrigger triggerTemplate. + * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} triggerTemplate + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.triggerTemplate = null; + + /** + * BuildTrigger github. + * @member {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null|undefined} github + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.github = null; + + /** + * BuildTrigger build. + * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.build = null; + + /** + * BuildTrigger filename. + * @member {string} filename + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.filename = ""; + + /** + * BuildTrigger createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.createTime = null; + + /** + * BuildTrigger disabled. + * @member {boolean} disabled + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.disabled = false; + + /** + * BuildTrigger substitutions. + * @member {Object.} substitutions + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.substitutions = $util.emptyObject; + + /** + * BuildTrigger ignoredFiles. + * @member {Array.} ignoredFiles + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.ignoredFiles = $util.emptyArray; + + /** + * BuildTrigger includedFiles. + * @member {Array.} includedFiles + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.includedFiles = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BuildTrigger buildTemplate. + * @member {"build"|"filename"|undefined} buildTemplate + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + Object.defineProperty(BuildTrigger.prototype, "buildTemplate", { + get: $util.oneOfGetter($oneOfFields = ["build", "filename"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BuildTrigger instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger instance + */ + BuildTrigger.create = function create(properties) { + return new BuildTrigger(properties); + }; + + /** + * Encodes the specified BuildTrigger message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && message.hasOwnProperty("id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.build != null && message.hasOwnProperty("build")) + $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) + $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.triggerTemplate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filename != null && message.hasOwnProperty("filename")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.filename); + if (message.disabled != null && message.hasOwnProperty("disabled")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.disabled); + if (message.description != null && message.hasOwnProperty("description")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); + if (message.substitutions != null && message.hasOwnProperty("substitutions")) + for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); + if (message.github != null && message.hasOwnProperty("github")) + $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.encode(message.github, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.ignoredFiles != null && message.ignoredFiles.length) + for (var i = 0; i < message.ignoredFiles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.ignoredFiles[i]); + if (message.includedFiles != null && message.includedFiles.length) + for (var i = 0; i < message.includedFiles.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.includedFiles[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.name); + return writer; + }; + + /** + * Encodes the specified BuildTrigger message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(), key; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 10: + message.description = reader.string(); + break; + case 21: + message.name = reader.string(); + break; + case 19: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 7: + message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + case 13: + message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); + break; + case 4: + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + case 8: + message.filename = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.disabled = reader.bool(); + break; + case 11: + reader.skip().pos++; + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + key = reader.string(); + reader.pos++; + message.substitutions[key] = reader.string(); + break; + case 15: + if (!(message.ignoredFiles && message.ignoredFiles.length)) + message.ignoredFiles = []; + message.ignoredFiles.push(reader.string()); + break; + case 16: + if (!(message.includedFiles && message.includedFiles.length)) + message.includedFiles = []; + message.includedFiles.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildTrigger message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) { + var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.triggerTemplate); + if (error) + return "triggerTemplate." + error; + } + if (message.github != null && message.hasOwnProperty("github")) { + var error = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.verify(message.github); + if (error) + return "github." + error; + } + if (message.build != null && message.hasOwnProperty("build")) { + properties.buildTemplate = 1; + { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); + if (error) + return "build." + error; + } + } + if (message.filename != null && message.hasOwnProperty("filename")) { + if (properties.buildTemplate === 1) + return "buildTemplate: multiple values"; + properties.buildTemplate = 1; + if (!$util.isString(message.filename)) + return "filename: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.substitutions != null && message.hasOwnProperty("substitutions")) { + if (!$util.isObject(message.substitutions)) + return "substitutions: object expected"; + var key = Object.keys(message.substitutions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.substitutions[key[i]])) + return "substitutions: string{k:string} expected"; + } + if (message.ignoredFiles != null && message.hasOwnProperty("ignoredFiles")) { + if (!Array.isArray(message.ignoredFiles)) + return "ignoredFiles: array expected"; + for (var i = 0; i < message.ignoredFiles.length; ++i) + if (!$util.isString(message.ignoredFiles[i])) + return "ignoredFiles: string[] expected"; + } + if (message.includedFiles != null && message.hasOwnProperty("includedFiles")) { + if (!Array.isArray(message.includedFiles)) + return "includedFiles: array expected"; + for (var i = 0; i < message.includedFiles.length; ++i) + if (!$util.isString(message.includedFiles[i])) + return "includedFiles: string[] expected"; + } + return null; + }; + + /** + * Creates a BuildTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + */ + BuildTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildTrigger) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(); + if (object.id != null) + message.id = String(object.id); + if (object.description != null) + message.description = String(object.description); + if (object.name != null) + message.name = String(object.name); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.triggerTemplate != null) { + if (typeof object.triggerTemplate !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.triggerTemplate: object expected"); + message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.triggerTemplate); + } + if (object.github != null) { + if (typeof object.github !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.github: object expected"); + message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.fromObject(object.github); + } + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.build: object expected"); + message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); + } + if (object.filename != null) + message.filename = String(object.filename); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.substitutions) { + if (typeof object.substitutions !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.substitutions: object expected"); + message.substitutions = {}; + for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) + message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); + } + if (object.ignoredFiles) { + if (!Array.isArray(object.ignoredFiles)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.ignoredFiles: array expected"); + message.ignoredFiles = []; + for (var i = 0; i < object.ignoredFiles.length; ++i) + message.ignoredFiles[i] = String(object.ignoredFiles[i]); + } + if (object.includedFiles) { + if (!Array.isArray(object.includedFiles)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.includedFiles: array expected"); + message.includedFiles = []; + for (var i = 0; i < object.includedFiles.length; ++i) + message.includedFiles[i] = String(object.includedFiles[i]); + } + return message; + }; + + /** + * Creates a plain object from a BuildTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.BuildTrigger} message BuildTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredFiles = []; + object.includedFiles = []; + object.tags = []; + } + if (options.objects || options.defaults) + object.substitutions = {}; + if (options.defaults) { + object.id = ""; + object.createTime = null; + object.triggerTemplate = null; + object.disabled = false; + object.description = ""; + object.github = null; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.build != null && message.hasOwnProperty("build")) { + object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); + if (options.oneofs) + object.buildTemplate = "build"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) + object.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.triggerTemplate, options); + if (message.filename != null && message.hasOwnProperty("filename")) { + object.filename = message.filename; + if (options.oneofs) + object.buildTemplate = "filename"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { + object.substitutions = {}; + for (var j = 0; j < keys2.length; ++j) + object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; + } + if (message.github != null && message.hasOwnProperty("github")) + object.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.toObject(message.github, options); + if (message.ignoredFiles && message.ignoredFiles.length) { + object.ignoredFiles = []; + for (var j = 0; j < message.ignoredFiles.length; ++j) + object.ignoredFiles[j] = message.ignoredFiles[j]; + } + if (message.includedFiles && message.includedFiles.length) { + object.includedFiles = []; + for (var j = 0; j < message.includedFiles.length; ++j) + object.includedFiles[j] = message.includedFiles[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this BuildTrigger to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + * @returns {Object.} JSON object + */ + BuildTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BuildTrigger; + })(); + + v1.GitHubEventsConfig = (function() { + + /** + * Properties of a GitHubEventsConfig. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGitHubEventsConfig + * @property {number|Long|null} [installationId] GitHubEventsConfig installationId + * @property {string|null} [owner] GitHubEventsConfig owner + * @property {string|null} [name] GitHubEventsConfig name + * @property {google.devtools.cloudbuild.v1.IPullRequestFilter|null} [pullRequest] GitHubEventsConfig pullRequest + * @property {google.devtools.cloudbuild.v1.IPushFilter|null} [push] GitHubEventsConfig push + */ + + /** + * Constructs a new GitHubEventsConfig. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GitHubEventsConfig. + * @implements IGitHubEventsConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set + */ + function GitHubEventsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GitHubEventsConfig installationId. + * @member {number|Long} installationId + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.installationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GitHubEventsConfig owner. + * @member {string} owner + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.owner = ""; + + /** + * GitHubEventsConfig name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.name = ""; + + /** + * GitHubEventsConfig pullRequest. + * @member {google.devtools.cloudbuild.v1.IPullRequestFilter|null|undefined} pullRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.pullRequest = null; + + /** + * GitHubEventsConfig push. + * @member {google.devtools.cloudbuild.v1.IPushFilter|null|undefined} push + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.push = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GitHubEventsConfig event. + * @member {"pullRequest"|"push"|undefined} event + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + Object.defineProperty(GitHubEventsConfig.prototype, "event", { + get: $util.oneOfGetter($oneOfFields = ["pullRequest", "push"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GitHubEventsConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig instance + */ + GitHubEventsConfig.create = function create(properties) { + return new GitHubEventsConfig(properties); + }; + + /** + * Encodes the specified GitHubEventsConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubEventsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.installationId != null && message.hasOwnProperty("installationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.installationId); + if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) + $root.google.devtools.cloudbuild.v1.PullRequestFilter.encode(message.pullRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.push != null && message.hasOwnProperty("push")) + $root.google.devtools.cloudbuild.v1.PushFilter.encode(message.push, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.owner != null && message.hasOwnProperty("owner")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.owner); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified GitHubEventsConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GitHubEventsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GitHubEventsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubEventsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.installationId = reader.int64(); + break; + case 6: + message.owner = reader.string(); + break; + case 7: + message.name = reader.string(); + break; + case 4: + message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.decode(reader, reader.uint32()); + break; + case 5: + message.push = $root.google.devtools.cloudbuild.v1.PushFilter.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GitHubEventsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GitHubEventsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GitHubEventsConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GitHubEventsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.installationId != null && message.hasOwnProperty("installationId")) + if (!$util.isInteger(message.installationId) && !(message.installationId && $util.isInteger(message.installationId.low) && $util.isInteger(message.installationId.high))) + return "installationId: integer|Long expected"; + if (message.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { + properties.event = 1; + { + var error = $root.google.devtools.cloudbuild.v1.PullRequestFilter.verify(message.pullRequest); + if (error) + return "pullRequest." + error; + } + } + if (message.push != null && message.hasOwnProperty("push")) { + if (properties.event === 1) + return "event: multiple values"; + properties.event = 1; + { + var error = $root.google.devtools.cloudbuild.v1.PushFilter.verify(message.push); + if (error) + return "push." + error; + } + } + return null; + }; + + /** + * Creates a GitHubEventsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + */ + GitHubEventsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GitHubEventsConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); + if (object.installationId != null) + if ($util.Long) + (message.installationId = $util.Long.fromValue(object.installationId)).unsigned = false; + else if (typeof object.installationId === "string") + message.installationId = parseInt(object.installationId, 10); + else if (typeof object.installationId === "number") + message.installationId = object.installationId; + else if (typeof object.installationId === "object") + message.installationId = new $util.LongBits(object.installationId.low >>> 0, object.installationId.high >>> 0).toNumber(); + if (object.owner != null) + message.owner = String(object.owner); + if (object.name != null) + message.name = String(object.name); + if (object.pullRequest != null) { + if (typeof object.pullRequest !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.pullRequest: object expected"); + message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.fromObject(object.pullRequest); + } + if (object.push != null) { + if (typeof object.push !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.push: object expected"); + message.push = $root.google.devtools.cloudbuild.v1.PushFilter.fromObject(object.push); + } + return message; + }; + + /** + * Creates a plain object from a GitHubEventsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {google.devtools.cloudbuild.v1.GitHubEventsConfig} message GitHubEventsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GitHubEventsConfig.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.installationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.installationId = options.longs === String ? "0" : 0; + object.owner = ""; + object.name = ""; + } + if (message.installationId != null && message.hasOwnProperty("installationId")) + if (typeof message.installationId === "number") + object.installationId = options.longs === String ? String(message.installationId) : message.installationId; + else + object.installationId = options.longs === String ? $util.Long.prototype.toString.call(message.installationId) : options.longs === Number ? new $util.LongBits(message.installationId.low >>> 0, message.installationId.high >>> 0).toNumber() : message.installationId; + if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { + object.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.toObject(message.pullRequest, options); + if (options.oneofs) + object.event = "pullRequest"; + } + if (message.push != null && message.hasOwnProperty("push")) { + object.push = $root.google.devtools.cloudbuild.v1.PushFilter.toObject(message.push, options); + if (options.oneofs) + object.event = "push"; + } + if (message.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GitHubEventsConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + * @returns {Object.} JSON object + */ + GitHubEventsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GitHubEventsConfig; + })(); + + v1.PullRequestFilter = (function() { + + /** + * Properties of a PullRequestFilter. + * @memberof google.devtools.cloudbuild.v1 + * @interface IPullRequestFilter + * @property {string|null} [branch] PullRequestFilter branch + * @property {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null} [commentControl] PullRequestFilter commentControl + */ + + /** + * Constructs a new PullRequestFilter. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a PullRequestFilter. + * @implements IPullRequestFilter + * @constructor + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set + */ + function PullRequestFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PullRequestFilter branch. + * @member {string} branch + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + PullRequestFilter.prototype.branch = ""; + + /** + * PullRequestFilter commentControl. + * @member {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl} commentControl + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + PullRequestFilter.prototype.commentControl = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PullRequestFilter gitRef. + * @member {"branch"|undefined} gitRef + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + Object.defineProperty(PullRequestFilter.prototype, "gitRef", { + get: $util.oneOfGetter($oneOfFields = ["branch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullRequestFilter instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter instance + */ + PullRequestFilter.create = function create(properties) { + return new PullRequestFilter(properties); + }; + + /** + * Encodes the specified PullRequestFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullRequestFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branch != null && message.hasOwnProperty("branch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); + if (message.commentControl != null && message.hasOwnProperty("commentControl")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.commentControl); + return writer; + }; + + /** + * Encodes the specified PullRequestFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PullRequestFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PullRequestFilter message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullRequestFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.branch = reader.string(); + break; + case 5: + message.commentControl = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PullRequestFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PullRequestFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PullRequestFilter message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PullRequestFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.branch != null && message.hasOwnProperty("branch")) { + properties.gitRef = 1; + if (!$util.isString(message.branch)) + return "branch: string expected"; + } + if (message.commentControl != null && message.hasOwnProperty("commentControl")) + switch (message.commentControl) { + default: + return "commentControl: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a PullRequestFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + */ + PullRequestFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PullRequestFilter) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); + if (object.branch != null) + message.branch = String(object.branch); + switch (object.commentControl) { + case "COMMENTS_DISABLED": + case 0: + message.commentControl = 0; + break; + case "COMMENTS_ENABLED": + case 1: + message.commentControl = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a PullRequestFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {google.devtools.cloudbuild.v1.PullRequestFilter} message PullRequestFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PullRequestFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.commentControl = options.enums === String ? "COMMENTS_DISABLED" : 0; + if (message.branch != null && message.hasOwnProperty("branch")) { + object.branch = message.branch; + if (options.oneofs) + object.gitRef = "branch"; + } + if (message.commentControl != null && message.hasOwnProperty("commentControl")) + object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; + return object; + }; + + /** + * Converts this PullRequestFilter to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + * @returns {Object.} JSON object + */ + PullRequestFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CommentControl enum. + * @name google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl + * @enum {string} + * @property {number} COMMENTS_DISABLED=0 COMMENTS_DISABLED value + * @property {number} COMMENTS_ENABLED=1 COMMENTS_ENABLED value + */ + PullRequestFilter.CommentControl = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMMENTS_DISABLED"] = 0; + values[valuesById[1] = "COMMENTS_ENABLED"] = 1; + return values; + })(); + + return PullRequestFilter; + })(); + + v1.PushFilter = (function() { + + /** + * Properties of a PushFilter. + * @memberof google.devtools.cloudbuild.v1 + * @interface IPushFilter + * @property {string|null} [branch] PushFilter branch + * @property {string|null} [tag] PushFilter tag + */ + + /** + * Constructs a new PushFilter. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a PushFilter. + * @implements IPushFilter + * @constructor + * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set + */ + function PushFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PushFilter branch. + * @member {string} branch + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + */ + PushFilter.prototype.branch = ""; + + /** + * PushFilter tag. + * @member {string} tag + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + */ + PushFilter.prototype.tag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PushFilter gitRef. + * @member {"branch"|"tag"|undefined} gitRef + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + */ + Object.defineProperty(PushFilter.prototype, "gitRef", { + get: $util.oneOfGetter($oneOfFields = ["branch", "tag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PushFilter instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter instance + */ + PushFilter.create = function create(properties) { + return new PushFilter(properties); + }; + + /** + * Encodes the specified PushFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.branch != null && message.hasOwnProperty("branch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); + if (message.tag != null && message.hasOwnProperty("tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + return writer; + }; + + /** + * Encodes the specified PushFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PushFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PushFilter message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PushFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.branch = reader.string(); + break; + case 3: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PushFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PushFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PushFilter message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PushFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.branch != null && message.hasOwnProperty("branch")) { + properties.gitRef = 1; + if (!$util.isString(message.branch)) + return "branch: string expected"; + } + if (message.tag != null && message.hasOwnProperty("tag")) { + if (properties.gitRef === 1) + return "gitRef: multiple values"; + properties.gitRef = 1; + if (!$util.isString(message.tag)) + return "tag: string expected"; + } + return null; + }; + + /** + * Creates a PushFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + */ + PushFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PushFilter) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PushFilter(); + if (object.branch != null) + message.branch = String(object.branch); + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a PushFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {google.devtools.cloudbuild.v1.PushFilter} message PushFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PushFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.branch != null && message.hasOwnProperty("branch")) { + object.branch = message.branch; + if (options.oneofs) + object.gitRef = "branch"; + } + if (message.tag != null && message.hasOwnProperty("tag")) { + object.tag = message.tag; + if (options.oneofs) + object.gitRef = "tag"; + } + return object; + }; + + /** + * Converts this PushFilter to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + * @returns {Object.} JSON object + */ + PushFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PushFilter; + })(); + + v1.CreateBuildTriggerRequest = (function() { + + /** + * Properties of a CreateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface ICreateBuildTriggerRequest + * @property {string|null} [projectId] CreateBuildTriggerRequest projectId + * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] CreateBuildTriggerRequest trigger + */ + + /** + * Constructs a new CreateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CreateBuildTriggerRequest. + * @implements ICreateBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set + */ + function CreateBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @instance + */ + CreateBuildTriggerRequest.prototype.projectId = ""; + + /** + * CreateBuildTriggerRequest trigger. + * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @instance + */ + CreateBuildTriggerRequest.prototype.trigger = null; + + /** + * Creates a new CreateBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest instance + */ + CreateBuildTriggerRequest.create = function create(properties) { + return new CreateBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified CreateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates a CreateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + */ + CreateBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.trigger: object expected"); + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from a CreateBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} message CreateBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.trigger = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + return object; + }; + + /** + * Converts this CreateBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + CreateBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateBuildTriggerRequest; + })(); + + v1.GetBuildTriggerRequest = (function() { + + /** + * Properties of a GetBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGetBuildTriggerRequest + * @property {string|null} [projectId] GetBuildTriggerRequest projectId + * @property {string|null} [triggerId] GetBuildTriggerRequest triggerId + */ + + /** + * Constructs a new GetBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GetBuildTriggerRequest. + * @implements IGetBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set + */ + function GetBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @instance + */ + GetBuildTriggerRequest.prototype.projectId = ""; + + /** + * GetBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @instance + */ + GetBuildTriggerRequest.prototype.triggerId = ""; + + /** + * Creates a new GetBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest instance + */ + GetBuildTriggerRequest.create = function create(properties) { + return new GetBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified GetBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + return writer; + }; + + /** + * Encodes the specified GetBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.triggerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + return null; + }; + + /** + * Creates a GetBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + */ + GetBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + return message; + }; + + /** + * Creates a plain object from a GetBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} message GetBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.triggerId = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + return object; + }; + + /** + * Converts this GetBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + GetBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetBuildTriggerRequest; + })(); + + v1.ListBuildTriggersRequest = (function() { + + /** + * Properties of a ListBuildTriggersRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListBuildTriggersRequest + * @property {string|null} [projectId] ListBuildTriggersRequest projectId + * @property {number|null} [pageSize] ListBuildTriggersRequest pageSize + * @property {string|null} [pageToken] ListBuildTriggersRequest pageToken + */ + + /** + * Constructs a new ListBuildTriggersRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListBuildTriggersRequest. + * @implements IListBuildTriggersRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set + */ + function ListBuildTriggersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBuildTriggersRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @instance + */ + ListBuildTriggersRequest.prototype.projectId = ""; + + /** + * ListBuildTriggersRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @instance + */ + ListBuildTriggersRequest.prototype.pageSize = 0; + + /** + * ListBuildTriggersRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @instance + */ + ListBuildTriggersRequest.prototype.pageToken = ""; + + /** + * Creates a new ListBuildTriggersRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest instance + */ + ListBuildTriggersRequest.create = function create(properties) { + return new ListBuildTriggersRequest(properties); + }; + + /** + * Encodes the specified ListBuildTriggersRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildTriggersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListBuildTriggersRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBuildTriggersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildTriggersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = 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 ListBuildTriggersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBuildTriggersRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBuildTriggersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.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 ListBuildTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + */ + ListBuildTriggersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + 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 ListBuildTriggersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} message ListBuildTriggersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBuildTriggersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + 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 ListBuildTriggersRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @instance + * @returns {Object.} JSON object + */ + ListBuildTriggersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBuildTriggersRequest; + })(); + + v1.ListBuildTriggersResponse = (function() { + + /** + * Properties of a ListBuildTriggersResponse. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListBuildTriggersResponse + * @property {Array.|null} [triggers] ListBuildTriggersResponse triggers + * @property {string|null} [nextPageToken] ListBuildTriggersResponse nextPageToken + */ + + /** + * Constructs a new ListBuildTriggersResponse. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListBuildTriggersResponse. + * @implements IListBuildTriggersResponse + * @constructor + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set + */ + function ListBuildTriggersResponse(properties) { + this.triggers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBuildTriggersResponse triggers. + * @member {Array.} triggers + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @instance + */ + ListBuildTriggersResponse.prototype.triggers = $util.emptyArray; + + /** + * ListBuildTriggersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @instance + */ + ListBuildTriggersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBuildTriggersResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse instance + */ + ListBuildTriggersResponse.create = function create(properties) { + return new ListBuildTriggersResponse(properties); + }; + + /** + * Encodes the specified ListBuildTriggersResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildTriggersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triggers != null && message.triggers.length) + for (var i = 0; i < message.triggers.length; ++i) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.triggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBuildTriggersResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBuildTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildTriggersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBuildTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBuildTriggersResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBuildTriggersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triggers != null && message.hasOwnProperty("triggers")) { + if (!Array.isArray(message.triggers)) + return "triggers: array expected"; + for (var i = 0; i < message.triggers.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.triggers[i]); + if (error) + return "triggers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBuildTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + */ + ListBuildTriggersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); + if (object.triggers) { + if (!Array.isArray(object.triggers)) + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: array expected"); + message.triggers = []; + for (var i = 0; i < object.triggers.length; ++i) { + if (typeof object.triggers[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: object expected"); + message.triggers[i] = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.triggers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBuildTriggersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} message ListBuildTriggersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBuildTriggersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triggers = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.triggers && message.triggers.length) { + object.triggers = []; + for (var j = 0; j < message.triggers.length; ++j) + object.triggers[j] = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.triggers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBuildTriggersResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @instance + * @returns {Object.} JSON object + */ + ListBuildTriggersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBuildTriggersResponse; + })(); + + v1.DeleteBuildTriggerRequest = (function() { + + /** + * Properties of a DeleteBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IDeleteBuildTriggerRequest + * @property {string|null} [projectId] DeleteBuildTriggerRequest projectId + * @property {string|null} [triggerId] DeleteBuildTriggerRequest triggerId + */ + + /** + * Constructs a new DeleteBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a DeleteBuildTriggerRequest. + * @implements IDeleteBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set + */ + function DeleteBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @instance + */ + DeleteBuildTriggerRequest.prototype.projectId = ""; + + /** + * DeleteBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @instance + */ + DeleteBuildTriggerRequest.prototype.triggerId = ""; + + /** + * Creates a new DeleteBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest instance + */ + DeleteBuildTriggerRequest.create = function create(properties) { + return new DeleteBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified DeleteBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + return writer; + }; + + /** + * Encodes the specified DeleteBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.triggerId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + return null; + }; + + /** + * Creates a DeleteBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + */ + DeleteBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + return message; + }; + + /** + * Creates a plain object from a DeleteBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} message DeleteBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.triggerId = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + return object; + }; + + /** + * Converts this DeleteBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteBuildTriggerRequest; + })(); + + v1.UpdateBuildTriggerRequest = (function() { + + /** + * Properties of an UpdateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IUpdateBuildTriggerRequest + * @property {string|null} [projectId] UpdateBuildTriggerRequest projectId + * @property {string|null} [triggerId] UpdateBuildTriggerRequest triggerId + * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] UpdateBuildTriggerRequest trigger + */ + + /** + * Constructs a new UpdateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an UpdateBuildTriggerRequest. + * @implements IUpdateBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set + */ + function UpdateBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.projectId = ""; + + /** + * UpdateBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.triggerId = ""; + + /** + * UpdateBuildTriggerRequest trigger. + * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.trigger = null; + + /** + * Creates a new UpdateBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest instance + */ + UpdateBuildTriggerRequest.create = function create(properties) { + return new UpdateBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified UpdateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.trigger != null && message.hasOwnProperty("trigger")) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.triggerId = reader.string(); + break; + case 3: + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); + if (error) + return "trigger." + error; + } + return null; + }; + + /** + * Creates an UpdateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + */ + UpdateBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.trigger: object expected"); + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} message UpdateBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.triggerId = ""; + object.trigger = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + return object; + }; + + /** + * Converts this UpdateBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateBuildTriggerRequest; + })(); + + v1.BuildOptions = (function() { + + /** + * Properties of a BuildOptions. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildOptions + * @property {Array.|null} [sourceProvenanceHash] BuildOptions sourceProvenanceHash + * @property {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null} [requestedVerifyOption] BuildOptions requestedVerifyOption + * @property {google.devtools.cloudbuild.v1.BuildOptions.MachineType|null} [machineType] BuildOptions machineType + * @property {number|Long|null} [diskSizeGb] BuildOptions diskSizeGb + * @property {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null} [substitutionOption] BuildOptions substitutionOption + * @property {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null} [logStreamingOption] BuildOptions logStreamingOption + * @property {string|null} [workerPool] BuildOptions workerPool + * @property {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null} [logging] BuildOptions logging + * @property {Array.|null} [env] BuildOptions env + * @property {Array.|null} [secretEnv] BuildOptions secretEnv + * @property {Array.|null} [volumes] BuildOptions volumes + */ + + /** + * Constructs a new BuildOptions. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildOptions. + * @implements IBuildOptions + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set + */ + function BuildOptions(properties) { + this.sourceProvenanceHash = []; + this.env = []; + this.secretEnv = []; + this.volumes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildOptions sourceProvenanceHash. + * @member {Array.} sourceProvenanceHash + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.sourceProvenanceHash = $util.emptyArray; + + /** + * BuildOptions requestedVerifyOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption} requestedVerifyOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.requestedVerifyOption = 0; + + /** + * BuildOptions machineType. + * @member {google.devtools.cloudbuild.v1.BuildOptions.MachineType} machineType + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.machineType = 0; + + /** + * BuildOptions diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BuildOptions substitutionOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption} substitutionOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.substitutionOption = 0; + + /** + * BuildOptions logStreamingOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption} logStreamingOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.logStreamingOption = 0; + + /** + * BuildOptions workerPool. + * @member {string} workerPool + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.workerPool = ""; + + /** + * BuildOptions logging. + * @member {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode} logging + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.logging = 0; + + /** + * BuildOptions env. + * @member {Array.} env + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.env = $util.emptyArray; + + /** + * BuildOptions secretEnv. + * @member {Array.} secretEnv + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.secretEnv = $util.emptyArray; + + /** + * BuildOptions volumes. + * @member {Array.} volumes + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.volumes = $util.emptyArray; + + /** + * Creates a new BuildOptions instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions instance + */ + BuildOptions.create = function create(properties) { + return new BuildOptions(properties); + }; + + /** + * Encodes the specified BuildOptions message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceProvenanceHash != null && message.sourceProvenanceHash.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.sourceProvenanceHash.length; ++i) + writer.int32(message.sourceProvenanceHash[i]); + writer.ldelim(); + } + if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.requestedVerifyOption); + if (message.machineType != null && message.hasOwnProperty("machineType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.machineType); + if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.substitutionOption); + if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.logStreamingOption); + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.diskSizeGb); + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.workerPool); + if (message.logging != null && message.hasOwnProperty("logging")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logging); + if (message.env != null && message.env.length) + for (var i = 0; i < message.env.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.env[i]); + if (message.secretEnv != null && message.secretEnv.length) + for (var i = 0; i < message.secretEnv.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.secretEnv[i]); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuildOptions message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildOptions message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sourceProvenanceHash && message.sourceProvenanceHash.length)) + message.sourceProvenanceHash = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sourceProvenanceHash.push(reader.int32()); + } else + message.sourceProvenanceHash.push(reader.int32()); + break; + case 2: + message.requestedVerifyOption = reader.int32(); + break; + case 3: + message.machineType = reader.int32(); + break; + case 6: + message.diskSizeGb = reader.int64(); + break; + case 4: + message.substitutionOption = reader.int32(); + break; + case 5: + message.logStreamingOption = reader.int32(); + break; + case 7: + message.workerPool = reader.string(); + break; + case 11: + message.logging = reader.int32(); + break; + case 12: + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); + break; + case 13: + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + case 14: + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildOptions message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceProvenanceHash != null && message.hasOwnProperty("sourceProvenanceHash")) { + if (!Array.isArray(message.sourceProvenanceHash)) + return "sourceProvenanceHash: array expected"; + for (var i = 0; i < message.sourceProvenanceHash.length; ++i) + switch (message.sourceProvenanceHash[i]) { + default: + return "sourceProvenanceHash: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + switch (message.requestedVerifyOption) { + default: + return "requestedVerifyOption: enum value expected"; + case 0: + case 1: + break; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + switch (message.machineType) { + default: + return "machineType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + switch (message.substitutionOption) { + default: + return "substitutionOption: enum value expected"; + case 0: + case 1: + break; + } + if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + switch (message.logStreamingOption) { + default: + return "logStreamingOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.logging != null && message.hasOwnProperty("logging")) + switch (message.logging) { + default: + return "logging: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.env != null && message.hasOwnProperty("env")) { + if (!Array.isArray(message.env)) + return "env: array expected"; + for (var i = 0; i < message.env.length; ++i) + if (!$util.isString(message.env[i])) + return "env: string[] expected"; + } + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!Array.isArray(message.secretEnv)) + return "secretEnv: array expected"; + for (var i = 0; i < message.secretEnv.length; ++i) + if (!$util.isString(message.secretEnv[i])) + return "secretEnv: string[] expected"; + } + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + return null; + }; + + /** + * Creates a BuildOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + */ + BuildOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildOptions) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); + if (object.sourceProvenanceHash) { + if (!Array.isArray(object.sourceProvenanceHash)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.sourceProvenanceHash: array expected"); + message.sourceProvenanceHash = []; + for (var i = 0; i < object.sourceProvenanceHash.length; ++i) + switch (object.sourceProvenanceHash[i]) { + default: + case "NONE": + case 0: + message.sourceProvenanceHash[i] = 0; + break; + case "SHA256": + case 1: + message.sourceProvenanceHash[i] = 1; + break; + case "MD5": + case 2: + message.sourceProvenanceHash[i] = 2; + break; + } + } + switch (object.requestedVerifyOption) { + case "NOT_VERIFIED": + case 0: + message.requestedVerifyOption = 0; + break; + case "VERIFIED": + case 1: + message.requestedVerifyOption = 1; + break; + } + switch (object.machineType) { + case "UNSPECIFIED": + case 0: + message.machineType = 0; + break; + case "N1_HIGHCPU_8": + case 1: + message.machineType = 1; + break; + case "N1_HIGHCPU_32": + case 2: + message.machineType = 2; + break; + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.substitutionOption) { + case "MUST_MATCH": + case 0: + message.substitutionOption = 0; + break; + case "ALLOW_LOOSE": + case 1: + message.substitutionOption = 1; + break; + } + switch (object.logStreamingOption) { + case "STREAM_DEFAULT": + case 0: + message.logStreamingOption = 0; + break; + case "STREAM_ON": + case 1: + message.logStreamingOption = 1; + break; + case "STREAM_OFF": + case 2: + message.logStreamingOption = 2; + break; + } + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + switch (object.logging) { + case "LOGGING_UNSPECIFIED": + case 0: + message.logging = 0; + break; + case "LEGACY": + case 1: + message.logging = 1; + break; + case "GCS_ONLY": + case 2: + message.logging = 2; + break; + } + if (object.env) { + if (!Array.isArray(object.env)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.env: array expected"); + message.env = []; + for (var i = 0; i < object.env.length; ++i) + message.env[i] = String(object.env[i]); + } + if (object.secretEnv) { + if (!Array.isArray(object.secretEnv)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.secretEnv: array expected"); + message.secretEnv = []; + for (var i = 0; i < object.secretEnv.length; ++i) + message.secretEnv[i] = String(object.secretEnv[i]); + } + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: object expected"); + message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BuildOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions} message BuildOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sourceProvenanceHash = []; + object.env = []; + object.secretEnv = []; + object.volumes = []; + } + if (options.defaults) { + object.requestedVerifyOption = options.enums === String ? "NOT_VERIFIED" : 0; + object.machineType = options.enums === String ? "UNSPECIFIED" : 0; + object.substitutionOption = options.enums === String ? "MUST_MATCH" : 0; + object.logStreamingOption = options.enums === String ? "STREAM_DEFAULT" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + object.workerPool = ""; + object.logging = options.enums === String ? "LOGGING_UNSPECIFIED" : 0; + } + if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { + object.sourceProvenanceHash = []; + for (var j = 0; j < message.sourceProvenanceHash.length; ++j) + object.sourceProvenanceHash[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] : message.sourceProvenanceHash[j]; + } + if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + object.requestedVerifyOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] : message.requestedVerifyOption; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] : message.machineType; + if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + object.substitutionOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] : message.substitutionOption; + if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + object.logStreamingOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] : message.logStreamingOption; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.logging != null && message.hasOwnProperty("logging")) + object.logging = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] : message.logging; + if (message.env && message.env.length) { + object.env = []; + for (var j = 0; j < message.env.length; ++j) + object.env[j] = message.env[j]; + } + if (message.secretEnv && message.secretEnv.length) { + object.secretEnv = []; + for (var j = 0; j < message.secretEnv.length; ++j) + object.secretEnv[j] = message.secretEnv[j]; + } + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); + } + return object; + }; + + /** + * Converts this BuildOptions to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + * @returns {Object.} JSON object + */ + BuildOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VerifyOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.VerifyOption + * @enum {string} + * @property {number} NOT_VERIFIED=0 NOT_VERIFIED value + * @property {number} VERIFIED=1 VERIFIED value + */ + BuildOptions.VerifyOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_VERIFIED"] = 0; + values[valuesById[1] = "VERIFIED"] = 1; + return values; + })(); + + /** + * MachineType enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.MachineType + * @enum {string} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} N1_HIGHCPU_8=1 N1_HIGHCPU_8 value + * @property {number} N1_HIGHCPU_32=2 N1_HIGHCPU_32 value + */ + BuildOptions.MachineType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "N1_HIGHCPU_8"] = 1; + values[valuesById[2] = "N1_HIGHCPU_32"] = 2; + return values; + })(); + + /** + * SubstitutionOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption + * @enum {string} + * @property {number} MUST_MATCH=0 MUST_MATCH value + * @property {number} ALLOW_LOOSE=1 ALLOW_LOOSE value + */ + BuildOptions.SubstitutionOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MUST_MATCH"] = 0; + values[valuesById[1] = "ALLOW_LOOSE"] = 1; + return values; + })(); + + /** + * LogStreamingOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption + * @enum {string} + * @property {number} STREAM_DEFAULT=0 STREAM_DEFAULT value + * @property {number} STREAM_ON=1 STREAM_ON value + * @property {number} STREAM_OFF=2 STREAM_OFF value + */ + BuildOptions.LogStreamingOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STREAM_DEFAULT"] = 0; + values[valuesById[1] = "STREAM_ON"] = 1; + values[valuesById[2] = "STREAM_OFF"] = 2; + return values; + })(); + + /** + * LoggingMode enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.LoggingMode + * @enum {string} + * @property {number} LOGGING_UNSPECIFIED=0 LOGGING_UNSPECIFIED value + * @property {number} LEGACY=1 LEGACY value + * @property {number} GCS_ONLY=2 GCS_ONLY value + */ + BuildOptions.LoggingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOGGING_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY"] = 1; + values[valuesById[2] = "GCS_ONLY"] = 2; + return values; + })(); + + return BuildOptions; + })(); + + v1.WorkerPool = (function() { + + /** + * Properties of a WorkerPool. + * @memberof google.devtools.cloudbuild.v1 + * @interface IWorkerPool + * @property {string|null} [name] WorkerPool name + * @property {string|null} [projectId] WorkerPool projectId + * @property {string|null} [serviceAccountEmail] WorkerPool serviceAccountEmail + * @property {number|Long|null} [workerCount] WorkerPool workerCount + * @property {google.devtools.cloudbuild.v1.IWorkerConfig|null} [workerConfig] WorkerPool workerConfig + * @property {Array.|null} [regions] WorkerPool regions + * @property {google.protobuf.ITimestamp|null} [createTime] WorkerPool createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] WorkerPool updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] WorkerPool deleteTime + * @property {google.devtools.cloudbuild.v1.WorkerPool.Status|null} [status] WorkerPool status + */ + + /** + * Constructs a new WorkerPool. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a WorkerPool. + * @implements IWorkerPool + * @constructor + * @param {google.devtools.cloudbuild.v1.IWorkerPool=} [properties] Properties to set + */ + function WorkerPool(properties) { + this.regions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkerPool name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.name = ""; + + /** + * WorkerPool projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.projectId = ""; + + /** + * WorkerPool serviceAccountEmail. + * @member {string} serviceAccountEmail + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.serviceAccountEmail = ""; + + /** + * WorkerPool workerCount. + * @member {number|Long} workerCount + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.workerCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * WorkerPool workerConfig. + * @member {google.devtools.cloudbuild.v1.IWorkerConfig|null|undefined} workerConfig + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.workerConfig = null; + + /** + * WorkerPool regions. + * @member {Array.} regions + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.regions = $util.emptyArray; + + /** + * WorkerPool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.createTime = null; + + /** + * WorkerPool updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.updateTime = null; + + /** + * WorkerPool deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.deleteTime = null; + + /** + * WorkerPool status. + * @member {google.devtools.cloudbuild.v1.WorkerPool.Status} status + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.status = 0; + + /** + * Creates a new WorkerPool instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerPool=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.WorkerPool} WorkerPool instance + */ + WorkerPool.create = function create(properties) { + return new WorkerPool(properties); + }; + + /** + * Encodes the specified WorkerPool message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerPool.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerPool} message WorkerPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); + if (message.workerCount != null && message.hasOwnProperty("workerCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.workerCount); + if (message.regions != null && message.regions.length) { + writer.uint32(/* id 9, wireType 2 =*/74).fork(); + for (var i = 0; i < message.regions.length; ++i) + writer.int32(message.regions[i]); + writer.ldelim(); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.status != null && message.hasOwnProperty("status")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.status); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.name); + if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) + $root.google.devtools.cloudbuild.v1.WorkerConfig.encode(message.workerConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkerPool message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerPool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerPool} message WorkerPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkerPool message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.WorkerPool} WorkerPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WorkerPool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 14: + message.name = reader.string(); + break; + case 2: + message.projectId = reader.string(); + break; + case 3: + message.serviceAccountEmail = reader.string(); + break; + case 4: + message.workerCount = reader.int64(); + break; + case 16: + message.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.regions && message.regions.length)) + message.regions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.regions.push(reader.int32()); + } else + message.regions.push(reader.int32()); + break; + case 11: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 12: + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.status = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkerPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.WorkerPool} WorkerPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerPool message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerPool.verify = function verify(message) { + if (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.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + if (!$util.isString(message.serviceAccountEmail)) + return "serviceAccountEmail: string expected"; + if (message.workerCount != null && message.hasOwnProperty("workerCount")) + if (!$util.isInteger(message.workerCount) && !(message.workerCount && $util.isInteger(message.workerCount.low) && $util.isInteger(message.workerCount.high))) + return "workerCount: integer|Long expected"; + if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) { + var error = $root.google.devtools.cloudbuild.v1.WorkerConfig.verify(message.workerConfig); + if (error) + return "workerConfig." + error; + } + if (message.regions != null && message.hasOwnProperty("regions")) { + if (!Array.isArray(message.regions)) + return "regions: array expected"; + for (var i = 0; i < message.regions.length; ++i) + switch (message.regions[i]) { + default: + return "regions: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a WorkerPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.WorkerPool} WorkerPool + */ + WorkerPool.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.WorkerPool) + return object; + var message = new $root.google.devtools.cloudbuild.v1.WorkerPool(); + if (object.name != null) + message.name = String(object.name); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.serviceAccountEmail != null) + message.serviceAccountEmail = String(object.serviceAccountEmail); + if (object.workerCount != null) + if ($util.Long) + (message.workerCount = $util.Long.fromValue(object.workerCount)).unsigned = false; + else if (typeof object.workerCount === "string") + message.workerCount = parseInt(object.workerCount, 10); + else if (typeof object.workerCount === "number") + message.workerCount = object.workerCount; + else if (typeof object.workerCount === "object") + message.workerCount = new $util.LongBits(object.workerCount.low >>> 0, object.workerCount.high >>> 0).toNumber(); + if (object.workerConfig != null) { + if (typeof object.workerConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.workerConfig: object expected"); + message.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.fromObject(object.workerConfig); + } + if (object.regions) { + if (!Array.isArray(object.regions)) + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.regions: array expected"); + message.regions = []; + for (var i = 0; i < object.regions.length; ++i) + switch (object.regions[i]) { + default: + case "REGION_UNSPECIFIED": + case 0: + message.regions[i] = 0; + break; + case "US_CENTRAL1": + case 1: + message.regions[i] = 1; + break; + case "US_WEST1": + case 2: + message.regions[i] = 2; + break; + case "US_EAST1": + case 3: + message.regions[i] = 3; + break; + case "US_EAST4": + case 4: + message.regions[i] = 4; + break; + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + switch (object.status) { + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "CREATING": + case 1: + message.status = 1; + break; + case "RUNNING": + case 2: + message.status = 2; + break; + case "DELETING": + case 3: + message.status = 3; + break; + case "DELETED": + case 4: + message.status = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a WorkerPool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {google.devtools.cloudbuild.v1.WorkerPool} message WorkerPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.regions = []; + if (options.defaults) { + object.projectId = ""; + object.serviceAccountEmail = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.workerCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.workerCount = options.longs === String ? "0" : 0; + object.createTime = null; + object.deleteTime = null; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.name = ""; + object.workerConfig = null; + object.updateTime = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + object.serviceAccountEmail = message.serviceAccountEmail; + if (message.workerCount != null && message.hasOwnProperty("workerCount")) + if (typeof message.workerCount === "number") + object.workerCount = options.longs === String ? String(message.workerCount) : message.workerCount; + else + object.workerCount = options.longs === String ? $util.Long.prototype.toString.call(message.workerCount) : options.longs === Number ? new $util.LongBits(message.workerCount.low >>> 0, message.workerCount.high >>> 0).toNumber() : message.workerCount; + if (message.regions && message.regions.length) { + object.regions = []; + for (var j = 0; j < message.regions.length; ++j) + object.regions[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.Region[message.regions[j]] : message.regions[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.Status[message.status] : message.status; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) + object.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.toObject(message.workerConfig, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this WorkerPool to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + * @returns {Object.} JSON object + */ + WorkerPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Region enum. + * @name google.devtools.cloudbuild.v1.WorkerPool.Region + * @enum {string} + * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value + * @property {number} US_CENTRAL1=1 US_CENTRAL1 value + * @property {number} US_WEST1=2 US_WEST1 value + * @property {number} US_EAST1=3 US_EAST1 value + * @property {number} US_EAST4=4 US_EAST4 value + */ + WorkerPool.Region = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; + values[valuesById[1] = "US_CENTRAL1"] = 1; + values[valuesById[2] = "US_WEST1"] = 2; + values[valuesById[3] = "US_EAST1"] = 3; + values[valuesById[4] = "US_EAST4"] = 4; + return values; + })(); + + /** + * Status enum. + * @name google.devtools.cloudbuild.v1.WorkerPool.Status + * @enum {string} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DELETING=3 DELETING value + * @property {number} DELETED=4 DELETED value + */ + WorkerPool.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "DELETED"] = 4; + return values; + })(); + + return WorkerPool; + })(); + + v1.WorkerConfig = (function() { + + /** + * Properties of a WorkerConfig. + * @memberof google.devtools.cloudbuild.v1 + * @interface IWorkerConfig + * @property {string|null} [machineType] WorkerConfig machineType + * @property {number|Long|null} [diskSizeGb] WorkerConfig diskSizeGb + * @property {google.devtools.cloudbuild.v1.INetwork|null} [network] WorkerConfig network + * @property {string|null} [tag] WorkerConfig tag + */ + + /** + * Constructs a new WorkerConfig. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a WorkerConfig. + * @implements IWorkerConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.IWorkerConfig=} [properties] Properties to set + */ + function WorkerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkerConfig machineType. + * @member {string} machineType + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @instance + */ + WorkerConfig.prototype.machineType = ""; + + /** + * WorkerConfig diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @instance + */ + WorkerConfig.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * WorkerConfig network. + * @member {google.devtools.cloudbuild.v1.INetwork|null|undefined} network + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @instance + */ + WorkerConfig.prototype.network = null; + + /** + * WorkerConfig tag. + * @member {string} tag + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @instance + */ + WorkerConfig.prototype.tag = ""; + + /** + * Creates a new WorkerConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig instance + */ + WorkerConfig.create = function create(properties) { + return new WorkerConfig(properties); + }; + + /** + * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && message.hasOwnProperty("machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diskSizeGb); + if (message.network != null && message.hasOwnProperty("network")) + $root.google.devtools.cloudbuild.v1.Network.encode(message.network, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tag != null && message.hasOwnProperty("tag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tag); + return writer; + }; + + /** + * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WorkerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + case 2: + message.diskSizeGb = reader.int64(); + break; + case 3: + message.network = $root.google.devtools.cloudbuild.v1.Network.decode(reader, reader.uint32()); + break; + case 4: + message.tag = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + if (message.network != null && message.hasOwnProperty("network")) { + var error = $root.google.devtools.cloudbuild.v1.Network.verify(message.network); + if (error) + return "network." + error; + } + if (message.tag != null && message.hasOwnProperty("tag")) + if (!$util.isString(message.tag)) + return "tag: string expected"; + return null; + }; + + /** + * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + */ + WorkerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.WorkerConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.WorkerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + if (object.network != null) { + if (typeof object.network !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerConfig.network: object expected"); + message.network = $root.google.devtools.cloudbuild.v1.Network.fromObject(object.network); + } + if (object.tag != null) + message.tag = String(object.tag); + return message; + }; + + /** + * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.WorkerConfig} message WorkerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + object.network = null; + object.tag = ""; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (message.network != null && message.hasOwnProperty("network")) + object.network = $root.google.devtools.cloudbuild.v1.Network.toObject(message.network, options); + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = message.tag; + return object; + }; + + /** + * Converts this WorkerConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @instance + * @returns {Object.} JSON object + */ + WorkerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WorkerConfig; + })(); + + v1.Network = (function() { + + /** + * Properties of a Network. + * @memberof google.devtools.cloudbuild.v1 + * @interface INetwork + * @property {string|null} [projectId] Network projectId + * @property {string|null} [network] Network network + * @property {string|null} [subnetwork] Network subnetwork + */ + + /** + * Constructs a new Network. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Network. + * @implements INetwork + * @constructor + * @param {google.devtools.cloudbuild.v1.INetwork=} [properties] Properties to set + */ + function Network(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Network projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.Network + * @instance + */ + Network.prototype.projectId = ""; + + /** + * Network network. + * @member {string} network + * @memberof google.devtools.cloudbuild.v1.Network + * @instance + */ + Network.prototype.network = ""; + + /** + * Network subnetwork. + * @member {string} subnetwork + * @memberof google.devtools.cloudbuild.v1.Network + * @instance + */ + Network.prototype.subnetwork = ""; + + /** + * Creates a new Network instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {google.devtools.cloudbuild.v1.INetwork=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Network} Network instance + */ + Network.create = function create(properties) { + return new Network(properties); + }; + + /** + * Encodes the specified Network message. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {google.devtools.cloudbuild.v1.INetwork} message Network message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Network.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && message.hasOwnProperty("projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.network != null && message.hasOwnProperty("network")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetwork); + return writer; + }; + + /** + * Encodes the specified Network message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {google.devtools.cloudbuild.v1.INetwork} message Network message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Network.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Network message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Network} Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Network.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Network(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.network = reader.string(); + break; + case 3: + message.subnetwork = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Network message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Network} Network + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Network.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Network message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Network.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + return null; + }; + + /** + * Creates a Network message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Network} Network + */ + Network.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Network) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Network(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + return message; + }; + + /** + * Creates a plain object from a Network message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Network + * @static + * @param {google.devtools.cloudbuild.v1.Network} message Network + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Network.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.network = ""; + object.subnetwork = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + return object; + }; + + /** + * Converts this Network to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Network + * @instance + * @returns {Object.} JSON object + */ + Network.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Network; + })(); + + v1.CreateWorkerPoolRequest = (function() { + + /** + * Properties of a CreateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface ICreateWorkerPoolRequest + * @property {string|null} [parent] CreateWorkerPoolRequest parent + * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] CreateWorkerPoolRequest workerPool + */ + + /** + * Constructs a new CreateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CreateWorkerPoolRequest. + * @implements ICreateWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set + */ + function CreateWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkerPoolRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.parent = ""; + + /** + * CreateWorkerPoolRequest workerPool. + * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.workerPool = null; + + /** + * Creates a new CreateWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest instance + */ + CreateWorkerPoolRequest.create = function create(properties) { + return new CreateWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified CreateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkerPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkerPoolRequest.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.workerPool != null && message.hasOwnProperty("workerPool")) { + var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPool); + if (error) + return "workerPool." + error; + } + return null; + }; + + /** + * Creates a CreateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + */ + CreateWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workerPool != null) { + if (typeof object.workerPool !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.workerPool: object expected"); + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPool); + } + return message; + }; + + /** + * Creates a plain object from a CreateWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} message CreateWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkerPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workerPool = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPool, options); + return object; + }; + + /** + * Converts this CreateWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkerPoolRequest; + })(); + + v1.GetWorkerPoolRequest = (function() { + + /** + * Properties of a GetWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGetWorkerPoolRequest + * @property {string|null} [name] GetWorkerPoolRequest name + */ + + /** + * Constructs a new GetWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GetWorkerPoolRequest. + * @implements IGetWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set + */ + function GetWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkerPoolRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @instance + */ + GetWorkerPoolRequest.prototype.name = ""; + + /** + * Creates a new GetWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest instance + */ + GetWorkerPoolRequest.create = function create(properties) { + return new GetWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified GetWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkerPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); + 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 GetWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkerPoolRequest.verify = function verify(message) { + if (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 GetWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + */ + GetWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} message GetWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkerPoolRequest.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 GetWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkerPoolRequest; + })(); + + v1.DeleteWorkerPoolRequest = (function() { + + /** + * Properties of a DeleteWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IDeleteWorkerPoolRequest + * @property {string|null} [name] DeleteWorkerPoolRequest name + */ + + /** + * Constructs a new DeleteWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a DeleteWorkerPoolRequest. + * @implements IDeleteWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set + */ + function DeleteWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkerPoolRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + */ + DeleteWorkerPoolRequest.prototype.name = ""; + + /** + * Creates a new DeleteWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest instance + */ + DeleteWorkerPoolRequest.create = function create(properties) { + return new DeleteWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkerPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); + 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 DeleteWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteWorkerPoolRequest.verify = function verify(message) { + if (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 DeleteWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + */ + DeleteWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} message DeleteWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteWorkerPoolRequest.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 DeleteWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteWorkerPoolRequest; + })(); + + v1.UpdateWorkerPoolRequest = (function() { + + /** + * Properties of an UpdateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IUpdateWorkerPoolRequest + * @property {string|null} [name] UpdateWorkerPoolRequest name + * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] UpdateWorkerPoolRequest workerPool + */ + + /** + * Constructs a new UpdateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an UpdateWorkerPoolRequest. + * @implements IUpdateWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set + */ + function UpdateWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateWorkerPoolRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @instance + */ + UpdateWorkerPoolRequest.prototype.name = ""; + + /** + * UpdateWorkerPoolRequest workerPool. + * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @instance + */ + UpdateWorkerPoolRequest.prototype.workerPool = null; + + /** + * Creates a new UpdateWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest instance + */ + UpdateWorkerPoolRequest.create = function create(properties) { + return new UpdateWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified UpdateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateWorkerPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.name = reader.string(); + break; + case 3: + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateWorkerPoolRequest.verify = function verify(message) { + if (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.workerPool != null && message.hasOwnProperty("workerPool")) { + var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPool); + if (error) + return "workerPool." + error; + } + return null; + }; + + /** + * Creates an UpdateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + */ + UpdateWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.workerPool != null) { + if (typeof object.workerPool !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.workerPool: object expected"); + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPool); + } + return message; + }; + + /** + * Creates a plain object from an UpdateWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} message UpdateWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateWorkerPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.workerPool = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPool, options); + return object; + }; + + /** + * Converts this UpdateWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateWorkerPoolRequest; + })(); + + v1.ListWorkerPoolsRequest = (function() { + + /** + * Properties of a ListWorkerPoolsRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListWorkerPoolsRequest + * @property {string|null} [parent] ListWorkerPoolsRequest parent + */ + + /** + * Constructs a new ListWorkerPoolsRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListWorkerPoolsRequest. + * @implements IListWorkerPoolsRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set + */ + function ListWorkerPoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkerPoolsRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @instance + */ + ListWorkerPoolsRequest.prototype.parent = ""; + + /** + * Creates a new ListWorkerPoolsRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest instance + */ + ListWorkerPoolsRequest.create = function create(properties) { + return new ListWorkerPoolsRequest(properties); + }; + + /** + * Encodes the specified ListWorkerPoolsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkerPoolsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && message.hasOwnProperty("parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListWorkerPoolsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkerPoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkerPoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkerPoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkerPoolsRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkerPoolsRequest.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"; + return null; + }; + + /** + * Creates a ListWorkerPoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + */ + ListWorkerPoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListWorkerPoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} message ListWorkerPoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkerPoolsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListWorkerPoolsRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkerPoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkerPoolsRequest; + })(); + + v1.ListWorkerPoolsResponse = (function() { + + /** + * Properties of a ListWorkerPoolsResponse. + * @memberof google.devtools.cloudbuild.v1 + * @interface IListWorkerPoolsResponse + * @property {Array.|null} [workerPools] ListWorkerPoolsResponse workerPools + */ + + /** + * Constructs a new ListWorkerPoolsResponse. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ListWorkerPoolsResponse. + * @implements IListWorkerPoolsResponse + * @constructor + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set + */ + function ListWorkerPoolsResponse(properties) { + this.workerPools = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkerPoolsResponse workerPools. + * @member {Array.} workerPools + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @instance + */ + ListWorkerPoolsResponse.prototype.workerPools = $util.emptyArray; + + /** + * Creates a new ListWorkerPoolsResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse instance + */ + ListWorkerPoolsResponse.create = function create(properties) { + return new ListWorkerPoolsResponse(properties); + }; + + /** + * Encodes the specified ListWorkerPoolsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkerPoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workerPools != null && message.workerPools.length) + for (var i = 0; i < message.workerPools.length; ++i) + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListWorkerPoolsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkerPoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkerPoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.workerPools && message.workerPools.length)) + message.workerPools = []; + message.workerPools.push($root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkerPoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkerPoolsResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkerPoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workerPools != null && message.hasOwnProperty("workerPools")) { + if (!Array.isArray(message.workerPools)) + return "workerPools: array expected"; + for (var i = 0; i < message.workerPools.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPools[i]); + if (error) + return "workerPools." + error; + } + } + return null; + }; + + /** + * Creates a ListWorkerPoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + */ + ListWorkerPoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); + if (object.workerPools) { + if (!Array.isArray(object.workerPools)) + throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: array expected"); + message.workerPools = []; + for (var i = 0; i < object.workerPools.length; ++i) { + if (typeof object.workerPools[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: object expected"); + message.workerPools[i] = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPools[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListWorkerPoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} message ListWorkerPoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkerPoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workerPools = []; + if (message.workerPools && message.workerPools.length) { + object.workerPools = []; + for (var j = 0; j < message.workerPools.length; ++j) + object.workerPools[j] = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPools[j], options); + } + return object; + }; + + /** + * Converts this ListWorkerPoolsResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkerPoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListWorkerPoolsResponse; + })(); + + return v1; + })(); + + return cloudbuild; + })(); + + return devtools; + })(); + + 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 && message.hasOwnProperty("fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + case 2: + message.fullyDecodeReservedExpansion = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = ""; + + /** + * HttpRule put. + * @member {string} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = ""; + + /** + * HttpRule post. + * @member {string} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = ""; + + /** + * HttpRule delete. + * @member {string} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = ""; + + /** + * HttpRule patch. + * @member {string} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = ""; + + /** + * 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 && message.hasOwnProperty("selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && message.hasOwnProperty("get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && message.hasOwnProperty("put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && message.hasOwnProperty("post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && message.hasOwnProperty("delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && message.hasOwnProperty("patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && message.hasOwnProperty("body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && message.hasOwnProperty("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 && message.hasOwnProperty("responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.selector = reader.string(); + break; + case 2: + message.get = reader.string(); + break; + case 3: + message.put = reader.string(); + break; + case 4: + message.post = reader.string(); + break; + case 5: + message["delete"] = reader.string(); + break; + case 6: + message.patch = reader.string(); + break; + case 8: + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + case 7: + message.body = reader.string(); + break; + case 12: + message.responseBody = reader.string(); + break; + case 11: + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && message.hasOwnProperty("kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && message.hasOwnProperty("path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.kind = reader.string(); + break; + case 2: + message.path = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CustomHttpPattern; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @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 + */ + 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; + return values; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && message.hasOwnProperty("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 && message.hasOwnProperty("options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && message.hasOwnProperty("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 && message.hasOwnProperty("syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("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 && message.hasOwnProperty("options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * 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; + + /** + * 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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && message.hasOwnProperty("extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && message.hasOwnProperty("label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && message.hasOwnProperty("type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && message.hasOwnProperty("typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + 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; + 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; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + 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 = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @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 {string} + * @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 && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("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 && message.hasOwnProperty("options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && message.hasOwnProperty("start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && message.hasOwnProperty("number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("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 && message.hasOwnProperty("options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && message.hasOwnProperty("inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && message.hasOwnProperty("outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && message.hasOwnProperty("options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + */ + + /** + * 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 = []; + if (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 = false; + + /** + * 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; + + /** + * 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 && message.hasOwnProperty("javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && message.hasOwnProperty("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(); + 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; + 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; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + 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 = []; + 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 = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @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 + */ + + /** + * 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; + + /** + * 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 && message.hasOwnProperty("messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && message.hasOwnProperty("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(); + 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; + 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; + } + } + 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]); + } + } + 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; + } + 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); + } + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * 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 && message.hasOwnProperty("ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && message.hasOwnProperty("packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && message.hasOwnProperty("lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && message.hasOwnProperty("jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && message.hasOwnProperty("weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1052: + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + } + } + 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; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @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 {string} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("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 && message.hasOwnProperty(".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 1049: + message[".google.api.defaultHost"] = reader.string(); + break; + case 1050: + message[".google.api.oauthScopes"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 34: + message.idempotencyLevel = reader.int32(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 72295728: + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + case 1051: + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @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 && message.hasOwnProperty("identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && message.hasOwnProperty("begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && message.hasOwnProperty("end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && message.hasOwnProperty("type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && message.hasOwnProperty("value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.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 && message.hasOwnProperty("seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && message.hasOwnProperty("nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && message.hasOwnProperty("metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && message.hasOwnProperty("done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && message.hasOwnProperty("error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && message.hasOwnProperty("response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && message.hasOwnProperty("filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.hasOwnProperty("name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && message.hasOwnProperty("timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && message.hasOwnProperty("responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && message.hasOwnProperty("code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && message.hasOwnProperty("message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.int32(); + break; + case 2: + message.message = reader.string(); + break; + case 3: + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json new file mode 100644 index 000000000000..785248782558 --- /dev/null +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -0,0 +1,2473 @@ +{ + "nested": { + "google": { + "nested": { + "devtools": { + "nested": { + "cloudbuild": { + "nested": { + "v1": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild", + "java_multiple_files": true, + "java_package": "com.google.cloudbuild.v1", + "objc_class_prefix": "GCB" + }, + "nested": { + "CloudBuild": { + "options": { + "(google.api.default_host)": "cloudbuild.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateBuild": { + "requestType": "CreateBuildRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/builds", + "(google.api.http).body": "build", + "(google.api.method_signature)": "project_id,build" + } + }, + "GetBuild": { + "requestType": "GetBuildRequest", + "responseType": "Build", + "options": { + "(google.api.http).get": "/v1/projects/{project_id}/builds/{id}", + "(google.api.method_signature)": "project_id,id" + } + }, + "ListBuilds": { + "requestType": "ListBuildsRequest", + "responseType": "ListBuildsResponse", + "options": { + "(google.api.http).get": "/v1/projects/{project_id}/builds", + "(google.api.method_signature)": "project_id,filter" + } + }, + "CancelBuild": { + "requestType": "CancelBuildRequest", + "responseType": "Build", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/builds/{id}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "project_id,id" + } + }, + "RetryBuild": { + "requestType": "RetryBuildRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/builds/{id}:retry", + "(google.api.http).body": "*", + "(google.api.method_signature)": "project_id,id" + } + }, + "CreateBuildTrigger": { + "requestType": "CreateBuildTriggerRequest", + "responseType": "BuildTrigger", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/triggers", + "(google.api.http).body": "trigger", + "(google.api.method_signature)": "project_id,trigger" + } + }, + "GetBuildTrigger": { + "requestType": "GetBuildTriggerRequest", + "responseType": "BuildTrigger", + "options": { + "(google.api.http).get": "/v1/projects/{project_id}/triggers/{trigger_id}", + "(google.api.method_signature)": "project_id,trigger_id" + } + }, + "ListBuildTriggers": { + "requestType": "ListBuildTriggersRequest", + "responseType": "ListBuildTriggersResponse", + "options": { + "(google.api.http).get": "/v1/projects/{project_id}/triggers", + "(google.api.method_signature)": "project_id" + } + }, + "DeleteBuildTrigger": { + "requestType": "DeleteBuildTriggerRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/projects/{project_id}/triggers/{trigger_id}", + "(google.api.method_signature)": "project_id,trigger_id" + } + }, + "UpdateBuildTrigger": { + "requestType": "UpdateBuildTriggerRequest", + "responseType": "BuildTrigger", + "options": { + "(google.api.http).patch": "/v1/projects/{project_id}/triggers/{trigger_id}", + "(google.api.http).body": "trigger", + "(google.api.method_signature)": "project_id,trigger_id,trigger" + } + }, + "RunBuildTrigger": { + "requestType": "RunBuildTriggerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/triggers/{trigger_id}:run", + "(google.api.http).body": "source", + "(google.api.method_signature)": "project_id,trigger_id,source" + } + }, + "CreateWorkerPool": { + "requestType": "CreateWorkerPoolRequest", + "responseType": "WorkerPool" + }, + "GetWorkerPool": { + "requestType": "GetWorkerPoolRequest", + "responseType": "WorkerPool" + }, + "DeleteWorkerPool": { + "requestType": "DeleteWorkerPoolRequest", + "responseType": "google.protobuf.Empty" + }, + "UpdateWorkerPool": { + "requestType": "UpdateWorkerPoolRequest", + "responseType": "WorkerPool" + }, + "ListWorkerPools": { + "requestType": "ListWorkerPoolsRequest", + "responseType": "ListWorkerPoolsResponse" + } + } + }, + "RetryBuildRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "id": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RunBuildTriggerRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "source": { + "type": "RepoSource", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "StorageSource": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + }, + "object": { + "type": "string", + "id": 2 + }, + "generation": { + "type": "int64", + "id": 3 + } + } + }, + "RepoSource": { + "oneofs": { + "revision": { + "oneof": [ + "branchName", + "tagName", + "commitSha" + ] + } + }, + "fields": { + "projectId": { + "type": "string", + "id": 1 + }, + "repoName": { + "type": "string", + "id": 2 + }, + "branchName": { + "type": "string", + "id": 3 + }, + "tagName": { + "type": "string", + "id": 4 + }, + "commitSha": { + "type": "string", + "id": 5 + }, + "dir": { + "type": "string", + "id": 7 + } + } + }, + "Source": { + "oneofs": { + "source": { + "oneof": [ + "storageSource", + "repoSource" + ] + } + }, + "fields": { + "storageSource": { + "type": "StorageSource", + "id": 2 + }, + "repoSource": { + "type": "RepoSource", + "id": 3 + } + } + }, + "BuiltImage": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "digest": { + "type": "string", + "id": 3 + }, + "pushTiming": { + "type": "TimeSpan", + "id": 4 + } + } + }, + "BuildStep": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "env": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "args": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "dir": { + "type": "string", + "id": 4 + }, + "id": { + "type": "string", + "id": 5 + }, + "waitFor": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "entrypoint": { + "type": "string", + "id": 7 + }, + "secretEnv": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "volumes": { + "rule": "repeated", + "type": "Volume", + "id": 9 + }, + "timing": { + "type": "TimeSpan", + "id": 10 + }, + "pullTiming": { + "type": "TimeSpan", + "id": 13 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 11 + }, + "status": { + "type": "Build.Status", + "id": 12 + } + } + }, + "Volume": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "Results": { + "fields": { + "images": { + "rule": "repeated", + "type": "BuiltImage", + "id": 2 + }, + "buildStepImages": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "artifactManifest": { + "type": "string", + "id": 4 + }, + "numArtifacts": { + "type": "int64", + "id": 5 + }, + "buildStepOutputs": { + "rule": "repeated", + "type": "bytes", + "id": 6 + }, + "artifactTiming": { + "type": "TimeSpan", + "id": 7 + } + } + }, + "ArtifactResult": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "fileHash": { + "rule": "repeated", + "type": "FileHashes", + "id": 2 + } + } + }, + "Build": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 16 + }, + "status": { + "type": "Status", + "id": 2 + }, + "statusDetail": { + "type": "string", + "id": 24 + }, + "source": { + "type": "Source", + "id": 3 + }, + "steps": { + "rule": "repeated", + "type": "BuildStep", + "id": 11 + }, + "results": { + "type": "Results", + "id": 10 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 12 + }, + "images": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "artifacts": { + "type": "Artifacts", + "id": 37 + }, + "logsBucket": { + "type": "string", + "id": 19 + }, + "sourceProvenance": { + "type": "SourceProvenance", + "id": 21 + }, + "buildTriggerId": { + "type": "string", + "id": 22 + }, + "options": { + "type": "BuildOptions", + "id": 23 + }, + "logUrl": { + "type": "string", + "id": 25 + }, + "substitutions": { + "keyType": "string", + "type": "string", + "id": 29 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 31 + }, + "secrets": { + "rule": "repeated", + "type": "Secret", + "id": 32 + }, + "timing": { + "keyType": "string", + "type": "TimeSpan", + "id": 33 + } + }, + "nested": { + "Status": { + "values": { + "STATUS_UNKNOWN": 0, + "QUEUED": 1, + "WORKING": 2, + "SUCCESS": 3, + "FAILURE": 4, + "INTERNAL_ERROR": 5, + "TIMEOUT": 6, + "CANCELLED": 7 + } + } + } + }, + "Artifacts": { + "fields": { + "images": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "objects": { + "type": "ArtifactObjects", + "id": 2 + } + }, + "nested": { + "ArtifactObjects": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "timing": { + "type": "TimeSpan", + "id": 3 + } + } + } + } + }, + "TimeSpan": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "BuildOperationMetadata": { + "fields": { + "build": { + "type": "Build", + "id": 1 + } + } + }, + "SourceProvenance": { + "fields": { + "resolvedStorageSource": { + "type": "StorageSource", + "id": 3 + }, + "resolvedRepoSource": { + "type": "RepoSource", + "id": 6 + }, + "fileHashes": { + "keyType": "string", + "type": "FileHashes", + "id": 4 + } + } + }, + "FileHashes": { + "fields": { + "fileHash": { + "rule": "repeated", + "type": "Hash", + "id": 1 + } + } + }, + "Hash": { + "fields": { + "type": { + "type": "HashType", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + }, + "nested": { + "HashType": { + "values": { + "NONE": 0, + "SHA256": 1, + "MD5": 2 + } + } + } + }, + "Secret": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1 + }, + "secretEnv": { + "keyType": "string", + "type": "bytes", + "id": 3 + } + } + }, + "CreateBuildRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "build": { + "type": "Build", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetBuildRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "id": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListBuildsRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 8 + } + } + }, + "ListBuildsResponse": { + "fields": { + "builds": { + "rule": "repeated", + "type": "Build", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelBuildRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "id": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BuildTrigger": { + "oneofs": { + "buildTemplate": { + "oneof": [ + "build", + "filename" + ] + } + }, + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 10 + }, + "name": { + "type": "string", + "id": 21 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 19 + }, + "triggerTemplate": { + "type": "RepoSource", + "id": 7 + }, + "github": { + "type": "GitHubEventsConfig", + "id": 13 + }, + "build": { + "type": "Build", + "id": 4 + }, + "filename": { + "type": "string", + "id": 8 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "disabled": { + "type": "bool", + "id": 9 + }, + "substitutions": { + "keyType": "string", + "type": "string", + "id": 11 + }, + "ignoredFiles": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "includedFiles": { + "rule": "repeated", + "type": "string", + "id": 16 + } + } + }, + "GitHubEventsConfig": { + "oneofs": { + "event": { + "oneof": [ + "pullRequest", + "push" + ] + } + }, + "fields": { + "installationId": { + "type": "int64", + "id": 1 + }, + "owner": { + "type": "string", + "id": 6 + }, + "name": { + "type": "string", + "id": 7 + }, + "pullRequest": { + "type": "PullRequestFilter", + "id": 4 + }, + "push": { + "type": "PushFilter", + "id": 5 + } + } + }, + "PullRequestFilter": { + "oneofs": { + "gitRef": { + "oneof": [ + "branch" + ] + } + }, + "fields": { + "branch": { + "type": "string", + "id": 2 + }, + "commentControl": { + "type": "CommentControl", + "id": 5 + } + }, + "nested": { + "CommentControl": { + "values": { + "COMMENTS_DISABLED": 0, + "COMMENTS_ENABLED": 1 + } + } + } + }, + "PushFilter": { + "oneofs": { + "gitRef": { + "oneof": [ + "branch", + "tag" + ] + } + }, + "fields": { + "branch": { + "type": "string", + "id": 2 + }, + "tag": { + "type": "string", + "id": 3 + } + } + }, + "CreateBuildTriggerRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "trigger": { + "type": "BuildTrigger", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetBuildTriggerRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListBuildTriggersRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListBuildTriggersResponse": { + "fields": { + "triggers": { + "rule": "repeated", + "type": "BuildTrigger", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteBuildTriggerRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateBuildTriggerRequest": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "trigger": { + "type": "BuildTrigger", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BuildOptions": { + "fields": { + "sourceProvenanceHash": { + "rule": "repeated", + "type": "Hash.HashType", + "id": 1 + }, + "requestedVerifyOption": { + "type": "VerifyOption", + "id": 2 + }, + "machineType": { + "type": "MachineType", + "id": 3 + }, + "diskSizeGb": { + "type": "int64", + "id": 6 + }, + "substitutionOption": { + "type": "SubstitutionOption", + "id": 4 + }, + "logStreamingOption": { + "type": "LogStreamingOption", + "id": 5 + }, + "workerPool": { + "type": "string", + "id": 7 + }, + "logging": { + "type": "LoggingMode", + "id": 11 + }, + "env": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "secretEnv": { + "rule": "repeated", + "type": "string", + "id": 13 + }, + "volumes": { + "rule": "repeated", + "type": "Volume", + "id": 14 + } + }, + "nested": { + "VerifyOption": { + "values": { + "NOT_VERIFIED": 0, + "VERIFIED": 1 + } + }, + "MachineType": { + "values": { + "UNSPECIFIED": 0, + "N1_HIGHCPU_8": 1, + "N1_HIGHCPU_32": 2 + } + }, + "SubstitutionOption": { + "values": { + "MUST_MATCH": 0, + "ALLOW_LOOSE": 1 + } + }, + "LogStreamingOption": { + "values": { + "STREAM_DEFAULT": 0, + "STREAM_ON": 1, + "STREAM_OFF": 2 + } + }, + "LoggingMode": { + "values": { + "LOGGING_UNSPECIFIED": 0, + "LEGACY": 1, + "GCS_ONLY": 2 + } + } + } + }, + "WorkerPool": { + "fields": { + "name": { + "type": "string", + "id": 14 + }, + "projectId": { + "type": "string", + "id": 2 + }, + "serviceAccountEmail": { + "type": "string", + "id": 3 + }, + "workerCount": { + "type": "int64", + "id": 4 + }, + "workerConfig": { + "type": "WorkerConfig", + "id": 16 + }, + "regions": { + "rule": "repeated", + "type": "Region", + "id": 9 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 17 + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 12 + }, + "status": { + "type": "Status", + "id": 13 + } + }, + "nested": { + "Region": { + "values": { + "REGION_UNSPECIFIED": 0, + "US_CENTRAL1": 1, + "US_WEST1": 2, + "US_EAST1": 3, + "US_EAST4": 4 + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2, + "DELETING": 3, + "DELETED": 4 + } + } + } + }, + "WorkerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1 + }, + "diskSizeGb": { + "type": "int64", + "id": 2 + }, + "network": { + "type": "Network", + "id": 3 + }, + "tag": { + "type": "string", + "id": 4 + } + } + }, + "Network": { + "fields": { + "projectId": { + "type": "string", + "id": 1 + }, + "network": { + "type": "string", + "id": 2 + }, + "subnetwork": { + "type": "string", + "id": 3 + } + } + }, + "CreateWorkerPoolRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "workerPool": { + "type": "WorkerPool", + "id": 2 + } + } + }, + "GetWorkerPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteWorkerPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateWorkerPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 2 + }, + "workerPool": { + "type": "WorkerPool", + "id": 3 + } + } + }, + "ListWorkerPoolsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + } + } + }, + "ListWorkerPoolsResponse": { + "fields": { + "workerPools": { + "rule": "repeated", + "type": "WorkerPool", + "id": 1 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "FieldBehaviorProto", + "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 + } + } + } + }, + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "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": false + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + } + } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}" + } + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}" + } + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}" + } + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*" + } + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/samples/.eslintrc.yml b/packages/google-devtools-cloudbuild/samples/.eslintrc.yml new file mode 100644 index 000000000000..4a0465b4fd35 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/.eslintrc.yml @@ -0,0 +1,5 @@ +--- +rules: + no-console: off + node/no-missing-require: off + node/no-extraneous-require: off \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/samples/README.md b/packages/google-devtools-cloudbuild/samples/README.md new file mode 100644 index 000000000000..1e1bfb2a0a89 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/README.md @@ -0,0 +1,44 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Cloud Build: Node.js Samples](https://github.com/googleapis/nodejs-cloudbuild) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-cloudbuild#using-the-client-library). + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/cloud-build/docs/ \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json new file mode 100644 index 000000000000..e83a7b66ffa1 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "nodejs-cloudbuild-samples", + "private": true, + "license": "Apache-2.0", + "files": [ + "*.js", + "resources" + ], + "author": "Google Inc.", + "repository": "googleapis/nodejs-cloudbuild", + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "mocha system-test --timeout=800000" + }, + "dependencies": { + "@google-cloud/cloudbuild": "^0.1.0" + }, + "devDependencies": { + "chai": "^4.2.0", + "mocha": "^6.0.0" + } +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/samples/quickstart.js b/packages/google-devtools-cloudbuild/samples/quickstart.js new file mode 100644 index 000000000000..cfd906973ec4 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/quickstart.js @@ -0,0 +1,46 @@ +/** + * Copyright 2019, Google, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +// [START cloudbuild_quickstart] +async function quickstart( + projectId = 'YOUR_PROJECT_ID', // Your Google Cloud Platform project ID + triggerId = 'YOUR_TRIGGER_ID', // UUID for build trigger. + branchName = 'BRANCH_TO_BUILD' // Branch to run build against. +) { + // Imports the Google Cloud client library + const {CloudBuildClient} = require('@google-cloud/cloudbuild'); + + // Creates a client + const cb = new CloudBuildClient(); + + // Starts a build against the branch provided. + const request = { + projectId, + triggerId, + source: { + projectId: projectId, + dir: './', + branchName, + }, + }; + await cb.runBuildTrigger(request); + console.info(`triggered build for ${triggerId}`); +} +// [END cloudbuild_quickstart] + +const args = process.argv.slice(2); +quickstart(...args).catch(console.error); diff --git a/packages/google-devtools-cloudbuild/src/browser.js b/packages/google-devtools-cloudbuild/src/browser.js new file mode 100644 index 000000000000..ddbcd7ecb9ad --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/browser.js @@ -0,0 +1,21 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +// Set a flag that we are running in a browser bundle. +global.isBrowser = true; + +// Re-export all exports from ./index.js. +module.exports = require('./index'); diff --git a/packages/google-devtools-cloudbuild/src/index.js b/packages/google-devtools-cloudbuild/src/index.js new file mode 100644 index 000000000000..b7f6e965e83d --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/index.js @@ -0,0 +1,88 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/** + * @namespace google + */ +/** + * @namespace google.rpc + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.longrunning + */ +/** + * @namespace google.cloud + */ +/** + * @namespace google.devtools.cloudbuild + */ +/** + * @namespace google.devtools.cloudbuild.v1 + */ + +'use strict'; + +// Import the clients for each version supported by this package. +const gapic = Object.freeze({ + v1: require('./v1'), +}); + +/** + * The `@google-cloud/cloudbuild` package has the following named exports: + * + * - `CloudBuildClient` - Reference to + * {@link v1.CloudBuildClient} + * - `v1` - This is used for selecting or pinning a + * particular backend service version. It exports: + * - `CloudBuildClient` - Reference to + * {@link v1.CloudBuildClient} + * + * @module {object} @google-cloud/cloudbuild + * @alias nodejs-cloudbuild + * + * @example Install the client library with npm: + * npm install --save @google-cloud/cloudbuild + * + * @example Import the client library: + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * @example Create a client that uses Application Default Credentials (ADC): + * const client = new cloudbuild.CloudBuildClient(); + * + * @example Create a client with explicit credentials: + * const client = new cloudbuild.CloudBuildClient({ + * projectId: 'your-project-id', + * keyFilename: '/path/to/keyfile.json', + * }); + */ + +/** + * @type {object} + * @property {constructor} CloudBuildClient + * Reference to {@link v1.CloudBuildClient} + */ +module.exports = gapic.v1; + +/** + * @type {object} + * @property {constructor} CloudBuildClient + * Reference to {@link v1.CloudBuildClient} + */ +module.exports.v1 = gapic.v1; + +// Alias `module.exports` as `module.exports.default`, for future-proofing. +module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js new file mode 100644 index 000000000000..83a8a38f668e --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js @@ -0,0 +1,1266 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const gapicConfig = require('./cloud_build_client_config.json'); +const gax = require('google-gax'); +const path = require('path'); + +const VERSION = require('../../package.json').version; + +/** + * Creates and manages builds on Google Cloud Platform. + * + * The main concept used by this API is a `Build`, which describes the location + * of the source to build, how to build the source, and where to store the + * built artifacts, if any. + * + * A user can list previously-requested builds or get builds by their ID to + * determine the status of the build. + * + * @class + * @memberof v1 + */ +class CloudBuildClient { + /** + * Construct an instance of CloudBuildClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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 {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + constructor(opts) { + opts = opts || {}; + this._descriptors = {}; + + if (global.isBrowser) { + // If we're in browser, we use gRPC fallback. + opts.fallback = true; + } + + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; + + const servicePath = + opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; + + // Ensure that options include the service address and port. + opts = Object.assign( + { + clientConfig: {}, + port: this.constructor.port, + servicePath, + }, + opts + ); + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = this.constructor.scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = gaxGrpc.auth; + + // Determine the client header string. + const clientHeader = []; + + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } + clientHeader.push(`gax/${gaxModule.version}`); + if (opts.fallback) { + clientHeader.push(`gl-web/${gaxModule.version}`); + } else { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } + clientHeader.push(`gapic/${VERSION}`); + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); + + // 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 = { + listBuilds: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'builds' + ), + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.devtools.cloudbuild.v1.CloudBuild', + gapicConfig, + 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 = {}; + + // Put together the "service stub" for + // google.devtools.cloudbuild.v1.CloudBuild. + const cloudBuildStub = gaxGrpc.createStub( + opts.fallback + ? protos.lookupService('google.devtools.cloudbuild.v1.CloudBuild') + : protos.google.devtools.cloudbuild.v1.CloudBuild, + opts + ); + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const cloudBuildStubMethods = [ + 'createBuild', + 'getBuild', + 'listBuilds', + 'cancelBuild', + 'createBuildTrigger', + 'getBuildTrigger', + 'listBuildTriggers', + 'deleteBuildTrigger', + 'updateBuildTrigger', + 'runBuildTrigger', + 'retryBuild', + 'createWorkerPool', + 'getWorkerPool', + 'deleteWorkerPool', + 'updateWorkerPool', + 'listWorkerPools', + ]; + for (const methodName of cloudBuildStubMethods) { + const innerCallPromise = cloudBuildStub.then( + stub => (...args) => { + return stub[methodName].apply(stub, args); + }, + err => () => { + throw err; + } + ); + this._innerApiCalls[methodName] = gaxModule.createApiCall( + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] + ); + } + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'cloudbuild.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'cloudbuild.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(callback) { + return this.auth.getProjectId(callback); + } + + // ------------------- + // -- Service calls -- + // ------------------- + + /** + * Starts a build with the specified configuration. + * + * This method returns a long-running `Operation`, which includes the build + * ID. Pass the build ID to `GetBuild` to determine the build status (such as + * `SUCCESS` or `FAILURE`). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {Object} request.build + * Required. Build resource to create. + * + * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const build = {}; + * const request = { + * projectId: projectId, + * build: build, + * }; + * client.createBuild(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createBuild(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId, + }); + + return this._innerApiCalls.createBuild(request, options, callback); + } + + /** + * Returns information about a previously requested build. + * + * The `Build` that is returned includes its status (such as `SUCCESS`, + * `FAILURE`, or `WORKING`), and timing information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const id = ''; + * const request = { + * projectId: projectId, + * id: id, + * }; + * client.getBuild(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getBuild(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.getBuild(request, options, callback); + } + + /** + * Lists previously requested builds. + * + * Previously requested builds may still be in-progress, or may have finished + * successfully or unsuccessfully. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {number} [request.pageSize] + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {string} [request.filter] + * The raw filter text to constrain the results. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. + * + * When autoPaginate: false is specified through options, it contains the result + * in a single response. If the response indicates the next page exists, the third + * parameter is set to be used for the next request object. The fourth parameter keeps + * the raw response object of an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Build]{@link google.devtools.cloudbuild.v1.Build} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * // Iterate over all elements. + * const projectId = ''; + * + * client.listBuilds({projectId: projectId}) + * .then(responses => { + * const resources = responses[0]; + * for (const resource of resources) { + * // doThingsWith(resource) + * } + * }) + * .catch(err => { + * console.error(err); + * }); + * + * // Or obtain the paged response. + * const projectId = ''; + * + * + * const options = {autoPaginate: false}; + * const callback = responses => { + * // The actual resources in a response. + * const resources = responses[0]; + * // The next request if the response shows that there are more responses. + * const nextRequest = responses[1]; + * // The actual response object, if necessary. + * // const rawResponse = responses[2]; + * for (const resource of resources) { + * // doThingsWith(resource); + * } + * if (nextRequest) { + * // Fetch the next page. + * return client.listBuilds(nextRequest, options).then(callback); + * } + * } + * client.listBuilds({projectId: projectId}, options) + * .then(callback) + * .catch(err => { + * console.error(err); + * }); + */ + listBuilds(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId, + }); + + return this._innerApiCalls.listBuilds(request, options, callback); + } + + /** + * Equivalent to {@link listBuilds}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listBuilds} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {number} [request.pageSize] + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {string} [request.filter] + * The raw filter text to constrain the results. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @returns {Stream} + * An object stream which emits an object representing [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * client.listBuildsStream({projectId: projectId}) + * .on('data', element => { + * // doThingsWith(element) + * }).on('error', err => { + * console.log(err); + * }); + */ + listBuildsStream(request, options) { + options = options || {}; + + return this._descriptors.page.listBuilds.createStream( + this._innerApiCalls.listBuilds, + request, + options + ); + } + + /** + * Cancels a build in progress. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const id = ''; + * const request = { + * projectId: projectId, + * id: id, + * }; + * client.cancelBuild(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + cancelBuild(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.cancelBuild(request, options, callback); + } + + /** + * Creates a new `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project for which to configure automatic builds. + * @param {Object} request.trigger + * Required. `BuildTrigger` to create. + * + * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const trigger = {}; + * const request = { + * projectId: projectId, + * trigger: trigger, + * }; + * client.createBuildTrigger(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createBuildTrigger(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId, + }); + + return this._innerApiCalls.createBuildTrigger(request, options, callback); + } + + /** + * Returns information about a `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. ID of the `BuildTrigger` to get. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const triggerId = ''; + * const request = { + * projectId: projectId, + * triggerId: triggerId, + * }; + * client.getBuildTrigger(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getBuildTrigger(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.getBuildTrigger(request, options, callback); + } + + /** + * Lists existing `BuildTrigger`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project for which to list BuildTriggers. + * @param {number} [request.pageSize] + * Number of results to return in the list. + * @param {string} [request.pageToken] + * Token to provide to skip to a particular spot in the list. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * client.listBuildTriggers({projectId: projectId}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + listBuildTriggers(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId, + }); + + return this._innerApiCalls.listBuildTriggers(request, options, callback); + } + + /** + * Deletes a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. ID of the `BuildTrigger` to delete. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error)} [callback] + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const triggerId = ''; + * const request = { + * projectId: projectId, + * triggerId: triggerId, + * }; + * client.deleteBuildTrigger(request).catch(err => { + * console.error(err); + * }); + */ + deleteBuildTrigger(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.deleteBuildTrigger(request, options, callback); + } + + /** + * Updates a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. ID of the `BuildTrigger` to update. + * @param {Object} request.trigger + * Required. `BuildTrigger` to update. + * + * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const triggerId = ''; + * const trigger = {}; + * const request = { + * projectId: projectId, + * triggerId: triggerId, + * trigger: trigger, + * }; + * client.updateBuildTrigger(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateBuildTrigger(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.updateBuildTrigger(request, options, callback); + } + + /** + * Runs a `BuildTrigger` at a particular source revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.triggerId + * Required. ID of the trigger. + * @param {Object} request.source + * Required. Source to build against this trigger. + * + * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const triggerId = ''; + * const source = {}; + * const request = { + * projectId: projectId, + * triggerId: triggerId, + * source: source, + * }; + * client.runBuildTrigger(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + runBuildTrigger(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.runBuildTrigger(request, options, callback); + } + + /** + * Creates a new build based on the specified build. + * + * This method creates a new build using the original build request, which may + * or may not result in an identical build. + * + * For triggered builds: + * + * * Triggered builds resolve to a precise revision; therefore a retry of a + * triggered build will result in a build that uses the same revision. + * + * For non-triggered builds that specify `RepoSource`: + * + * * If the original build built from the tip of a branch, the retried build + * will build from the tip of that branch, which may not be the same revision + * as the original build. + * * If the original build specified a commit sha or revision ID, the retried + * build will use the identical source. + * + * For builds that specify `StorageSource`: + * + * * If the original build pulled source from Google Cloud Storage without + * specifying the generation of the object, the new build will use the current + * object, which may be different from the original build source. + * * If the original build pulled source from Cloud Storage and specified the + * generation of the object, the new build will attempt to use the same + * object, which may or may not be available depending on the bucket's + * lifecycle management settings. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. Build ID of the original build. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * const projectId = ''; + * const id = ''; + * const request = { + * projectId: projectId, + * id: id, + * }; + * client.retryBuild(request) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + retryBuild(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.retryBuild(request, options, callback); + } + + /** + * Creates a `WorkerPool` to run the builds, and returns the new worker pool. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.parent] + * ID of the parent project. + * @param {Object} [request.workerPool] + * `WorkerPool` resource to create. + * + * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * + * client.createWorkerPool({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + createWorkerPool(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.createWorkerPool(request, options, callback); + } + + /** + * Returns information about a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.name] + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * + * client.getWorkerPool({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + getWorkerPool(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.getWorkerPool(request, options, callback); + } + + /** + * Deletes a `WorkerPool` by its project ID and WorkerPool name. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.name] + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error)} [callback] + * The function which will be called with the result of the API call. + * @returns {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * + * client.deleteWorkerPool({}).catch(err => { + * console.error(err); + * }); + */ + deleteWorkerPool(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.deleteWorkerPool(request, options, callback); + } + + /** + * Update a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.name] + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {Object} [request.workerPool] + * `WorkerPool` resource to update. + * + * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * + * client.updateWorkerPool({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + updateWorkerPool(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.updateWorkerPool(request, options, callback); + } + + /** + * List project's `WorkerPool`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} [request.parent] + * ID of the parent project. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * + * const cloudbuild = require('@google-cloud/cloudbuild'); + * + * const client = new cloudbuild.v1.CloudBuildClient({ + * // optional auth parameters. + * }); + * + * + * client.listWorkerPools({}) + * .then(responses => { + * const response = responses[0]; + * // doThingsWith(response) + * }) + * .catch(err => { + * console.error(err); + * }); + */ + listWorkerPools(request, options, callback) { + if (options instanceof Function && callback === undefined) { + callback = options; + options = {}; + } + request = request || {}; + options = options || {}; + + return this._innerApiCalls.listWorkerPools(request, options, callback); + } +} + +module.exports = CloudBuildClient; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json new file mode 100644 index 000000000000..7c231167eb97 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -0,0 +1,106 @@ +{ + "interfaces": { + "google.devtools.cloudbuild.v1.CloudBuild": { + "retry_codes": { + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "non_idempotent": [] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 20000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 20000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateBuild": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBuild": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListBuilds": { + "timeout_millis": 20000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CancelBuild": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListBuildTriggers": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "UpdateBuildTrigger": { + "timeout_millis": 5000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RunBuildTrigger": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RetryBuild": { + "timeout_millis": 20000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateWorkerPool": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkerPools": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_proto_list.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_proto_list.json new file mode 100644 index 000000000000..ef522572f3bc --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/devtools/cloudbuild/v1/cloudbuild.proto" +] diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js new file mode 100644 index 000000000000..8c155606a1bf --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js @@ -0,0 +1,1675 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * Specifies a build to retry. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {string} id + * Required. Build ID of the original build. + * + * @typedef RetryBuildRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.RetryBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const RetryBuildRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Specifies a build trigger to run and the source to use. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {string} triggerId + * Required. ID of the trigger. + * + * @property {Object} source + * Required. Source to build against this trigger. + * + * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} + * + * @typedef RunBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.RunBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const RunBuildTriggerRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Location of the source in an archive file in Google Cloud Storage. + * + * @property {string} bucket + * Google Cloud Storage bucket containing the source (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * @property {string} object + * Google Cloud Storage object containing the source. + * + * This object must be a gzipped archive file (`.tar.gz`) containing source to + * build. + * + * @property {number} generation + * Google Cloud Storage generation for the object. If the generation is + * omitted, the latest generation will be used. + * + * @typedef StorageSource + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.StorageSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const StorageSource = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Location of the source in a Google Cloud Source Repository. + * + * @property {string} projectId + * ID of the project that owns the Cloud Source Repository. If omitted, the + * project ID requesting the build is assumed. + * + * @property {string} repoName + * Name of the Cloud Source Repository. If omitted, the name "default" is + * assumed. + * + * @property {string} branchName + * Regex matching branches to build. + * + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * @property {string} tagName + * Regex matching tags to build. + * + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * @property {string} commitSha + * Explicit commit SHA to build. + * + * @property {string} dir + * Directory, relative to the source root, in which to run the build. + * + * This must be a relative path. If a step's `dir` is specified and is an + * absolute path, this value is ignored for that step's execution. + * + * @typedef RepoSource + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.RepoSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const RepoSource = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Location of the source in a supported storage service. + * + * @property {Object} storageSource + * If provided, get the source from this location in Google Cloud Storage. + * + * This object should have the same structure as [StorageSource]{@link google.devtools.cloudbuild.v1.StorageSource} + * + * @property {Object} repoSource + * If provided, get the source from this location in a Cloud Source + * Repository. + * + * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} + * + * @typedef Source + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Source definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Source = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * An image built by the pipeline. + * + * @property {string} name + * Name used to push the container image to Google Container Registry, as + * presented to `docker push`. + * + * @property {string} digest + * Docker Registry 2.0 digest. + * + * @property {Object} pushTiming + * Output only. Stores timing information for pushing the specified image. + * + * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} + * + * @typedef BuiltImage + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.BuiltImage definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const BuiltImage = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A step in the build pipeline. + * + * @property {string} name + * Required. The name of the container image that will run this particular + * build step. + * + * If the image is available in the host's Docker daemon's cache, it + * will be run directly. If not, the host will attempt to pull the image + * first, using the builder service account's credentials if necessary. + * + * The Docker daemon's cache will already have the latest versions of all of + * the officially supported build steps + * ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). + * The Docker daemon will also have cached many of the layers for some popular + * images, like "ubuntu", "debian", but they will be refreshed at the time you + * attempt to use them. + * + * If you built an image in a previous build step, it will be stored in the + * host's Docker daemon's cache and is available to use as the name for a + * later build step. + * + * @property {string[]} env + * A list of environment variable definitions to be used when running a step. + * + * The elements are of the form "KEY=VALUE" for the environment variable "KEY" + * being given the value "VALUE". + * + * @property {string[]} args + * A list of arguments that will be presented to the step when it is started. + * + * If the image used to run the step's container has an entrypoint, the `args` + * are used as arguments to that entrypoint. If the image does not define + * an entrypoint, the first element in args is used as the entrypoint, + * and the remainder will be used as arguments. + * + * @property {string} dir + * Working directory to use when running this step's container. + * + * If this value is a relative path, it is relative to the build's working + * directory. If this value is absolute, it may be outside the build's working + * directory, in which case the contents of the path may not be persisted + * across build step executions, unless a `volume` for that path is specified. + * + * If the build specifies a `RepoSource` with `dir` and a step with a `dir`, + * which specifies an absolute path, the `RepoSource` `dir` is ignored for + * the step's execution. + * + * @property {string} id + * Unique identifier for this build step, used in `wait_for` to + * reference this build step as a dependency. + * + * @property {string[]} waitFor + * The ID(s) of the step(s) that this build step depends on. + * This build step will not start until all the build steps in `wait_for` + * have completed successfully. If `wait_for` is empty, this build step will + * start when all previous build steps in the `Build.Steps` list have + * completed successfully. + * + * @property {string} entrypoint + * Entrypoint to be used instead of the build step image's default entrypoint. + * If unset, the image's default entrypoint is used. + * + * @property {string[]} secretEnv + * A list of environment variables which are encrypted using a Cloud Key + * Management Service crypto key. These values must be specified in the + * build's `Secret`. + * + * @property {Object[]} volumes + * List of volumes to mount into the build step. + * + * Each volume is created as an empty volume prior to execution of the + * build step. Upon completion of the build, volumes and their contents are + * discarded. + * + * Using a named volume in only one step is not valid as it is indicative + * of a build request with an incorrect configuration. + * + * This object should have the same structure as [Volume]{@link google.devtools.cloudbuild.v1.Volume} + * + * @property {Object} timing + * Output only. Stores timing information for executing this build step. + * + * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} + * + * @property {Object} pullTiming + * Output only. Stores timing information for pulling this build step's + * builder image only. + * + * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} + * + * @property {Object} timeout + * Time limit for executing this build step. If not defined, the step has no + * time limit and will be allowed to continue to run until either it completes + * or the build itself times out. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {number} status + * Output only. Status of the build step. At this time, build step status is + * only updated on build completion; step status is not updated in real-time + * as the build progresses. + * + * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} + * + * @typedef BuildStep + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.BuildStep definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const BuildStep = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Volume describes a Docker container volume which is mounted into build steps + * in order to persist files across build step execution. + * + * @property {string} name + * Name of the volume to mount. + * + * Volume names must be unique per build step and must be valid names for + * Docker volumes. Each named volume must be used by at least two build steps. + * + * @property {string} path + * Path at which to mount the volume. + * + * Paths must be absolute and cannot conflict with other volume paths on the + * same build step or with certain reserved volume paths. + * + * @typedef Volume + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Volume definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Volume = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Artifacts created by the build pipeline. + * + * @property {Object[]} images + * Container images that were built as a part of the build. + * + * This object should have the same structure as [BuiltImage]{@link google.devtools.cloudbuild.v1.BuiltImage} + * + * @property {string[]} buildStepImages + * List of build step digests, in the order corresponding to build step + * indices. + * + * @property {string} artifactManifest + * Path to the artifact manifest. Only populated when artifacts are uploaded. + * + * @property {number} numArtifacts + * Number of artifacts uploaded. Only populated when artifacts are uploaded. + * + * @property {Buffer[]} buildStepOutputs + * List of build step outputs, produced by builder images, in the order + * corresponding to build step indices. + * + * [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) + * can produce this output by writing to `$BUILDER_OUTPUT/output`. + * Only the first 4KB of data is stored. + * + * @property {Object} artifactTiming + * Time to push all non-container artifacts. + * + * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} + * + * @typedef Results + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Results definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Results = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * An artifact that was uploaded during a build. This + * is a single record in the artifact manifest JSON file. + * + * @property {string} location + * The path of an artifact in a Google Cloud Storage bucket, with the + * generation number. For example, + * `gs://mybucket/path/to/output.jar#generation`. + * + * @property {Object[]} fileHash + * The file hash of the artifact. + * + * This object should have the same structure as [FileHashes]{@link google.devtools.cloudbuild.v1.FileHashes} + * + * @typedef ArtifactResult + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ArtifactResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ArtifactResult = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * A build resource in the Cloud Build API. + * + * At a high level, a `Build` describes where to find source code, how to build + * it (for example, the builder image to run on the source), and where to store + * the built artifacts. + * + * Fields can include the following variables, which will be expanded when the + * build is created: + * + * - $PROJECT_ID: the project ID of the build. + * - $BUILD_ID: the autogenerated ID of the build. + * - $REPO_NAME: the source repository name specified by RepoSource. + * - $BRANCH_NAME: the branch name specified by RepoSource. + * - $TAG_NAME: the tag name specified by RepoSource. + * - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or + * resolved from the specified branch or tag. + * - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. + * + * @property {string} id + * Output only. Unique identifier of the build. + * + * @property {string} projectId + * Output only. ID of the project. + * + * @property {number} status + * Output only. Status of the build. + * + * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} + * + * @property {string} statusDetail + * Output only. Customer-readable message about the current status. + * + * @property {Object} source + * The location of the source files to build. + * + * This object should have the same structure as [Source]{@link google.devtools.cloudbuild.v1.Source} + * + * @property {Object[]} steps + * Required. The operations to be performed on the workspace. + * + * This object should have the same structure as [BuildStep]{@link google.devtools.cloudbuild.v1.BuildStep} + * + * @property {Object} results + * Output only. Results of the build. + * + * This object should have the same structure as [Results]{@link google.devtools.cloudbuild.v1.Results} + * + * @property {Object} createTime + * Output only. Time at which the request to create the build was received. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} startTime + * Output only. Time at which execution of the build was started. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} finishTime + * Output only. Time at which execution of the build was finished. + * + * The difference between finish_time and start_time is the duration of the + * build's execution. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} timeout + * Amount of time that this build should be allowed to run, to second + * granularity. If this amount of time elapses, work on the build will cease + * and the build status will be `TIMEOUT`. + * + * Default time is ten minutes. + * + * This object should have the same structure as [Duration]{@link google.protobuf.Duration} + * + * @property {string[]} images + * A list of images to be pushed upon the successful completion of all build + * steps. + * + * The images are pushed using the builder service account's credentials. + * + * The digests of the pushed images will be stored in the `Build` resource's + * results field. + * + * If any of the images fail to be pushed, the build status is marked + * `FAILURE`. + * + * @property {Object} artifacts + * Artifacts produced by the build that should be uploaded upon + * successful completion of all build steps. + * + * This object should have the same structure as [Artifacts]{@link google.devtools.cloudbuild.v1.Artifacts} + * + * @property {string} logsBucket + * Google Cloud Storage bucket where logs should be written (see + * [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. + * + * @property {Object} sourceProvenance + * Output only. A permanent fixed identifier for source. + * + * This object should have the same structure as [SourceProvenance]{@link google.devtools.cloudbuild.v1.SourceProvenance} + * + * @property {string} buildTriggerId + * Output only. The ID of the `BuildTrigger` that triggered this build, if it + * was triggered automatically. + * + * @property {Object} options + * Special options for this build. + * + * This object should have the same structure as [BuildOptions]{@link google.devtools.cloudbuild.v1.BuildOptions} + * + * @property {string} logUrl + * Output only. URL to logs for this build in Google Cloud Console. + * + * @property {Object.} substitutions + * Substitutions data for `Build` resource. + * + * @property {string[]} tags + * Tags for annotation of a `Build`. These are not docker tags. + * + * @property {Object[]} secrets + * Secrets to decrypt using Cloud Key Management Service. + * + * This object should have the same structure as [Secret]{@link google.devtools.cloudbuild.v1.Secret} + * + * @property {Object.} timing + * Output only. Stores timing information for phases of the build. Valid keys + * are: + * + * * BUILD: time to execute all build steps + * * PUSH: time to push all specified images. + * * FETCHSOURCE: time to fetch source. + * + * If the build does not specify source or images, + * these keys will not be included. + * + * @typedef Build + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Build definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Build = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Possible status of a build or build step. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + Status: { + + /** + * Status of the build is unknown. + */ + STATUS_UNKNOWN: 0, + + /** + * Build or step is queued; work has not yet begun. + */ + QUEUED: 1, + + /** + * Build or step is being executed. + */ + WORKING: 2, + + /** + * Build or step finished successfully. + */ + SUCCESS: 3, + + /** + * Build or step failed to complete successfully. + */ + FAILURE: 4, + + /** + * Build or step failed due to an internal cause. + */ + INTERNAL_ERROR: 5, + + /** + * Build or step took longer than was allowed. + */ + TIMEOUT: 6, + + /** + * Build or step was canceled by a user. + */ + CANCELLED: 7 + } +}; + +/** + * Artifacts produced by a build that should be uploaded upon + * successful completion of all build steps. + * + * @property {string[]} images + * A list of images to be pushed upon the successful completion of all build + * steps. + * + * The images will be pushed using the builder service account's credentials. + * + * The digests of the pushed images will be stored in the Build resource's + * results field. + * + * If any of the images fail to be pushed, the build is marked FAILURE. + * + * @property {Object} objects + * A list of objects to be uploaded to Cloud Storage upon successful + * completion of all build steps. + * + * Files in the workspace matching specified paths globs will be uploaded to + * the specified Cloud Storage location using the builder service account's + * credentials. + * + * The location and generation of the uploaded objects will be stored in the + * Build resource's results field. + * + * If any objects fail to be pushed, the build is marked FAILURE. + * + * This object should have the same structure as [ArtifactObjects]{@link google.devtools.cloudbuild.v1.ArtifactObjects} + * + * @typedef Artifacts + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Artifacts definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Artifacts = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Files in the workspace to upload to Cloud Storage upon successful + * completion of all build steps. + * + * @property {string} location + * Cloud Storage bucket and optional object path, in the form + * "gs://bucket/path/to/somewhere/". (see [Bucket Name + * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + * + * Files in the workspace matching any path pattern will be uploaded to + * Cloud Storage with this location as a prefix. + * + * @property {string[]} paths + * Path globs used to match files in the build's workspace. + * + * @property {Object} timing + * Output only. Stores timing information for pushing all artifact objects. + * + * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} + * + * @typedef ArtifactObjects + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ + ArtifactObjects: { + // This is for documentation. Actual contents will be loaded by gRPC. + } +}; + +/** + * Start and end times for a build execution phase. + * + * @property {Object} startTime + * Start of time span. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} endTime + * End of time span. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @typedef TimeSpan + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.TimeSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const TimeSpan = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Metadata for build operations. + * + * @property {Object} build + * The build that the operation is tracking. + * + * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} + * + * @typedef BuildOperationMetadata + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.BuildOperationMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const BuildOperationMetadata = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Provenance of the source. Ways to find the original source, or verify that + * some source was used for this build. + * + * @property {Object} resolvedStorageSource + * A copy of the build's `source.storage_source`, if exists, with any + * generations resolved. + * + * This object should have the same structure as [StorageSource]{@link google.devtools.cloudbuild.v1.StorageSource} + * + * @property {Object} resolvedRepoSource + * A copy of the build's `source.repo_source`, if exists, with any + * revisions resolved. + * + * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} + * + * @property {Object.} fileHashes + * Output only. Hash(es) of the build source, which can be used to verify that + * the original source integrity was maintained in the build. Note that + * `FileHashes` will only be populated if `BuildOptions` has requested a + * `SourceProvenanceHash`. + * + * The keys to this map are file paths used as build source and the values + * contain the hash values for those files. + * + * If the build source came in a single package such as a gzipped tarfile + * (`.tar.gz`), the `FileHash` will be for the single path to that file. + * + * @typedef SourceProvenance + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.SourceProvenance definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const SourceProvenance = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Container message for hashes of byte content of files, used in + * SourceProvenance messages to verify integrity of source input to the build. + * + * @property {Object[]} fileHash + * Collection of file hashes. + * + * This object should have the same structure as [Hash]{@link google.devtools.cloudbuild.v1.Hash} + * + * @typedef FileHashes + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.FileHashes definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const FileHashes = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Container message for hash values. + * + * @property {number} type + * The type of hash that was performed. + * + * The number should be among the values of [HashType]{@link google.devtools.cloudbuild.v1.HashType} + * + * @property {Buffer} value + * The hash value. + * + * @typedef Hash + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Hash definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Hash = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Specifies the hash algorithm, if any. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + HashType: { + + /** + * No hash requested. + */ + NONE: 0, + + /** + * Use a sha256 hash. + */ + SHA256: 1, + + /** + * Use a md5 hash. + */ + MD5: 2 + } +}; + +/** + * Pairs a set of secret environment variables containing encrypted + * values with the Cloud KMS key to use to decrypt the value. + * + * @property {string} kmsKeyName + * Cloud KMS key name to use to decrypt these envs. + * + * @property {Object.} secretEnv + * Map of environment variable name to its encrypted value. + * + * Secret environment variables must be unique across all of a build's + * secrets, and must be used by at least one build step. Values can be at most + * 64 KB in size. There can be at most 100 secret values across all of a + * build's secrets. + * + * @typedef Secret + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Secret definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Secret = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to create a new build. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {Object} build + * Required. Build resource to create. + * + * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} + * + * @typedef CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.CreateBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const CreateBuildRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to get a build. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {string} id + * Required. ID of the build. + * + * @typedef GetBuildRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.GetBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const GetBuildRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to list builds. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {number} pageSize + * Number of results to return in the list. + * + * @property {string} pageToken + * Token to provide to skip to a particular spot in the list. + * + * @property {string} filter + * The raw filter text to constrain the results. + * + * @typedef ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListBuildsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListBuildsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response including listed builds. + * + * @property {Object[]} builds + * Builds will be sorted by `create_time`, descending. + * + * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} + * + * @property {string} nextPageToken + * Token to receive the next page of results. + * + * @typedef ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListBuildsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListBuildsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to cancel an ongoing build. + * + * @property {string} projectId + * Required. ID of the project. + * + * @property {string} id + * Required. ID of the build. + * + * @typedef CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.CancelBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const CancelBuildRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Configuration for an automated build in response to source repository + * changes. + * + * @property {string} id + * Output only. Unique identifier of the trigger. + * + * @property {string} description + * Human-readable description of this trigger. + * + * @property {string} name + * User assigned name of the trigger. Must be unique within the project. + * + * @property {string[]} tags + * Tags for annotation of a `BuildTrigger` + * + * @property {Object} triggerTemplate + * Template describing the types of source changes to trigger a build. + * + * Branch and tag names in trigger templates are interpreted as regular + * expressions. Any branch or tag change that matches that regular expression + * will trigger a build. + * + * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} + * + * @property {Object} github + * GitHubEventsConfig describes the configuration of a trigger that creates + * a build whenever a GitHub event is received. + * + * This object should have the same structure as [GitHubEventsConfig]{@link google.devtools.cloudbuild.v1.GitHubEventsConfig} + * + * @property {Object} build + * Contents of the build template. + * + * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} + * + * @property {string} filename + * Path, from the source root, to a file whose contents is used for the + * template. + * + * @property {Object} createTime + * Output only. Time when the trigger was created. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {boolean} disabled + * If true, the trigger will never result in a build. + * + * @property {Object.} substitutions + * Substitutions data for Build resource. + * + * @property {string[]} ignoredFiles + * ignored_files and included_files are file glob matches using + * http://godoc/pkg/path/filepath#Match extended with support for "**". + * + * If ignored_files and changed files are both empty, then they are + * not used to determine whether or not to trigger a build. + * + * If ignored_files is not empty, then we ignore any files that match + * any of the ignored_file globs. If the change has no files that are + * outside of the ignored_files globs, then we do not trigger a build. + * + * @property {string[]} includedFiles + * If any of the files altered in the commit pass the ignored_files + * filter and included_files is empty, then as far as this filter is + * concerned, we should trigger the build. + * + * If any of the files altered in the commit pass the ignored_files + * filter and included_files is not empty, then we make sure that at + * least one of those files matches a included_files glob. If not, + * then we do not trigger a build. + * + * @typedef BuildTrigger + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.BuildTrigger definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const BuildTrigger = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * GitHubEventsConfig describes the configuration of a trigger that creates a + * build whenever a GitHub event is received. + * + * This message is experimental. + * + * @property {number} installationId + * The installationID that emits the GitHub event. + * + * @property {string} owner + * Owner of the repository. For example: The owner for + * https://github.com/googlecloudplatform/cloud-builders is + * "googlecloudplatform". + * + * @property {string} name + * Name of the repository. For example: The name for + * https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". + * + * @property {Object} pullRequest + * filter to match changes in pull requests. + * + * This object should have the same structure as [PullRequestFilter]{@link google.devtools.cloudbuild.v1.PullRequestFilter} + * + * @property {Object} push + * filter to match changes in refs like branches, tags. + * + * This object should have the same structure as [PushFilter]{@link google.devtools.cloudbuild.v1.PushFilter} + * + * @typedef GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.GitHubEventsConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const GitHubEventsConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * PullRequestFilter contains filter properties for matching GitHub Pull + * Requests. + * + * @property {string} branch + * Regex of branches to match. + * + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * @property {number} commentControl + * Whether to block builds on a "/gcbrun" comment from a repository owner or + * collaborator. + * + * The number should be among the values of [CommentControl]{@link google.devtools.cloudbuild.v1.CommentControl} + * + * @typedef PullRequestFilter + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.PullRequestFilter definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const PullRequestFilter = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Controls behavior of Pull Request comments. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + CommentControl: { + + /** + * Do not require comments on Pull Requests before builds are triggered. + */ + COMMENTS_DISABLED: 0, + + /** + * Enforce that repository owners or collaborators must comment on Pull + * Requests before builds are triggered. + */ + COMMENTS_ENABLED: 1 + } +}; + +/** + * Push contains filter properties for matching GitHub git pushes. + * + * @property {string} branch + * Regexes matching branches to build. + * + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * @property {string} tag + * Regexes matching tags to build. + * + * The syntax of the regular expressions accepted is the syntax accepted by + * RE2 and described at https://github.com/google/re2/wiki/Syntax + * + * @typedef PushFilter + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.PushFilter definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const PushFilter = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to create a new `BuildTrigger`. + * + * @property {string} projectId + * Required. ID of the project for which to configure automatic builds. + * + * @property {Object} trigger + * Required. `BuildTrigger` to create. + * + * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} + * + * @typedef CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.CreateBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const CreateBuildTriggerRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Returns the `BuildTrigger` with the specified ID. + * + * @property {string} projectId + * Required. ID of the project that owns the trigger. + * + * @property {string} triggerId + * Required. ID of the `BuildTrigger` to get. + * + * @typedef GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.GetBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const GetBuildTriggerRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to list existing `BuildTriggers`. + * + * @property {string} projectId + * Required. ID of the project for which to list BuildTriggers. + * + * @property {number} pageSize + * Number of results to return in the list. + * + * @property {string} pageToken + * Token to provide to skip to a particular spot in the list. + * + * @typedef ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListBuildTriggersRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListBuildTriggersRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response containing existing `BuildTriggers`. + * + * @property {Object[]} triggers + * `BuildTriggers` for the project, sorted by `create_time` descending. + * + * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} + * + * @property {string} nextPageToken + * Token to receive the next page of results. + * + * @typedef ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListBuildTriggersResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListBuildTriggersResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to delete a `BuildTrigger`. + * + * @property {string} projectId + * Required. ID of the project that owns the trigger. + * + * @property {string} triggerId + * Required. ID of the `BuildTrigger` to delete. + * + * @typedef DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const DeleteBuildTriggerRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to update an existing `BuildTrigger`. + * + * @property {string} projectId + * Required. ID of the project that owns the trigger. + * + * @property {string} triggerId + * Required. ID of the `BuildTrigger` to update. + * + * @property {Object} trigger + * Required. `BuildTrigger` to update. + * + * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} + * + * @typedef UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const UpdateBuildTriggerRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Optional arguments to enable specific features of builds. + * + * @property {number[]} sourceProvenanceHash + * Requested hash for SourceProvenance. + * + * The number should be among the values of [HashType]{@link google.devtools.cloudbuild.v1.HashType} + * + * @property {number} requestedVerifyOption + * Requested verifiability options. + * + * The number should be among the values of [VerifyOption]{@link google.devtools.cloudbuild.v1.VerifyOption} + * + * @property {number} machineType + * Compute Engine machine type on which to run the build. + * + * The number should be among the values of [MachineType]{@link google.devtools.cloudbuild.v1.MachineType} + * + * @property {number} diskSizeGb + * Requested disk size for the VM that runs the build. Note that this is *NOT* + * "disk free"; some of the space will be used by the operating system and + * build utilities. Also note that this is the minimum disk size that will be + * allocated for the build -- the build may run with a larger disk than + * requested. At present, the maximum disk size is 1000GB; builds that request + * more than the maximum are rejected with an error. + * + * @property {number} substitutionOption + * Option to specify behavior when there is an error in the substitution + * checks. + * + * The number should be among the values of [SubstitutionOption]{@link google.devtools.cloudbuild.v1.SubstitutionOption} + * + * @property {number} logStreamingOption + * Option to define build log streaming behavior to Google Cloud + * Storage. + * + * The number should be among the values of [LogStreamingOption]{@link google.devtools.cloudbuild.v1.LogStreamingOption} + * + * @property {string} workerPool + * Option to specify a `WorkerPool` for the build. User specifies the pool + * with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". + * This is an experimental field. + * + * @property {number} logging + * Option to specify the logging mode, which determines where the logs are + * stored. + * + * The number should be among the values of [LoggingMode]{@link google.devtools.cloudbuild.v1.LoggingMode} + * + * @property {string[]} env + * A list of global environment variable definitions that will exist for all + * build steps in this build. If a variable is defined in both globally and in + * a build step, the variable will use the build step value. + * + * The elements are of the form "KEY=VALUE" for the environment variable "KEY" + * being given the value "VALUE". + * + * @property {string[]} secretEnv + * A list of global environment variables, which are encrypted using a Cloud + * Key Management Service crypto key. These values must be specified in the + * build's `Secret`. These variables will be available to all build steps + * in this build. + * + * @property {Object[]} volumes + * Global list of volumes to mount for ALL build steps + * + * Each volume is created as an empty volume prior to starting the build + * process. Upon completion of the build, volumes and their contents are + * discarded. Global volume names and paths cannot conflict with the volumes + * defined a build step. + * + * Using a global volume in a build with only one step is not valid as + * it is indicative of a build request with an incorrect configuration. + * + * This object should have the same structure as [Volume]{@link google.devtools.cloudbuild.v1.Volume} + * + * @typedef BuildOptions + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.BuildOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const BuildOptions = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Specifies the behavior when writing build logs to Google Cloud Storage. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + LogStreamingOption: { + + /** + * Service may automatically determine build log streaming behavior. + */ + STREAM_DEFAULT: 0, + + /** + * Build logs should be streamed to Google Cloud Storage. + */ + STREAM_ON: 1, + + /** + * Build logs should not be streamed to Google Cloud Storage; they will be + * written when the build is completed. + */ + STREAM_OFF: 2 + }, + + /** + * Specifies the logging mode. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + LoggingMode: { + + /** + * The service determines the logging mode. The default is `LEGACY`. Do not + * rely on the default logging behavior as it may change in the future. + */ + LOGGING_UNSPECIFIED: 0, + + /** + * Stackdriver logging and Cloud Storage logging are enabled. + */ + LEGACY: 1, + + /** + * Only Cloud Storage logging is enabled. + */ + GCS_ONLY: 2 + }, + + /** + * Supported VM sizes. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + MachineType: { + + /** + * Standard machine type. + */ + UNSPECIFIED: 0, + + /** + * Highcpu machine with 8 CPUs. + */ + N1_HIGHCPU_8: 1, + + /** + * Highcpu machine with 32 CPUs. + */ + N1_HIGHCPU_32: 2 + }, + + /** + * Specifies the behavior when there is an error in the substitution checks. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + SubstitutionOption: { + + /** + * Fails the build if error in substitutions checks, like missing + * a substitution in the template or in the map. + */ + MUST_MATCH: 0, + + /** + * Do not fail the build if error in substitutions checks. + */ + ALLOW_LOOSE: 1 + }, + + /** + * Specifies the manner in which the build should be verified, if at all. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + VerifyOption: { + + /** + * Not a verifiable build. (default) + */ + NOT_VERIFIED: 0, + + /** + * Verified build. + */ + VERIFIED: 1 + } +}; + +/** + * Configuration for a WorkerPool to run the builds. + * + * Workers are machines that Cloud Build uses to run your builds. By default, + * all workers run in a project owned by Cloud Build. To have full control over + * the workers that execute your builds -- such as enabling them to access + * private resources on your private network -- you can request Cloud Build to + * run the workers in your own project by creating a custom workers pool. + * + * @property {string} name + * User-defined name of the `WorkerPool`. + * + * @property {string} projectId + * The project ID of the GCP project for which the `WorkerPool` is created. + * + * @property {string} serviceAccountEmail + * Output only. The service account used to manage the `WorkerPool`. The + * service account must have the Compute Instance Admin (Beta) permission at + * the project level. + * + * @property {number} workerCount + * Total number of workers to be created across all requested regions. + * + * @property {Object} workerConfig + * Configuration to be used for a creating workers in the `WorkerPool`. + * + * This object should have the same structure as [WorkerConfig]{@link google.devtools.cloudbuild.v1.WorkerConfig} + * + * @property {number[]} regions + * List of regions to create the `WorkerPool`. Regions can't be empty. + * If Cloud Build adds a new GCP region in the future, the existing + * `WorkerPool` will not be enabled in the new region automatically; + * you must add the new region to the `regions` field to enable the + * `WorkerPool` in that region. + * + * The number should be among the values of [Region]{@link google.devtools.cloudbuild.v1.Region} + * + * @property {Object} createTime + * Output only. Time at which the request to create the `WorkerPool` was + * received. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} updateTime + * Output only. Time at which the request to update the `WorkerPool` was + * received. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {Object} deleteTime + * Output only. Time at which the request to delete the `WorkerPool` was + * received. + * + * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} + * + * @property {number} status + * Output only. WorkerPool Status. + * + * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} + * + * @typedef WorkerPool + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.WorkerPool definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const WorkerPool = { + // This is for documentation. Actual contents will be loaded by gRPC. + + /** + * Supported GCP regions to create the `WorkerPool`. + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + Region: { + + /** + * no region + */ + REGION_UNSPECIFIED: 0, + + /** + * us-central1 region + */ + US_CENTRAL1: 1, + + /** + * us-west1 region + */ + US_WEST1: 2, + + /** + * us-east1 region + */ + US_EAST1: 3, + + /** + * us-east4 region + */ + US_EAST4: 4 + }, + + /** + * `WorkerPool` status + * + * @enum {number} + * @memberof google.devtools.cloudbuild.v1 + */ + Status: { + + /** + * Status of the `WorkerPool` is unknown. + */ + STATUS_UNSPECIFIED: 0, + + /** + * `WorkerPool` is being created. + */ + CREATING: 1, + + /** + * `WorkerPool` is running. + */ + RUNNING: 2, + + /** + * `WorkerPool` is being deleting: cancelling builds and draining workers. + */ + DELETING: 3, + + /** + * `WorkerPool` is deleted. + */ + DELETED: 4 + } +}; + +/** + * WorkerConfig defines the configuration to be used for a creating workers in + * the pool. + * + * @property {string} machineType + * Machine Type of the worker, such as n1-standard-1. + * See https://cloud.google.com/compute/docs/machine-types. + * If left blank, Cloud Build will use a standard unspecified machine to + * create the worker pool. + * `machine_type` is overridden if you specify a different machine type in + * `build_options`. In this case, the VM specified in the `build_options` + * will be created on demand at build time. For more information see + * https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes + * + * @property {number} diskSizeGb + * Size of the disk attached to the worker, in GB. + * See https://cloud.google.com/compute/docs/disks/ + * If `0` is specified, Cloud Build will use a standard disk size. + * `disk_size` is overridden if you specify a different disk size in + * `build_options`. In this case, a VM with a disk size specified in the + * `build_options` will be created on demand at build time. For more + * information see + * https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions + * + * @property {Object} network + * The network definition used to create the worker. + * If this section is left empty, the workers will be created in + * WorkerPool.project_id on the default network. + * + * This object should have the same structure as [Network]{@link google.devtools.cloudbuild.v1.Network} + * + * @property {string} tag + * The tag applied to the worker, and the same tag used by the firewall rule. + * It is used to identify the Cloud Build workers among other VMs. + * The default value for tag is `worker`. + * + * @typedef WorkerConfig + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.WorkerConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const WorkerConfig = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Network describes the GCP network used to create workers in. + * + * @property {string} projectId + * Project id containing the defined network and subnetwork. For a peered VPC, + * this will be the same as the project_id in which the workers are created. + * For a shared VPC, this will be the project sharing the network with the + * project_id project in which workers will be created. For custom workers + * with no VPC, this will be the same as project_id. + * + * @property {string} network + * Network on which the workers are created. + * "default" network is used if empty. + * + * @property {string} subnetwork + * Subnetwork on which the workers are created. + * "default" subnetwork is used if empty. + * + * @typedef Network + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.Network definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const Network = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to create a new `WorkerPool`. + * + * @property {string} parent + * ID of the parent project. + * + * @property {Object} workerPool + * `WorkerPool` resource to create. + * + * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} + * + * @typedef CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.CreateWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const CreateWorkerPoolRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to get a `WorkerPool` with the specified name. + * + * @property {string} name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * + * @typedef GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.GetWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const GetWorkerPoolRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to delete a `WorkerPool`. + * + * @property {string} name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * + * @typedef DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const DeleteWorkerPoolRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to update a `WorkerPool`. + * + * @property {string} name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * + * @property {Object} workerPool + * `WorkerPool` resource to update. + * + * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} + * + * @typedef UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const UpdateWorkerPoolRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Request to list `WorkerPool`s. + * + * @property {string} parent + * ID of the parent project. + * + * @typedef ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListWorkerPoolsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListWorkerPoolsRequest = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; + +/** + * Response containing existing `WorkerPools`. + * + * @property {Object[]} workerPools + * `WorkerPools` for the project. + * + * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} + * + * @typedef ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1 + * @see [google.devtools.cloudbuild.v1.ListWorkerPoolsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} + */ +const ListWorkerPoolsResponse = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js new file mode 100644 index 000000000000..4719aebdc91b --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js @@ -0,0 +1,63 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * This resource represents a long-running operation that is the result of a + * network API call. + * + * @property {string} name + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should have the format of `operations/some/unique/name`. + * + * @property {Object} metadata + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + * + * This object should have the same structure as [Any]{@link google.protobuf.Any} + * + * @property {boolean} done + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + * + * @property {Object} error + * The error result of the operation in case of failure or cancellation. + * + * This object should have the same structure as [Status]{@link google.rpc.Status} + * + * @property {Object} response + * The normal response of the operation in case of success. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + * + * This object should have the same structure as [Any]{@link google.protobuf.Any} + * + * @typedef Operation + * @memberof google.longrunning + * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} + */ +const Operation = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js new file mode 100644 index 000000000000..cdd2fc80e49b --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js @@ -0,0 +1,137 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := ptypes.MarshalAny(foo) + * ... + * foo := &pb.Foo{} + * if err := ptypes.UnmarshalAny(any, foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * + * # JSON + * + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message google.protobuf.Duration): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * + * @property {string} typeUrl + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a google.protobuf.Type + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * + * @property {Buffer} value + * Must be a valid serialized protocol buffer of the above specified type. + * + * @typedef Any + * @memberof google.protobuf + * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} + */ +const Any = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js new file mode 100644 index 000000000000..1275f8f4d136 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js @@ -0,0 +1,97 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A Duration represents a signed, fixed-length span of time represented + * as a count of seconds and fractions of seconds at nanosecond + * resolution. It is independent of any calendar and concepts like "day" + * or "month". It is related to Timestamp in that the difference between + * two Timestamp values is a Duration and it can be added or subtracted + * from a Timestamp. Range is approximately +-10,000 years. + * + * # Examples + * + * Example 1: Compute Duration from two Timestamps in pseudo code. + * + * Timestamp start = ...; + * Timestamp end = ...; + * Duration duration = ...; + * + * duration.seconds = end.seconds - start.seconds; + * duration.nanos = end.nanos - start.nanos; + * + * if (duration.seconds < 0 && duration.nanos > 0) { + * duration.seconds += 1; + * duration.nanos -= 1000000000; + * } else if (durations.seconds > 0 && duration.nanos < 0) { + * duration.seconds -= 1; + * duration.nanos += 1000000000; + * } + * + * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + * + * Timestamp start = ...; + * Duration duration = ...; + * Timestamp end = ...; + * + * end.seconds = start.seconds + duration.seconds; + * end.nanos = start.nanos + duration.nanos; + * + * if (end.nanos < 0) { + * end.seconds -= 1; + * end.nanos += 1000000000; + * } else if (end.nanos >= 1000000000) { + * end.seconds += 1; + * end.nanos -= 1000000000; + * } + * + * Example 3: Compute Duration from datetime.timedelta in Python. + * + * td = datetime.timedelta(days=3, minutes=10) + * duration = Duration() + * duration.FromTimedelta(td) + * + * # JSON Mapping + * + * In JSON format, the Duration type is encoded as a string rather than an + * object, where the string ends in the suffix "s" (indicating seconds) and + * is preceded by the number of seconds, with nanoseconds expressed as + * fractional seconds. For example, 3 seconds with 0 nanoseconds should be + * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + * microsecond should be expressed in JSON format as "3.000001s". + * + * @property {number} seconds + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + * + * @property {number} nanos + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + * + * @typedef Duration + * @memberof google.protobuf + * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} + */ +const Duration = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js new file mode 100644 index 000000000000..0b446dd9ce4f --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js @@ -0,0 +1,34 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A generic empty message that you can re-use to avoid defining duplicated + * empty messages in your APIs. A typical example is to use it as the request + * or the response type of an API method. For instance: + * + * service Foo { + * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + * } + * + * The JSON representation for `Empty` is empty JSON object `{}`. + * @typedef Empty + * @memberof google.protobuf + * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} + */ +const Empty = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js new file mode 100644 index 000000000000..3bc1e986897a --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js @@ -0,0 +1,119 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * A Timestamp represents a point in time independent of any time zone or local + * calendar, encoded as a count of seconds and fractions of seconds at + * nanosecond resolution. The count is relative to an epoch at UTC midnight on + * January 1, 1970, in the proleptic Gregorian calendar which extends the + * Gregorian calendar backwards to year one. + * + * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + * second table is needed for interpretation, using a [24-hour linear + * smear](https://developers.google.com/time/smear). + * + * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + * restricting to that range, we ensure that we can convert to and from [RFC + * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + * + * # Examples + * + * Example 1: Compute Timestamp from POSIX `time()`. + * + * Timestamp timestamp; + * timestamp.set_seconds(time(NULL)); + * timestamp.set_nanos(0); + * + * Example 2: Compute Timestamp from POSIX `gettimeofday()`. + * + * struct timeval tv; + * gettimeofday(&tv, NULL); + * + * Timestamp timestamp; + * timestamp.set_seconds(tv.tv_sec); + * timestamp.set_nanos(tv.tv_usec * 1000); + * + * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + * + * FILETIME ft; + * GetSystemTimeAsFileTime(&ft); + * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + * + * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + * Timestamp timestamp; + * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + * + * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + * + * long millis = System.currentTimeMillis(); + * + * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + * .setNanos((int) ((millis % 1000) * 1000000)).build(); + * + * + * Example 5: Compute Timestamp from current time in Python. + * + * timestamp = Timestamp() + * timestamp.GetCurrentTime() + * + * # JSON Mapping + * + * In JSON format, the Timestamp type is encoded as a string in the + * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" + * where {year} is always expressed using four digits while {month}, {day}, + * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional + * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + * is required. A proto3 JSON serializer should always use UTC (as indicated by + * "Z") when printing the Timestamp type and a proto3 JSON parser should be + * able to accept both UTC and other timezones (as indicated by an offset). + * + * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + * 01:30 UTC on January 15, 2017. + * + * In JavaScript, one can convert a Date object to this format using the + * standard + * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + * method. In Python, a standard `datetime.datetime` object can be converted + * to this format using + * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com + * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D + * ) to obtain a formatter capable of generating timestamps in this format. + * + * @property {number} seconds + * Represents seconds of UTC time since Unix epoch + * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + * 9999-12-31T23:59:59Z inclusive. + * + * @property {number} nanos + * Non-negative fractions of a second at nanosecond resolution. Negative + * second values with fractions must still have non-negative nanos values + * that count forward in time. Must be from 0 to 999,999,999 + * inclusive. + * + * @typedef Timestamp + * @memberof google.protobuf + * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} + */ +const Timestamp = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js new file mode 100644 index 000000000000..432ab6bb928a --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js @@ -0,0 +1,95 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Note: this file is purely for documentation. Any contents are not expected +// to be loaded as the JS file. + +/** + * The `Status` type defines a logical error model that is suitable for + * different programming environments, including REST APIs and RPC APIs. It is + * used by [gRPC](https://github.com/grpc). The error model is designed to be: + * + * - Simple to use and understand for most users + * - Flexible enough to meet unexpected needs + * + * # Overview + * + * The `Status` message contains three pieces of data: error code, error + * message, and error details. The error code should be an enum value of + * google.rpc.Code, but it may accept additional error codes + * if needed. The error message should be a developer-facing English message + * that helps developers *understand* and *resolve* the error. If a localized + * user-facing error message is needed, put the localized message in the error + * details or localize it in the client. The optional error details may contain + * arbitrary information about the error. There is a predefined set of error + * detail types in the package `google.rpc` that can be used for common error + * conditions. + * + * # Language mapping + * + * The `Status` message is the logical representation of the error model, but it + * is not necessarily the actual wire format. When the `Status` message is + * exposed in different client libraries and different wire protocols, it can be + * mapped differently. For example, it will likely be mapped to some exceptions + * in Java, but more likely mapped to some error codes in C. + * + * # Other uses + * + * The error model and the `Status` message can be used in a variety of + * environments, either with or without APIs, to provide a + * consistent developer experience across different environments. + * + * Example uses of this error model include: + * + * - Partial errors. If a service needs to return partial errors to the client, + * it may embed the `Status` in the normal response to indicate the partial + * errors. + * + * - Workflow errors. A typical workflow has multiple steps. Each step may + * have a `Status` message for error reporting. + * + * - Batch operations. If a client uses batch request and batch response, the + * `Status` message should be used directly inside batch response, one for + * each error sub-response. + * + * - Asynchronous operations. If an API call embeds asynchronous operation + * results in its response, the status of those operations should be + * represented directly using the `Status` message. + * + * - Logging. If some API errors are stored in logs, the message `Status` could + * be used directly after any stripping needed for security/privacy reasons. + * + * @property {number} code + * The status code, which should be an enum value of + * google.rpc.Code. + * + * @property {string} message + * A developer-facing error message, which should be in English. Any + * user-facing error message should be localized and sent in the + * google.rpc.Status.details field, or localized + * by the client. + * + * @property {Object[]} details + * A list of messages that carry the error details. There is a common set of + * message types for APIs to use. + * + * This object should have the same structure as [Any]{@link google.protobuf.Any} + * + * @typedef Status + * @memberof google.rpc + * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} + */ +const Status = { + // This is for documentation. Actual contents will be loaded by gRPC. +}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/index.js b/packages/google-devtools-cloudbuild/src/v1/index.js new file mode 100644 index 000000000000..9ac059ef19c4 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/index.js @@ -0,0 +1,19 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const CloudBuildClient = require('./cloud_build_client'); + +module.exports.CloudBuildClient = CloudBuildClient; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata new file mode 100644 index 000000000000..b6f5fabc7f0a --- /dev/null +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -0,0 +1,39 @@ +{ + "updateTime": "2019-10-17T01:46:51.465084Z", + "sources": [ + { + "generator": { + "name": "artman", + "version": "0.39.0", + "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "c6e62c7e5e61e6dae7fdc3bc3de81f60e6a9445c", + "internalRef": "274798600" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.5.2" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "cloudbuild", + "apiVersion": "v1", + "language": "nodejs", + "generator": "gapic", + "config": "google/devtools/cloudbuild/artman_cloudbuild.yaml" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index b83e905a7e6a..61ea6b62bfe7 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -28,7 +28,7 @@ 'cloudbuild', config_path='/google/devtools/cloudbuild/artman_cloudbuild.yaml', version=version) - s.copy(library, excludes=[]) + s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() @@ -38,3 +38,24 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) + +# Add missing jsdoc annotations: +s.replace("src/index.js", +r"""\/\*\* + \* @namespace google + \*/""", +r"""/** + * @namespace google + */ +/** + * @namespace google.rpc + */ +/** + * @namespace google.protobuf + */ +/** + * @namespace google.longrunning + */""") +s.replace("src/index.js", +r"namespace google.cloud.cloudbuild", +r"namespace google.devtools.cloudbuild") diff --git a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml new file mode 100644 index 000000000000..6db2a46c5358 --- /dev/null +++ b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +env: + mocha: true diff --git a/packages/google-devtools-cloudbuild/system-test/system.js b/packages/google-devtools-cloudbuild/system-test/system.js new file mode 100644 index 000000000000..c682da709de1 --- /dev/null +++ b/packages/google-devtools-cloudbuild/system-test/system.js @@ -0,0 +1,30 @@ +/** + * Copyright 2019, Google, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +'use strict'; + +const {assert} = require('chai'); +const {CloudBuildClient} = require('../'); +const PROJECT_ID = process.env.GCLOUD_PROJECT; +const cb = new CloudBuildClient(); + +describe('Integration Tests', () => { + it('should list triggers on project', async () => { + const [result] = await cb.listBuildTriggers({ + projectId: PROJECT_ID, + }); + assert.ok(result.triggers.length > 0); + }); +}); diff --git a/packages/google-devtools-cloudbuild/test/.eslintrc.yml b/packages/google-devtools-cloudbuild/test/.eslintrc.yml new file mode 100644 index 000000000000..e28757c0a59b --- /dev/null +++ b/packages/google-devtools-cloudbuild/test/.eslintrc.yml @@ -0,0 +1,3 @@ +--- +env: + mocha: true \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/test/gapic-v1.js b/packages/google-devtools-cloudbuild/test/gapic-v1.js new file mode 100644 index 000000000000..70bd26c0450c --- /dev/null +++ b/packages/google-devtools-cloudbuild/test/gapic-v1.js @@ -0,0 +1,1084 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +const assert = require('assert'); + +const cloudbuildModule = require('../src'); + +const FAKE_STATUS_CODE = 1; +const error = new Error(); +error.code = FAKE_STATUS_CODE; + +describe('CloudBuildClient', () => { + it('has servicePath', () => { + const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudbuildModule.v1.CloudBuildClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no options', () => { + const client = new cloudbuildModule.v1.CloudBuildClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({fallback: true}); + assert(client); + }); + + describe('createBuild', () => { + it('invokes createBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const build = {}; + const request = { + projectId: projectId, + build: build, + }; + + // Mock response + const name = 'name3373707'; + const done_ = true; + const expectedResponse = { + name: name, + done: done_, + }; + + // Mock Grpc layer + client._innerApiCalls.createBuild = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createBuild(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const build = {}; + const request = { + projectId: projectId, + build: build, + }; + + // Mock Grpc layer + client._innerApiCalls.createBuild = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createBuild(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getBuild', () => { + it('invokes getBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock response + const id2 = 'id23227150'; + const projectId2 = 'projectId2939242356'; + const statusDetail = 'statusDetail2089931070'; + const logsBucket = 'logsBucket1565363834'; + const buildTriggerId = 'buildTriggerId1105559411'; + const logUrl = 'logUrl342054388'; + const expectedResponse = { + id: id2, + projectId: projectId2, + statusDetail: statusDetail, + logsBucket: logsBucket, + buildTriggerId: buildTriggerId, + logUrl: logUrl, + }; + + // Mock Grpc layer + client._innerApiCalls.getBuild = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getBuild(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock Grpc layer + client._innerApiCalls.getBuild = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getBuild(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listBuilds', () => { + it('invokes listBuilds without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const request = { + projectId: projectId, + }; + + // Mock response + const nextPageToken = ''; + const buildsElement = {}; + const builds = [buildsElement]; + const expectedResponse = { + nextPageToken: nextPageToken, + builds: builds, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuilds = (actualRequest, options, callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse.builds); + }; + + client.listBuilds(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse.builds); + done(); + }); + }); + + it('invokes listBuilds with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const request = { + projectId: projectId, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuilds = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listBuilds(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('cancelBuild', () => { + it('invokes cancelBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock response + const id2 = 'id23227150'; + const projectId2 = 'projectId2939242356'; + const statusDetail = 'statusDetail2089931070'; + const logsBucket = 'logsBucket1565363834'; + const buildTriggerId = 'buildTriggerId1105559411'; + const logUrl = 'logUrl342054388'; + const expectedResponse = { + id: id2, + projectId: projectId2, + statusDetail: statusDetail, + logsBucket: logsBucket, + buildTriggerId: buildTriggerId, + logUrl: logUrl, + }; + + // Mock Grpc layer + client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.cancelBuild(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes cancelBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock Grpc layer + client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.cancelBuild(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createBuildTrigger', () => { + it('invokes createBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const trigger = {}; + const request = { + projectId: projectId, + trigger: trigger, + }; + + // Mock response + const id = 'id3355'; + const description = 'description-1724546052'; + const name = 'name3373707'; + const filename = 'filename-734768633'; + const disabled = true; + const expectedResponse = { + id: id, + description: description, + name: name, + filename: filename, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createBuildTrigger(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const trigger = {}; + const request = { + projectId: projectId, + trigger: trigger, + }; + + // Mock Grpc layer + client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createBuildTrigger(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getBuildTrigger', () => { + it('invokes getBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const request = { + projectId: projectId, + triggerId: triggerId, + }; + + // Mock response + const id = 'id3355'; + const description = 'description-1724546052'; + const name = 'name3373707'; + const filename = 'filename-734768633'; + const disabled = true; + const expectedResponse = { + id: id, + description: description, + name: name, + filename: filename, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getBuildTrigger(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const request = { + projectId: projectId, + triggerId: triggerId, + }; + + // Mock Grpc layer + client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getBuildTrigger(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listBuildTriggers', () => { + it('invokes listBuildTriggers without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const request = { + projectId: projectId, + }; + + // Mock response + const nextPageToken = 'nextPageToken-1530815211'; + const expectedResponse = { + nextPageToken: nextPageToken, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuildTriggers = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.listBuildTriggers(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listBuildTriggers with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const request = { + projectId: projectId, + }; + + // Mock Grpc layer + client._innerApiCalls.listBuildTriggers = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listBuildTriggers(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteBuildTrigger', () => { + it('invokes deleteBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const request = { + projectId: projectId, + triggerId: triggerId, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod(request); + + client.deleteBuildTrigger(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const request = { + projectId: projectId, + triggerId: triggerId, + }; + + // Mock Grpc layer + client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteBuildTrigger(request, err => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('updateBuildTrigger', () => { + it('invokes updateBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const trigger = {}; + const request = { + projectId: projectId, + triggerId: triggerId, + trigger: trigger, + }; + + // Mock response + const id = 'id3355'; + const description = 'description-1724546052'; + const name = 'name3373707'; + const filename = 'filename-734768633'; + const disabled = true; + const expectedResponse = { + id: id, + description: description, + name: name, + filename: filename, + disabled: disabled, + }; + + // Mock Grpc layer + client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateBuildTrigger(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const trigger = {}; + const request = { + projectId: projectId, + triggerId: triggerId, + trigger: trigger, + }; + + // Mock Grpc layer + client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateBuildTrigger(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('runBuildTrigger', () => { + it('invokes runBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const source = {}; + const request = { + projectId: projectId, + triggerId: triggerId, + source: source, + }; + + // Mock response + const name = 'name3373707'; + const done_ = true; + const expectedResponse = { + name: name, + done: done_, + }; + + // Mock Grpc layer + client._innerApiCalls.runBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.runBuildTrigger(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes runBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const triggerId = 'triggerId1363517698'; + const source = {}; + const request = { + projectId: projectId, + triggerId: triggerId, + source: source, + }; + + // Mock Grpc layer + client._innerApiCalls.runBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.runBuildTrigger(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('retryBuild', () => { + it('invokes retryBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock response + const name = 'name3373707'; + const done_ = true; + const expectedResponse = { + name: name, + done: done_, + }; + + // Mock Grpc layer + client._innerApiCalls.retryBuild = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.retryBuild(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes retryBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const projectId = 'projectId-1969970175'; + const id = 'id3355'; + const request = { + projectId: projectId, + id: id, + }; + + // Mock Grpc layer + client._innerApiCalls.retryBuild = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.retryBuild(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('createWorkerPool', () => { + it('invokes createWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const name = 'name3373707'; + const projectId = 'projectId-1969970175'; + const serviceAccountEmail = 'serviceAccountEmail-1300473088'; + const workerCount = 372044046; + const expectedResponse = { + name: name, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + workerCount: workerCount, + }; + + // Mock Grpc layer + client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.createWorkerPool(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.createWorkerPool(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('getWorkerPool', () => { + it('invokes getWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const name = 'name3373707'; + const projectId = 'projectId-1969970175'; + const serviceAccountEmail = 'serviceAccountEmail-1300473088'; + const workerCount = 372044046; + const expectedResponse = { + name: name, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + workerCount: workerCount, + }; + + // Mock Grpc layer + client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.getWorkerPool(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.getWorkerPool(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('deleteWorkerPool', () => { + it('invokes deleteWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod(request); + + client.deleteWorkerPool(request, err => { + assert.ifError(err); + done(); + }); + }); + + it('invokes deleteWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.deleteWorkerPool(request, err => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + + describe('updateWorkerPool', () => { + it('invokes updateWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const name = 'name3373707'; + const projectId = 'projectId-1969970175'; + const serviceAccountEmail = 'serviceAccountEmail-1300473088'; + const workerCount = 372044046; + const expectedResponse = { + name: name, + projectId: projectId, + serviceAccountEmail: serviceAccountEmail, + workerCount: workerCount, + }; + + // Mock Grpc layer + client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.updateWorkerPool(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.updateWorkerPool(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + + describe('listWorkerPools', () => { + it('invokes listWorkerPools without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock response + const expectedResponse = {}; + + // Mock Grpc layer + client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( + request, + expectedResponse + ); + + client.listWorkerPools(request, (err, response) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listWorkerPools with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + + // Mock request + const request = {}; + + // Mock Grpc layer + client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( + request, + null, + error + ); + + client.listWorkerPools(request, (err, response) => { + assert(err instanceof Error); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); +}); + +function mockSimpleGrpcMethod(expectedRequest, response, error) { + return function(actualRequest, options, callback) { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js new file mode 100644 index 000000000000..53f96ef10ba5 --- /dev/null +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -0,0 +1,46 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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 = { + entry: './src/browser.js', + output: { + library: 'cloudbuild', + filename: './cloudbuild.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + extensions: ['.js', '.json'], + }, + module: { + rules: [ + { + test: /node_modules[\\/]retry-request[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https-proxy-agent[\\/]/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken[\\/]/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; From b0c0a1143fff9f3209caac2cc4b5222d0a22df70 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 17 Oct 2019 20:25:36 +0300 Subject: [PATCH 003/223] chore(deps): update linters (#4) --- packages/google-devtools-cloudbuild/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index d3faf7e635a5..ab6cf8ba1d9c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -28,9 +28,9 @@ "devDependencies": { "c8": "^5.0.4", "chai": "^4.2.0", - "eslint": "^5.16.0", - "eslint-config-prettier": "^4.2.0", - "eslint-plugin-node": "^9.0.1", + "eslint": "^6.0.0", + "eslint-config-prettier": "^6.0.0", + "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", From 71cc8b246976325386530a6d95ccfda9ffd61876 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 17 Oct 2019 13:40:11 -0700 Subject: [PATCH 004/223] feat(docs): add listBuildTriggers sample to README (#5) --- packages/google-devtools-cloudbuild/README.md | 1 + .../samples/README.md | 20 +++++++++++++++++++ .../google-devtools-cloudbuild/synth.metadata | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index bce2f8a84603..ee1ac4f1f1c3 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -91,6 +91,7 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| List Triggers. | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/listBuildTriggers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-devtools-cloudbuild/samples/README.md b/packages/google-devtools-cloudbuild/samples/README.md index 1e1bfb2a0a89..68549c48b1c0 100644 --- a/packages/google-devtools-cloudbuild/samples/README.md +++ b/packages/google-devtools-cloudbuild/samples/README.md @@ -12,6 +12,7 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [List Triggers.](#list-triggers.) * [Quickstart](#quickstart) ## Before you begin @@ -23,6 +24,25 @@ Before running the samples, make sure you've followed the steps outlined in +### List Triggers. + +List available build triggers. + +View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/listBuildTriggers.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) + +__Usage:__ + + +`node list-build-triggers.js ` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js). diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index b6f5fabc7f0a..891350614ca0 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-10-17T01:46:51.465084Z", + "updateTime": "2019-10-17T02:06:50.108570Z", "sources": [ { "generator": { From c15209e82a22beea6a9ad9d2414dfa8b355b5731 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 29 Oct 2019 03:35:01 +0200 Subject: [PATCH 005/223] chore(deps): update dependency c8 to v6 (#8) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ab6cf8ba1d9c..253b0bb00152 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -26,7 +26,7 @@ "Cloud Build API" ], "devDependencies": { - "c8": "^5.0.4", + "c8": "^6.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", From d29b0b5a978a95916537f9f1c3a6c52e3c10fab0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 31 Oct 2019 11:24:52 -0700 Subject: [PATCH 006/223] feat: moves library to TypeScript code generation (#10) --- packages/google-devtools-cloudbuild/.jsdoc.js | 2 +- packages/google-devtools-cloudbuild/.nycrc | 1 - .../.readme-partials.yml | 5 + packages/google-devtools-cloudbuild/README.md | 26 +- .../cloudbuild.yaml | 8 +- .../google-devtools-cloudbuild/package.json | 33 +- .../google-devtools-cloudbuild/proto.list | 12 + .../devtools/cloudbuild/v1/cloudbuild.proto | 18 +- .../protos/protos.json | 17 +- .../samples/package.json | 5 +- .../samples/quickstart.js | 52 +- .../google-devtools-cloudbuild/src/index.js | 88 - .../src/{v1/index.js => index.ts} | 13 +- .../src/v1/cloud_build_client.js | 1266 ------------- .../src/v1/cloud_build_client.ts | 1182 ++++++++++++ .../src/v1/cloud_build_client_config.json | 41 +- .../devtools/cloudbuild/v1/doc_cloudbuild.js | 1675 ----------------- .../doc/google/longrunning/doc_operations.js | 63 - .../src/v1/doc/google/protobuf/doc_any.js | 137 -- .../v1/doc/google/protobuf/doc_duration.js | 97 - .../src/v1/doc/google/protobuf/doc_empty.js | 34 - .../v1/doc/google/protobuf/doc_timestamp.js | 119 -- .../src/v1/doc/google/rpc/doc_status.js | 95 - .../src/{browser.js => v1/index.ts} | 12 +- .../google-devtools-cloudbuild/synth.metadata | 20 +- packages/google-devtools-cloudbuild/synth.py | 17 +- .../system-test/system.js | 30 +- .../test/.eslintrc.yml | 3 - .../test/gapic-cloud_build-v1.ts | 780 ++++++++ .../test/gapic-v1.js | 1084 ----------- .../google-devtools-cloudbuild/tsconfig.json | 18 + .../google-devtools-cloudbuild/tslint.json | 6 + 32 files changed, 2180 insertions(+), 4779 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.readme-partials.yml create mode 100644 packages/google-devtools-cloudbuild/proto.list delete mode 100644 packages/google-devtools-cloudbuild/src/index.js rename packages/google-devtools-cloudbuild/src/{v1/index.js => index.ts} (65%) delete mode 100644 packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js create mode 100644 packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js delete mode 100644 packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js rename packages/google-devtools-cloudbuild/src/{browser.js => v1/index.ts} (69%) delete mode 100644 packages/google-devtools-cloudbuild/test/.eslintrc.yml create mode 100644 packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts delete mode 100644 packages/google-devtools-cloudbuild/test/gapic-v1.js create mode 100644 packages/google-devtools-cloudbuild/tsconfig.json create mode 100644 packages/google-devtools-cloudbuild/tslint.json diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 14fc59a8fdaa..43f9436a41f9 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -31,7 +31,7 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'src' + 'build/src' ], includePattern: '\\.js$' }, diff --git a/packages/google-devtools-cloudbuild/.nycrc b/packages/google-devtools-cloudbuild/.nycrc index 23e322204ece..367688844ebf 100644 --- a/packages/google-devtools-cloudbuild/.nycrc +++ b/packages/google-devtools-cloudbuild/.nycrc @@ -10,7 +10,6 @@ "**/docs", "**/samples", "**/scripts", - "**/src/**/v*/**/*.js", "**/protos", "**/test", ".jsdoc.js", diff --git a/packages/google-devtools-cloudbuild/.readme-partials.yml b/packages/google-devtools-cloudbuild/.readme-partials.yml new file mode 100644 index 000000000000..bf8250ac8bfe --- /dev/null +++ b/packages/google-devtools-cloudbuild/.readme-partials.yml @@ -0,0 +1,5 @@ +body: |- + ### Using TypeScript + + `@google-cloud/cloudbuild` provides TypeScript type definitions. + diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index ee1ac4f1f1c3..c071600c336a 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -67,21 +67,39 @@ async function quickstart( const cb = new CloudBuildClient(); // Starts a build against the branch provided. - const request = { + const [resp] = await cb.runBuildTrigger({ projectId, triggerId, source: { - projectId: projectId, + projectId, dir: './', branchName, }, - }; - await cb.runBuildTrigger(request); + }); console.info(`triggered build for ${triggerId}`); + const [build] = await resp.promise(); + + const STATUS_LOOKUP = [ + 'UNKNOWN', + 'Queued', + 'Working', + 'Success', + 'Failure', + 'Error', + 'Timeout', + 'Cancelled', + ]; + for (const step of build.steps) { + console.info( + `step:\n\tname: ${step.name}\n\tstatus: ${STATUS_LOOKUP[build.status]}` + ); + } } ``` +### Using TypeScript +`@google-cloud/cloudbuild` provides TypeScript type definitions. ## Samples diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml index b963083d1494..dcacf321fbc1 100644 --- a/packages/google-devtools-cloudbuild/cloudbuild.yaml +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -1,5 +1,7 @@ steps: -- name: 'gcr.io/cloud-builders/npm:node-10.10.0' +- name: node:13 + entrypoint: npm args: ['install'] -- name: 'gcr.io/cloud-builders/npm:node-10.10.0' - args: ['run', 'lint'] +- name: node:13 + entrypoint: npm + args: ['test'] diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 253b0bb00152..9c0077142fa4 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -4,13 +4,11 @@ "version": "0.1.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", - "main": "src/index.js", + "main": "build/src/index.js", "browser": "src/browser.js", "files": [ - "protos", - "src", - "AUTHORS", - "COPYING" + "build/src", + "build/protos" ], "keywords": [ "google apis client", @@ -27,6 +25,7 @@ ], "devDependencies": { "c8": "^6.0.0", + "@types/mocha": "^5.2.5", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", @@ -36,23 +35,31 @@ "jsdoc-fresh": "^1.0.2", "linkinator": "^1.4.0", "mocha": "^6.1.4", - "prettier": "^1.17.0" + "gts": "^0.9.0", + "prettier": "^1.17.0", + "typescript": "~3.5.3" }, "scripts": { + "predocs": "npm run compile", "docs": "jsdoc -c .jsdoc.js", - "fix": "eslint . --fix", - "lint": "eslint .", - "test": "c8 mocha test/*.js", + "lint": "gts check && eslint .", + "clean": "gts clean", + "fix": "gts fix && eslint . --fix", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "prepare": "npm run compile-protos && npm run compile", + "pretest": "npm run compile", + "test": "c8 mocha build/test", + "system-test": "c8 mocha --timeout=15000 system-test/*.js", + "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", - "docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/cloudbuild|googleapis.dev.*|github.com.*'", - "samples-test": "c8 mocha --timeout=30000 samples/system-test/*.js", - "system-test": "c8 mocha --timeout=15000 system-test/*.js" + "docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/cloudbuild|googleapis.dev.*|github.com.*'" }, "license": "Apache-2.0", "engines": { "node": ">=8.10.0" }, "dependencies": { - "google-gax": "^1.6.3" + "google-gax": "^1.7.5" } } diff --git a/packages/google-devtools-cloudbuild/proto.list b/packages/google-devtools-cloudbuild/proto.list new file mode 100644 index 000000000000..21b93f487118 --- /dev/null +++ b/packages/google-devtools-cloudbuild/proto.list @@ -0,0 +1,12 @@ +google/api/http.proto +google/protobuf/descriptor.proto +google/api/annotations.proto +google/api/client.proto +google/api/field_behavior.proto +google/protobuf/any.proto +google/protobuf/empty.proto +google/rpc/status.proto +google/longrunning/operations.proto +google/protobuf/duration.proto +google/protobuf/timestamp.proto +google/devtools/cloudbuild/v1/cloudbuild.proto diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 492810f71793..a50ec126796b 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -54,6 +54,10 @@ service CloudBuild { body: "build" }; option (google.api.method_signature) = "project_id,build"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } // Returns information about a previously requested build. @@ -120,6 +124,10 @@ service CloudBuild { body: "*" }; option (google.api.method_signature) = "project_id,id"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } // Creates a new `BuildTrigger`. @@ -184,6 +192,10 @@ service CloudBuild { body: "source" }; option (google.api.method_signature) = "project_id,trigger_id,source"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; } // Creates a `WorkerPool` to run the builds, and returns the new worker pool. @@ -805,10 +817,14 @@ message BuildTrigger { // Branch and tag names in trigger templates are interpreted as regular // expressions. Any branch or tag change that matches that regular expression // will trigger a build. + // + // Mutually exclusive with `github`. RepoSource trigger_template = 7; // GitHubEventsConfig describes the configuration of a trigger that creates // a build whenever a GitHub event is received. + // + // Mutually exclusive with `trigger_template`. GitHubEventsConfig github = 13; // Template describing the Build request to make when the trigger is matched. @@ -858,7 +874,7 @@ message BuildTrigger { // This message is experimental. message GitHubEventsConfig { // The installationID that emits the GitHub event. - int64 installation_id = 1; + int64 installation_id = 1 [deprecated = true]; // Owner of the repository. For example: The owner for // https://github.com/googlecloudplatform/cloud-builders is diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 785248782558..da14df41bd99 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -26,7 +26,9 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/builds", "(google.api.http).body": "build", - "(google.api.method_signature)": "project_id,build" + "(google.api.method_signature)": "project_id,build", + "(google.longrunning.operation_info).response_type": "Build", + "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" } }, "GetBuild": { @@ -60,7 +62,9 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/builds/{id}:retry", "(google.api.http).body": "*", - "(google.api.method_signature)": "project_id,id" + "(google.api.method_signature)": "project_id,id", + "(google.longrunning.operation_info).response_type": "Build", + "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" } }, "CreateBuildTrigger": { @@ -111,7 +115,9 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/triggers/{trigger_id}:run", "(google.api.http).body": "source", - "(google.api.method_signature)": "project_id,trigger_id,source" + "(google.api.method_signature)": "project_id,trigger_id,source", + "(google.longrunning.operation_info).response_type": "Build", + "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" } }, "CreateWorkerPool": { @@ -779,7 +785,10 @@ "fields": { "installationId": { "type": "int64", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "owner": { "type": "string", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index e83a7b66ffa1..f595a78f013c 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -12,13 +12,14 @@ "node": ">=8" }, "scripts": { - "test": "mocha system-test --timeout=800000" + "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { "@google-cloud/cloudbuild": "^0.1.0" }, "devDependencies": { + "c8": "^6.0.1", "chai": "^4.2.0", "mocha": "^6.0.0" } -} \ No newline at end of file +} diff --git a/packages/google-devtools-cloudbuild/samples/quickstart.js b/packages/google-devtools-cloudbuild/samples/quickstart.js index cfd906973ec4..a844a633044f 100644 --- a/packages/google-devtools-cloudbuild/samples/quickstart.js +++ b/packages/google-devtools-cloudbuild/samples/quickstart.js @@ -1,17 +1,17 @@ -/** - * Copyright 2019, Google, LLC. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// 'use strict'; @@ -28,17 +28,33 @@ async function quickstart( const cb = new CloudBuildClient(); // Starts a build against the branch provided. - const request = { + const [resp] = await cb.runBuildTrigger({ projectId, triggerId, source: { - projectId: projectId, + projectId, dir: './', branchName, }, - }; - await cb.runBuildTrigger(request); + }); console.info(`triggered build for ${triggerId}`); + const [build] = await resp.promise(); + + const STATUS_LOOKUP = [ + 'UNKNOWN', + 'Queued', + 'Working', + 'Success', + 'Failure', + 'Error', + 'Timeout', + 'Cancelled', + ]; + for (const step of build.steps) { + console.info( + `step:\n\tname: ${step.name}\n\tstatus: ${STATUS_LOOKUP[build.status]}` + ); + } } // [END cloudbuild_quickstart] diff --git a/packages/google-devtools-cloudbuild/src/index.js b/packages/google-devtools-cloudbuild/src/index.js deleted file mode 100644 index b7f6e965e83d..000000000000 --- a/packages/google-devtools-cloudbuild/src/index.js +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/** - * @namespace google - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.longrunning - */ -/** - * @namespace google.cloud - */ -/** - * @namespace google.devtools.cloudbuild - */ -/** - * @namespace google.devtools.cloudbuild.v1 - */ - -'use strict'; - -// Import the clients for each version supported by this package. -const gapic = Object.freeze({ - v1: require('./v1'), -}); - -/** - * The `@google-cloud/cloudbuild` package has the following named exports: - * - * - `CloudBuildClient` - Reference to - * {@link v1.CloudBuildClient} - * - `v1` - This is used for selecting or pinning a - * particular backend service version. It exports: - * - `CloudBuildClient` - Reference to - * {@link v1.CloudBuildClient} - * - * @module {object} @google-cloud/cloudbuild - * @alias nodejs-cloudbuild - * - * @example Install the client library with npm: - * npm install --save @google-cloud/cloudbuild - * - * @example Import the client library: - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * @example Create a client that uses Application Default Credentials (ADC): - * const client = new cloudbuild.CloudBuildClient(); - * - * @example Create a client with explicit credentials: - * const client = new cloudbuild.CloudBuildClient({ - * projectId: 'your-project-id', - * keyFilename: '/path/to/keyfile.json', - * }); - */ - -/** - * @type {object} - * @property {constructor} CloudBuildClient - * Reference to {@link v1.CloudBuildClient} - */ -module.exports = gapic.v1; - -/** - * @type {object} - * @property {constructor} CloudBuildClient - * Reference to {@link v1.CloudBuildClient} - */ -module.exports.v1 = gapic.v1; - -// Alias `module.exports` as `module.exports.default`, for future-proofing. -module.exports.default = Object.assign({}, module.exports); diff --git a/packages/google-devtools-cloudbuild/src/v1/index.js b/packages/google-devtools-cloudbuild/src/index.ts similarity index 65% rename from packages/google-devtools-cloudbuild/src/v1/index.js rename to packages/google-devtools-cloudbuild/src/index.ts index 9ac059ef19c4..7bccb121606e 100644 --- a/packages/google-devtools-cloudbuild/src/v1/index.js +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -11,9 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** 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 CloudBuildClient = require('./cloud_build_client'); - -module.exports.CloudBuildClient = CloudBuildClient; +import * as v1 from './v1'; +export {v1}; +const CloudBuildClient = v1.CloudBuildClient; +export {CloudBuildClient}; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js deleted file mode 100644 index 83a8a38f668e..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.js +++ /dev/null @@ -1,1266 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const gapicConfig = require('./cloud_build_client_config.json'); -const gax = require('google-gax'); -const path = require('path'); - -const VERSION = require('../../package.json').version; - -/** - * Creates and manages builds on Google Cloud Platform. - * - * The main concept used by this API is a `Build`, which describes the location - * of the source to build, how to build the source, and where to store the - * built artifacts, if any. - * - * A user can list previously-requested builds or get builds by their ID to - * determine the status of the build. - * - * @class - * @memberof v1 - */ -class CloudBuildClient { - /** - * Construct an instance of CloudBuildClient. - * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. - * @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 {function} [options.promise] - Custom promise module to use instead - * of native Promises. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - */ - constructor(opts) { - opts = opts || {}; - this._descriptors = {}; - - if (global.isBrowser) { - // If we're in browser, we use gRPC fallback. - opts.fallback = true; - } - - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !global.isBrowser && opts.fallback ? gax.fallback : gax; - - const servicePath = - opts.servicePath || opts.apiEndpoint || this.constructor.servicePath; - - // Ensure that options include the service address and port. - opts = Object.assign( - { - clientConfig: {}, - port: this.constructor.port, - servicePath, - }, - opts - ); - - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = this.constructor.scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); - - // Save the auth object to the client, for use by other methods. - this.auth = gaxGrpc.auth; - - // Determine the client header string. - const clientHeader = []; - - if (typeof process !== 'undefined' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } - clientHeader.push(`gax/${gaxModule.version}`); - if (opts.fallback) { - clientHeader.push(`gl-web/${gaxModule.version}`); - } else { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); - } - clientHeader.push(`gapic/${VERSION}`); - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - - // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath - ); - - // 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 = { - listBuilds: new gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'builds' - ), - }; - - // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( - 'google.devtools.cloudbuild.v1.CloudBuild', - gapicConfig, - 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 = {}; - - // Put together the "service stub" for - // google.devtools.cloudbuild.v1.CloudBuild. - const cloudBuildStub = gaxGrpc.createStub( - opts.fallback - ? protos.lookupService('google.devtools.cloudbuild.v1.CloudBuild') - : protos.google.devtools.cloudbuild.v1.CloudBuild, - opts - ); - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const cloudBuildStubMethods = [ - 'createBuild', - 'getBuild', - 'listBuilds', - 'cancelBuild', - 'createBuildTrigger', - 'getBuildTrigger', - 'listBuildTriggers', - 'deleteBuildTrigger', - 'updateBuildTrigger', - 'runBuildTrigger', - 'retryBuild', - 'createWorkerPool', - 'getWorkerPool', - 'deleteWorkerPool', - 'updateWorkerPool', - 'listWorkerPools', - ]; - for (const methodName of cloudBuildStubMethods) { - const innerCallPromise = cloudBuildStub.then( - stub => (...args) => { - return stub[methodName].apply(stub, args); - }, - err => () => { - throw err; - } - ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( - innerCallPromise, - defaults[methodName], - this._descriptors.page[methodName] - ); - } - } - - /** - * The DNS address for this API service. - */ - static get servicePath() { - return 'cloudbuild.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath(), - * exists for compatibility reasons. - */ - static get apiEndpoint() { - return 'cloudbuild.googleapis.com'; - } - - /** - * The port for this API service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - /** - * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. - */ - getProjectId(callback) { - return this.auth.getProjectId(callback); - } - - // ------------------- - // -- Service calls -- - // ------------------- - - /** - * Starts a build with the specified configuration. - * - * This method returns a long-running `Operation`, which includes the build - * ID. Pass the build ID to `GetBuild` to determine the build status (such as - * `SUCCESS` or `FAILURE`). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {Object} request.build - * Required. Build resource to create. - * - * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const build = {}; - * const request = { - * projectId: projectId, - * build: build, - * }; - * client.createBuild(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createBuild(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId, - }); - - return this._innerApiCalls.createBuild(request, options, callback); - } - - /** - * Returns information about a previously requested build. - * - * The `Build` that is returned includes its status (such as `SUCCESS`, - * `FAILURE`, or `WORKING`), and timing information. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const id = ''; - * const request = { - * projectId: projectId, - * id: id, - * }; - * client.getBuild(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getBuild(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.getBuild(request, options, callback); - } - - /** - * Lists previously requested builds. - * - * Previously requested builds may still be in-progress, or may have finished - * successfully or unsuccessfully. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {string} [request.filter] - * The raw filter text to constrain the results. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Array, ?Object, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. - * - * When autoPaginate: false is specified through options, it contains the result - * in a single response. If the response indicates the next page exists, the third - * parameter is set to be used for the next request object. The fourth parameter keeps - * the raw response object of an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Build]{@link google.devtools.cloudbuild.v1.Build} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * // Iterate over all elements. - * const projectId = ''; - * - * client.listBuilds({projectId: projectId}) - * .then(responses => { - * const resources = responses[0]; - * for (const resource of resources) { - * // doThingsWith(resource) - * } - * }) - * .catch(err => { - * console.error(err); - * }); - * - * // Or obtain the paged response. - * const projectId = ''; - * - * - * const options = {autoPaginate: false}; - * const callback = responses => { - * // The actual resources in a response. - * const resources = responses[0]; - * // The next request if the response shows that there are more responses. - * const nextRequest = responses[1]; - * // The actual response object, if necessary. - * // const rawResponse = responses[2]; - * for (const resource of resources) { - * // doThingsWith(resource); - * } - * if (nextRequest) { - * // Fetch the next page. - * return client.listBuilds(nextRequest, options).then(callback); - * } - * } - * client.listBuilds({projectId: projectId}, options) - * .then(callback) - * .catch(err => { - * console.error(err); - * }); - */ - listBuilds(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId, - }); - - return this._innerApiCalls.listBuilds(request, options, callback); - } - - /** - * Equivalent to {@link listBuilds}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listBuilds} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {number} [request.pageSize] - * The maximum number of resources contained in the underlying API - * response. If page streaming is performed per-resource, this - * parameter does not affect the return value. If page streaming is - * performed per-page, this determines the maximum number of - * resources in a page. - * @param {string} [request.filter] - * The raw filter text to constrain the results. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @returns {Stream} - * An object stream which emits an object representing [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * client.listBuildsStream({projectId: projectId}) - * .on('data', element => { - * // doThingsWith(element) - * }).on('error', err => { - * console.log(err); - * }); - */ - listBuildsStream(request, options) { - options = options || {}; - - return this._descriptors.page.listBuilds.createStream( - this._innerApiCalls.listBuilds, - request, - options - ); - } - - /** - * Cancels a build in progress. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const id = ''; - * const request = { - * projectId: projectId, - * id: id, - * }; - * client.cancelBuild(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - cancelBuild(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.cancelBuild(request, options, callback); - } - - /** - * Creates a new `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project for which to configure automatic builds. - * @param {Object} request.trigger - * Required. `BuildTrigger` to create. - * - * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const trigger = {}; - * const request = { - * projectId: projectId, - * trigger: trigger, - * }; - * client.createBuildTrigger(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createBuildTrigger(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId, - }); - - return this._innerApiCalls.createBuildTrigger(request, options, callback); - } - - /** - * Returns information about a `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to get. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const triggerId = ''; - * const request = { - * projectId: projectId, - * triggerId: triggerId, - * }; - * client.getBuildTrigger(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getBuildTrigger(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.getBuildTrigger(request, options, callback); - } - - /** - * Lists existing `BuildTrigger`s. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project for which to list BuildTriggers. - * @param {number} [request.pageSize] - * Number of results to return in the list. - * @param {string} [request.pageToken] - * Token to provide to skip to a particular spot in the list. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * client.listBuildTriggers({projectId: projectId}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - listBuildTriggers(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId, - }); - - return this._innerApiCalls.listBuildTriggers(request, options, callback); - } - - /** - * Deletes a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to delete. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const triggerId = ''; - * const request = { - * projectId: projectId, - * triggerId: triggerId, - * }; - * client.deleteBuildTrigger(request).catch(err => { - * console.error(err); - * }); - */ - deleteBuildTrigger(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.deleteBuildTrigger(request, options, callback); - } - - /** - * Updates a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to update. - * @param {Object} request.trigger - * Required. `BuildTrigger` to update. - * - * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const triggerId = ''; - * const trigger = {}; - * const request = { - * projectId: projectId, - * triggerId: triggerId, - * trigger: trigger, - * }; - * client.updateBuildTrigger(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateBuildTrigger(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.updateBuildTrigger(request, options, callback); - } - - /** - * Runs a `BuildTrigger` at a particular source revision. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.triggerId - * Required. ID of the trigger. - * @param {Object} request.source - * Required. Source to build against this trigger. - * - * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const triggerId = ''; - * const source = {}; - * const request = { - * projectId: projectId, - * triggerId: triggerId, - * source: source, - * }; - * client.runBuildTrigger(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - runBuildTrigger(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.runBuildTrigger(request, options, callback); - } - - /** - * Creates a new build based on the specified build. - * - * This method creates a new build using the original build request, which may - * or may not result in an identical build. - * - * For triggered builds: - * - * * Triggered builds resolve to a precise revision; therefore a retry of a - * triggered build will result in a build that uses the same revision. - * - * For non-triggered builds that specify `RepoSource`: - * - * * If the original build built from the tip of a branch, the retried build - * will build from the tip of that branch, which may not be the same revision - * as the original build. - * * If the original build specified a commit sha or revision ID, the retried - * build will use the identical source. - * - * For builds that specify `StorageSource`: - * - * * If the original build pulled source from Google Cloud Storage without - * specifying the generation of the object, the new build will use the current - * object, which may be different from the original build source. - * * If the original build pulled source from Cloud Storage and specified the - * generation of the object, the new build will attempt to use the same - * object, which may or may not be available depending on the bucket's - * lifecycle management settings. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. Build ID of the original build. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [Operation]{@link google.longrunning.Operation}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * const projectId = ''; - * const id = ''; - * const request = { - * projectId: projectId, - * id: id, - * }; - * client.retryBuild(request) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - retryBuild(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.retryBuild(request, options, callback); - } - - /** - * Creates a `WorkerPool` to run the builds, and returns the new worker pool. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.parent] - * ID of the parent project. - * @param {Object} [request.workerPool] - * `WorkerPool` resource to create. - * - * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * - * client.createWorkerPool({}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - createWorkerPool(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.createWorkerPool(request, options, callback); - } - - /** - * Returns information about a `WorkerPool`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.name] - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * - * client.getWorkerPool({}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - getWorkerPool(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.getWorkerPool(request, options, callback); - } - - /** - * Deletes a `WorkerPool` by its project ID and WorkerPool name. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.name] - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error)} [callback] - * The function which will be called with the result of the API call. - * @returns {Promise} - The promise which resolves when API call finishes. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * - * client.deleteWorkerPool({}).catch(err => { - * console.error(err); - * }); - */ - deleteWorkerPool(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.deleteWorkerPool(request, options, callback); - } - - /** - * Update a `WorkerPool`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.name] - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @param {Object} [request.workerPool] - * `WorkerPool` resource to update. - * - * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * - * client.updateWorkerPool({}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - updateWorkerPool(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.updateWorkerPool(request, options, callback); - } - - /** - * List project's `WorkerPool`s. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} [request.parent] - * ID of the parent project. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. - * - * The second parameter to the callback is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - * - * @example - * - * const cloudbuild = require('@google-cloud/cloudbuild'); - * - * const client = new cloudbuild.v1.CloudBuildClient({ - * // optional auth parameters. - * }); - * - * - * client.listWorkerPools({}) - * .then(responses => { - * const response = responses[0]; - * // doThingsWith(response) - * }) - * .catch(err => { - * console.error(err); - * }); - */ - listWorkerPools(request, options, callback) { - if (options instanceof Function && callback === undefined) { - callback = options; - options = {}; - } - request = request || {}; - options = options || {}; - - return this._innerApiCalls.listWorkerPools(request, options, callback); - } -} - -module.exports = CloudBuildClient; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts new file mode 100644 index 000000000000..11fa174a2001 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -0,0 +1,1182 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 gax from 'google-gax'; +import * as path from 'path'; + +import * as protosTypes from '../../protos/protos'; +import * as gapicConfig from './cloud_build_client_config.json'; + +const version = require('../../../package.json').version; + +export interface ClientOptions extends gax.GrpcClientOptions, + gax.GoogleAuthOptions, + gax.ClientStubOptions { + libName?: string; + libVersion?: string; + clientConfig?: gax.ClientConfig; + fallback?: boolean; + apiEndpoint?: string; +} + +interface Descriptors { + page: {[name: string]: gax.PageDescriptor}; + stream: {[name: string]: gax.StreamDescriptor}; + longrunning: {[name: string]: gax.LongrunningDescriptor}; +} + +export interface Callback< + ResponseObject, NextRequestObject, RawResponseObject> { + (err: Error|null|undefined, value?: ResponseObject|null, + nextRequest?: NextRequestObject, rawResponse?: RawResponseObject): void; +} + +export interface Operation extends gax.Operation { + promise(): Promise< + [ResultType, MetadataType, protosTypes.google.longrunning.IOperation]>; +} + + +export interface PaginationCallback< + RequestObject, ResponseObject, ResponseType> { + (err: Error|null, values?: ResponseType[], nextPageRequest?: RequestObject, + rawResponse?: ResponseObject): void; +} + +export interface PaginationResponse< + RequestObject, ResponseObject, ResponseType> { + values?: ResponseType[]; + nextPageRequest?: RequestObject; + rawResponse?: ResponseObject; +} + +export class CloudBuildClient { + /* + Creates and manages builds on Google Cloud Platform. + + The main concept used by this API is a `Build`, which describes the location + of the source to build, how to build the source, and where to store the + built artifacts, if any. + + A user can list previously-requested builds or get builds by their ID to + determine the status of the build. + */ + private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _innerApiCalls: {[name: string]: Function}; + auth: gax.GoogleAuth; + + /** + * Construct an instance of CloudBuildClient. + * + * @param {object} [options] - The configuration object. See the subsequent + * parameters for more details. + * @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 {function} [options.promise] - Custom promise module to use instead + * of native Promises. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + */ + + constructor(opts?: ClientOptions) { + // Ensure that options include the service address and port. + const staticMembers = this.constructor as typeof CloudBuildClient; + const servicePath = opts && opts.servicePath ? + opts.servicePath : + ((opts && opts.apiEndpoint) ? opts.apiEndpoint : + staticMembers.servicePath); + const port = opts && opts.port ? opts.port : staticMembers.port; + + if (!opts) { + opts = {servicePath, port}; + } + opts.servicePath = opts.servicePath || servicePath; + opts.port = opts.port || port; + opts.clientConfig = opts.clientConfig || {}; + + const isBrowser = (typeof window !== 'undefined'); + if (isBrowser) { + opts.fallback = true; + } + // If we are in browser, we are already using fallback because of the + // "browser" field in package.json. + // But if we were explicitly requested to use fallback, let's do it now. + const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + + // Create a `gaxGrpc` object, with any grpc-specific options + // sent to the client. + opts.scopes = (this.constructor as typeof CloudBuildClient).scopes; + const gaxGrpc = new gaxModule.GrpcClient(opts); + + // Save the auth object to the client, for use by other methods. + this.auth = (gaxGrpc.auth as gax.GoogleAuth); + + // Determine the client header string. + const clientHeader = [ + `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gaxModule.version}`, `gapic/${version}`, + `gl-web/${gaxModule.version}` + ]; + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + // For Node.js, pass the path to JSON proto file. + // For browsers, pass the JSON content. + + const nodejsProtoPath = + path.join(__dirname, '..', '..', 'protos', 'protos.json'); + const protos = gaxGrpc.loadProto( + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath); + + // 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 = { + listBuilds: + new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'builds'), + listBuildTriggers: + new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'triggers') + }; + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback ? + gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) : + gaxModule.protobuf.loadSync(nodejsProtoPath); + + const operationsClient = + gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined + }) + .operationsClient(opts); + const createBuildResponse = + protoFilesRoot.lookup('Build') as gax.protobuf.Type; + const createBuildMetadata = + protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; + const retryBuildResponse = + protoFilesRoot.lookup('Build') as gax.protobuf.Type; + const retryBuildMetadata = + protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; + const runBuildTriggerResponse = + protoFilesRoot.lookup('Build') as gax.protobuf.Type; + const runBuildTriggerMetadata = + protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; + + this._descriptors.longrunning = { + createBuild: new gaxModule.LongrunningDescriptor( + operationsClient, + createBuildResponse.decode.bind(createBuildResponse), + createBuildMetadata.decode.bind(createBuildMetadata)), + retryBuild: new gaxModule.LongrunningDescriptor( + operationsClient, retryBuildResponse.decode.bind(retryBuildResponse), + retryBuildMetadata.decode.bind(retryBuildMetadata)), + runBuildTrigger: new gaxModule.LongrunningDescriptor( + operationsClient, + runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), + runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata)) + }; + + // Put together the default options sent with requests. + const defaults = gaxGrpc.constructSettings( + 'google.devtools.cloudbuild.v1.CloudBuild', + 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 = {}; + + // Put together the "service stub" for + // google.showcase.v1alpha2.Echo. + const cloudBuildStub = + gaxGrpc.createStub( + opts.fallback ? + // @ts-ignore Do not check types for loaded protos + protos.lookupService( + 'google.devtools.cloudbuild.v1.CloudBuild') : + // @ts-ignore Do not check types for loaded protos + protos.google.devtools.cloudbuild.v1.CloudBuild, + opts) as Promise<{[method: string]: Function}>; + + const cloudBuildStubMethods = [ + 'createBuild', 'getBuild', 'listBuilds', 'cancelBuild', 'retryBuild', + 'createBuildTrigger', 'getBuildTrigger', 'listBuildTriggers', + 'deleteBuildTrigger', 'updateBuildTrigger', 'runBuildTrigger', + 'createWorkerPool', 'getWorkerPool', 'deleteWorkerPool', + 'updateWorkerPool', 'listWorkerPools' + ]; + + for (const methodName of cloudBuildStubMethods) { + const innerCallPromise = cloudBuildStub.then( + (stub: {[method: string]: Function}) => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + this._innerApiCalls[methodName] = gax.createApiCall( + innerCallPromise, defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName]); + } + } + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'cloudbuild.googleapis.com'; + } + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'cloudbuild.googleapis.com'; + } + + /** + * The port for this API service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + /** + * Return the project ID used by this class. + * @param {function(Error, string)} callback - the callback to + * be called with the current project Id. + */ + getProjectId(): Promise; + getProjectId(callback: Callback): void; + getProjectId(callback?: Callback): + Promise|void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /* + Returns information about a previously requested build. + + The `Build` that is returned includes its status (such as `SUCCESS`, + `FAILURE`, or `WORKING`), and timing information. + */ + getBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, + {}|undefined + ]>; + getBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, + {}|undefined>): void; + getBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.getBuild(request, options, callback); + } + /* + Cancels a build in progress. + */ + cancelBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest|undefined, + {}|undefined + ]>; + cancelBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| + undefined, + {}|undefined>): void; + cancelBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest|undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.cancelBuild(request, options, callback); + } + /* + Creates a new `BuildTrigger`. + + This API is experimental. + */ + createBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| + undefined, + {}|undefined + ]>; + createBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| + undefined, + {}|undefined>): void; + createBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.createBuildTrigger(request, options, callback); + } + /* + Returns information about a `BuildTrigger`. + + This API is experimental. + */ + getBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| + undefined, + {}|undefined + ]>; + getBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| + undefined, + {}|undefined>): void; + getBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.getBuildTrigger(request, options, callback); + } + /* + Deletes a `BuildTrigger` by its project ID and trigger ID. + + This API is experimental. + */ + deleteBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| + undefined, + {}|undefined + ]>; + deleteBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| + undefined, + {}|undefined>): void; + deleteBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.deleteBuildTrigger(request, options, callback); + } + /* + Updates a `BuildTrigger` by its project ID and trigger ID. + + This API is experimental. + */ + updateBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| + undefined, + {}|undefined + ]>; + updateBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| + undefined, + {}|undefined>): void; + updateBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.updateBuildTrigger(request, options, callback); + } + /* + Creates a `WorkerPool` to run the builds, and returns the new worker pool. + + This API is experimental. + */ + createWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| + undefined, + {}|undefined + ]>; + createWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| + undefined, + {}|undefined>): void; + createWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.createWorkerPool(request, options, callback); + } + /* + Returns information about a `WorkerPool`. + + This API is experimental. + */ + getWorkerPool( + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| + undefined, + {}|undefined + ]>; + getWorkerPool( + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| + undefined, + {}|undefined>): void; + getWorkerPool( + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.getWorkerPool(request, options, callback); + } + /* + Deletes a `WorkerPool` by its project ID and WorkerPool name. + + This API is experimental. + */ + deleteWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| + undefined, + {}|undefined + ]>; + deleteWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| + undefined, + {}|undefined>): void; + deleteWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.protobuf.IEmpty, + protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.deleteWorkerPool(request, options, callback); + } + /* + Update a `WorkerPool`. + + This API is experimental. + */ + updateWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| + undefined, + {}|undefined + ]>; + updateWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| + undefined, + {}|undefined>): void; + updateWorkerPool( + request: + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.updateWorkerPool(request, options, callback); + } + /* + List project's `WorkerPool`s. + + This API is experimental. + */ + listWorkerPools( + request: + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| + undefined, + {}|undefined + ]>; + listWorkerPools( + request: + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| + undefined, + {}|undefined>): void; + listWorkerPools( + request: + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| + undefined, + {}|undefined>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| + undefined, + {}|undefined>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| + undefined, + {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.listWorkerPools(request, options, callback); + } + + /* + Starts a build with the specified configuration. + + This method returns a long-running `Operation`, which includes the build + ID. Pass the build ID to `GetBuild` to determine the build status (such as + `SUCCESS` or `FAILURE`). + */ + createBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + options?: gax.CallOptions): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + void; + createBuild( + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + optionsOrCallback?: gax.CallOptions|Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.createBuild(request, options, callback); + } + /* + Creates a new build based on the specified build. + + This method creates a new build using the original build request, which may + or may not result in an identical build. + + For triggered builds: + + * Triggered builds resolve to a precise revision; therefore a retry of a + triggered build will result in a build that uses the same revision. + + For non-triggered builds that specify `RepoSource`: + + * If the original build built from the tip of a branch, the retried build + will build from the tip of that branch, which may not be the same revision + as the original build. + * If the original build specified a commit sha or revision ID, the retried + build will use the identical source. + + For builds that specify `StorageSource`: + + * If the original build pulled source from Google Cloud Storage without + specifying the generation of the object, the new build will use the current + object, which may be different from the original build source. + * If the original build pulled source from Cloud Storage and specified the + generation of the object, the new build will attempt to use the same + object, which may or may not be available depending on the bucket's + lifecycle management settings. + */ + retryBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options?: gax.CallOptions): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>; + retryBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + void; + retryBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + optionsOrCallback?: gax.CallOptions|Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.retryBuild(request, options, callback); + } + /* + Runs a `BuildTrigger` at a particular source revision. + */ + runBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + options?: gax.CallOptions): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>; + runBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + void; + runBuildTrigger( + request: + protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + optionsOrCallback?: gax.CallOptions|Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1 + .IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): + Promise<[ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, + protosTypes.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.runBuildTrigger(request, options, callback); + } + /* + Lists previously requested builds. + + Previously requested builds may still be in-progress, or may have finished + successfully or unsuccessfully. + */ + listBuilds( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + ]>; + listBuilds( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>): void; + listBuilds( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.listBuilds(request, options, callback); + } + /* + Lists existing `BuildTrigger`s. + + This API is experimental. + */ + listBuildTriggers( + request: + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options?: gax.CallOptions): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| + null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + ]>; + listBuildTriggers( + request: + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| + null, + protosTypes.google.devtools.cloudbuild.v1 + .IListBuildTriggersResponse>): void; + listBuildTriggers( + request: + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + optionsOrCallback?: gax.CallOptions|Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| + null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse>, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| + null, + protosTypes.google.devtools.cloudbuild.v1 + .IListBuildTriggersResponse>): + Promise<[ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| + null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + ]>|void { + request = request || {}; + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + return this._innerApiCalls.listBuildTriggers(request, options, callback); + } +} diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json index 7c231167eb97..2398e64e2f4b 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -2,11 +2,11 @@ "interfaces": { "google.devtools.cloudbuild.v1.CloudBuild": { "retry_codes": { + "non_idempotent": [], "idempotent": [ "DEADLINE_EXCEEDED", "UNAVAILABLE" - ], - "non_idempotent": [] + ] }, "retry_params": { "default": { @@ -14,89 +14,84 @@ "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, + "rpc_timeout_multiplier": 1, "max_rpc_timeout_millis": 20000, "total_timeout_millis": 600000 } }, "methods": { "CreateBuild": { - "timeout_millis": 20000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetBuild": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListBuilds": { - "timeout_millis": 20000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "CancelBuild": { - "timeout_millis": 5000, + "timeout_millis": 600000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RetryBuild": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateBuildTrigger": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetBuildTrigger": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "ListBuildTriggers": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteBuildTrigger": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "idempotent", "retry_params_name": "default" }, "UpdateBuildTrigger": { - "timeout_millis": 5000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "RunBuildTrigger": { - "timeout_millis": 20000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RetryBuild": { - "timeout_millis": 20000, + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "CreateWorkerPool": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetWorkerPool": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "DeleteWorkerPool": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateWorkerPool": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListWorkerPools": { - "timeout_millis": 60000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" } diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js deleted file mode 100644 index 8c155606a1bf..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/devtools/cloudbuild/v1/doc_cloudbuild.js +++ /dev/null @@ -1,1675 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * Specifies a build to retry. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {string} id - * Required. Build ID of the original build. - * - * @typedef RetryBuildRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.RetryBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const RetryBuildRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Specifies a build trigger to run and the source to use. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {string} triggerId - * Required. ID of the trigger. - * - * @property {Object} source - * Required. Source to build against this trigger. - * - * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} - * - * @typedef RunBuildTriggerRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.RunBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const RunBuildTriggerRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Location of the source in an archive file in Google Cloud Storage. - * - * @property {string} bucket - * Google Cloud Storage bucket containing the source (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * @property {string} object - * Google Cloud Storage object containing the source. - * - * This object must be a gzipped archive file (`.tar.gz`) containing source to - * build. - * - * @property {number} generation - * Google Cloud Storage generation for the object. If the generation is - * omitted, the latest generation will be used. - * - * @typedef StorageSource - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.StorageSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const StorageSource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Location of the source in a Google Cloud Source Repository. - * - * @property {string} projectId - * ID of the project that owns the Cloud Source Repository. If omitted, the - * project ID requesting the build is assumed. - * - * @property {string} repoName - * Name of the Cloud Source Repository. If omitted, the name "default" is - * assumed. - * - * @property {string} branchName - * Regex matching branches to build. - * - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * @property {string} tagName - * Regex matching tags to build. - * - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * @property {string} commitSha - * Explicit commit SHA to build. - * - * @property {string} dir - * Directory, relative to the source root, in which to run the build. - * - * This must be a relative path. If a step's `dir` is specified and is an - * absolute path, this value is ignored for that step's execution. - * - * @typedef RepoSource - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.RepoSource definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const RepoSource = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Location of the source in a supported storage service. - * - * @property {Object} storageSource - * If provided, get the source from this location in Google Cloud Storage. - * - * This object should have the same structure as [StorageSource]{@link google.devtools.cloudbuild.v1.StorageSource} - * - * @property {Object} repoSource - * If provided, get the source from this location in a Cloud Source - * Repository. - * - * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} - * - * @typedef Source - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Source definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Source = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * An image built by the pipeline. - * - * @property {string} name - * Name used to push the container image to Google Container Registry, as - * presented to `docker push`. - * - * @property {string} digest - * Docker Registry 2.0 digest. - * - * @property {Object} pushTiming - * Output only. Stores timing information for pushing the specified image. - * - * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} - * - * @typedef BuiltImage - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.BuiltImage definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const BuiltImage = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A step in the build pipeline. - * - * @property {string} name - * Required. The name of the container image that will run this particular - * build step. - * - * If the image is available in the host's Docker daemon's cache, it - * will be run directly. If not, the host will attempt to pull the image - * first, using the builder service account's credentials if necessary. - * - * The Docker daemon's cache will already have the latest versions of all of - * the officially supported build steps - * ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). - * The Docker daemon will also have cached many of the layers for some popular - * images, like "ubuntu", "debian", but they will be refreshed at the time you - * attempt to use them. - * - * If you built an image in a previous build step, it will be stored in the - * host's Docker daemon's cache and is available to use as the name for a - * later build step. - * - * @property {string[]} env - * A list of environment variable definitions to be used when running a step. - * - * The elements are of the form "KEY=VALUE" for the environment variable "KEY" - * being given the value "VALUE". - * - * @property {string[]} args - * A list of arguments that will be presented to the step when it is started. - * - * If the image used to run the step's container has an entrypoint, the `args` - * are used as arguments to that entrypoint. If the image does not define - * an entrypoint, the first element in args is used as the entrypoint, - * and the remainder will be used as arguments. - * - * @property {string} dir - * Working directory to use when running this step's container. - * - * If this value is a relative path, it is relative to the build's working - * directory. If this value is absolute, it may be outside the build's working - * directory, in which case the contents of the path may not be persisted - * across build step executions, unless a `volume` for that path is specified. - * - * If the build specifies a `RepoSource` with `dir` and a step with a `dir`, - * which specifies an absolute path, the `RepoSource` `dir` is ignored for - * the step's execution. - * - * @property {string} id - * Unique identifier for this build step, used in `wait_for` to - * reference this build step as a dependency. - * - * @property {string[]} waitFor - * The ID(s) of the step(s) that this build step depends on. - * This build step will not start until all the build steps in `wait_for` - * have completed successfully. If `wait_for` is empty, this build step will - * start when all previous build steps in the `Build.Steps` list have - * completed successfully. - * - * @property {string} entrypoint - * Entrypoint to be used instead of the build step image's default entrypoint. - * If unset, the image's default entrypoint is used. - * - * @property {string[]} secretEnv - * A list of environment variables which are encrypted using a Cloud Key - * Management Service crypto key. These values must be specified in the - * build's `Secret`. - * - * @property {Object[]} volumes - * List of volumes to mount into the build step. - * - * Each volume is created as an empty volume prior to execution of the - * build step. Upon completion of the build, volumes and their contents are - * discarded. - * - * Using a named volume in only one step is not valid as it is indicative - * of a build request with an incorrect configuration. - * - * This object should have the same structure as [Volume]{@link google.devtools.cloudbuild.v1.Volume} - * - * @property {Object} timing - * Output only. Stores timing information for executing this build step. - * - * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} - * - * @property {Object} pullTiming - * Output only. Stores timing information for pulling this build step's - * builder image only. - * - * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} - * - * @property {Object} timeout - * Time limit for executing this build step. If not defined, the step has no - * time limit and will be allowed to continue to run until either it completes - * or the build itself times out. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {number} status - * Output only. Status of the build step. At this time, build step status is - * only updated on build completion; step status is not updated in real-time - * as the build progresses. - * - * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} - * - * @typedef BuildStep - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.BuildStep definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const BuildStep = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Volume describes a Docker container volume which is mounted into build steps - * in order to persist files across build step execution. - * - * @property {string} name - * Name of the volume to mount. - * - * Volume names must be unique per build step and must be valid names for - * Docker volumes. Each named volume must be used by at least two build steps. - * - * @property {string} path - * Path at which to mount the volume. - * - * Paths must be absolute and cannot conflict with other volume paths on the - * same build step or with certain reserved volume paths. - * - * @typedef Volume - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Volume definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Volume = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Artifacts created by the build pipeline. - * - * @property {Object[]} images - * Container images that were built as a part of the build. - * - * This object should have the same structure as [BuiltImage]{@link google.devtools.cloudbuild.v1.BuiltImage} - * - * @property {string[]} buildStepImages - * List of build step digests, in the order corresponding to build step - * indices. - * - * @property {string} artifactManifest - * Path to the artifact manifest. Only populated when artifacts are uploaded. - * - * @property {number} numArtifacts - * Number of artifacts uploaded. Only populated when artifacts are uploaded. - * - * @property {Buffer[]} buildStepOutputs - * List of build step outputs, produced by builder images, in the order - * corresponding to build step indices. - * - * [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) - * can produce this output by writing to `$BUILDER_OUTPUT/output`. - * Only the first 4KB of data is stored. - * - * @property {Object} artifactTiming - * Time to push all non-container artifacts. - * - * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} - * - * @typedef Results - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Results definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Results = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * An artifact that was uploaded during a build. This - * is a single record in the artifact manifest JSON file. - * - * @property {string} location - * The path of an artifact in a Google Cloud Storage bucket, with the - * generation number. For example, - * `gs://mybucket/path/to/output.jar#generation`. - * - * @property {Object[]} fileHash - * The file hash of the artifact. - * - * This object should have the same structure as [FileHashes]{@link google.devtools.cloudbuild.v1.FileHashes} - * - * @typedef ArtifactResult - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ArtifactResult definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ArtifactResult = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * A build resource in the Cloud Build API. - * - * At a high level, a `Build` describes where to find source code, how to build - * it (for example, the builder image to run on the source), and where to store - * the built artifacts. - * - * Fields can include the following variables, which will be expanded when the - * build is created: - * - * - $PROJECT_ID: the project ID of the build. - * - $BUILD_ID: the autogenerated ID of the build. - * - $REPO_NAME: the source repository name specified by RepoSource. - * - $BRANCH_NAME: the branch name specified by RepoSource. - * - $TAG_NAME: the tag name specified by RepoSource. - * - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or - * resolved from the specified branch or tag. - * - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. - * - * @property {string} id - * Output only. Unique identifier of the build. - * - * @property {string} projectId - * Output only. ID of the project. - * - * @property {number} status - * Output only. Status of the build. - * - * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} - * - * @property {string} statusDetail - * Output only. Customer-readable message about the current status. - * - * @property {Object} source - * The location of the source files to build. - * - * This object should have the same structure as [Source]{@link google.devtools.cloudbuild.v1.Source} - * - * @property {Object[]} steps - * Required. The operations to be performed on the workspace. - * - * This object should have the same structure as [BuildStep]{@link google.devtools.cloudbuild.v1.BuildStep} - * - * @property {Object} results - * Output only. Results of the build. - * - * This object should have the same structure as [Results]{@link google.devtools.cloudbuild.v1.Results} - * - * @property {Object} createTime - * Output only. Time at which the request to create the build was received. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} startTime - * Output only. Time at which execution of the build was started. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} finishTime - * Output only. Time at which execution of the build was finished. - * - * The difference between finish_time and start_time is the duration of the - * build's execution. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} timeout - * Amount of time that this build should be allowed to run, to second - * granularity. If this amount of time elapses, work on the build will cease - * and the build status will be `TIMEOUT`. - * - * Default time is ten minutes. - * - * This object should have the same structure as [Duration]{@link google.protobuf.Duration} - * - * @property {string[]} images - * A list of images to be pushed upon the successful completion of all build - * steps. - * - * The images are pushed using the builder service account's credentials. - * - * The digests of the pushed images will be stored in the `Build` resource's - * results field. - * - * If any of the images fail to be pushed, the build status is marked - * `FAILURE`. - * - * @property {Object} artifacts - * Artifacts produced by the build that should be uploaded upon - * successful completion of all build steps. - * - * This object should have the same structure as [Artifacts]{@link google.devtools.cloudbuild.v1.Artifacts} - * - * @property {string} logsBucket - * Google Cloud Storage bucket where logs should be written (see - * [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. - * - * @property {Object} sourceProvenance - * Output only. A permanent fixed identifier for source. - * - * This object should have the same structure as [SourceProvenance]{@link google.devtools.cloudbuild.v1.SourceProvenance} - * - * @property {string} buildTriggerId - * Output only. The ID of the `BuildTrigger` that triggered this build, if it - * was triggered automatically. - * - * @property {Object} options - * Special options for this build. - * - * This object should have the same structure as [BuildOptions]{@link google.devtools.cloudbuild.v1.BuildOptions} - * - * @property {string} logUrl - * Output only. URL to logs for this build in Google Cloud Console. - * - * @property {Object.} substitutions - * Substitutions data for `Build` resource. - * - * @property {string[]} tags - * Tags for annotation of a `Build`. These are not docker tags. - * - * @property {Object[]} secrets - * Secrets to decrypt using Cloud Key Management Service. - * - * This object should have the same structure as [Secret]{@link google.devtools.cloudbuild.v1.Secret} - * - * @property {Object.} timing - * Output only. Stores timing information for phases of the build. Valid keys - * are: - * - * * BUILD: time to execute all build steps - * * PUSH: time to push all specified images. - * * FETCHSOURCE: time to fetch source. - * - * If the build does not specify source or images, - * these keys will not be included. - * - * @typedef Build - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Build definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Build = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Possible status of a build or build step. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - Status: { - - /** - * Status of the build is unknown. - */ - STATUS_UNKNOWN: 0, - - /** - * Build or step is queued; work has not yet begun. - */ - QUEUED: 1, - - /** - * Build or step is being executed. - */ - WORKING: 2, - - /** - * Build or step finished successfully. - */ - SUCCESS: 3, - - /** - * Build or step failed to complete successfully. - */ - FAILURE: 4, - - /** - * Build or step failed due to an internal cause. - */ - INTERNAL_ERROR: 5, - - /** - * Build or step took longer than was allowed. - */ - TIMEOUT: 6, - - /** - * Build or step was canceled by a user. - */ - CANCELLED: 7 - } -}; - -/** - * Artifacts produced by a build that should be uploaded upon - * successful completion of all build steps. - * - * @property {string[]} images - * A list of images to be pushed upon the successful completion of all build - * steps. - * - * The images will be pushed using the builder service account's credentials. - * - * The digests of the pushed images will be stored in the Build resource's - * results field. - * - * If any of the images fail to be pushed, the build is marked FAILURE. - * - * @property {Object} objects - * A list of objects to be uploaded to Cloud Storage upon successful - * completion of all build steps. - * - * Files in the workspace matching specified paths globs will be uploaded to - * the specified Cloud Storage location using the builder service account's - * credentials. - * - * The location and generation of the uploaded objects will be stored in the - * Build resource's results field. - * - * If any objects fail to be pushed, the build is marked FAILURE. - * - * This object should have the same structure as [ArtifactObjects]{@link google.devtools.cloudbuild.v1.ArtifactObjects} - * - * @typedef Artifacts - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Artifacts definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Artifacts = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Files in the workspace to upload to Cloud Storage upon successful - * completion of all build steps. - * - * @property {string} location - * Cloud Storage bucket and optional object path, in the form - * "gs://bucket/path/to/somewhere/". (see [Bucket Name - * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - * - * Files in the workspace matching any path pattern will be uploaded to - * Cloud Storage with this location as a prefix. - * - * @property {string[]} paths - * Path globs used to match files in the build's workspace. - * - * @property {Object} timing - * Output only. Stores timing information for pushing all artifact objects. - * - * This object should have the same structure as [TimeSpan]{@link google.devtools.cloudbuild.v1.TimeSpan} - * - * @typedef ArtifactObjects - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ - ArtifactObjects: { - // This is for documentation. Actual contents will be loaded by gRPC. - } -}; - -/** - * Start and end times for a build execution phase. - * - * @property {Object} startTime - * Start of time span. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} endTime - * End of time span. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @typedef TimeSpan - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.TimeSpan definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const TimeSpan = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Metadata for build operations. - * - * @property {Object} build - * The build that the operation is tracking. - * - * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} - * - * @typedef BuildOperationMetadata - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.BuildOperationMetadata definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const BuildOperationMetadata = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Provenance of the source. Ways to find the original source, or verify that - * some source was used for this build. - * - * @property {Object} resolvedStorageSource - * A copy of the build's `source.storage_source`, if exists, with any - * generations resolved. - * - * This object should have the same structure as [StorageSource]{@link google.devtools.cloudbuild.v1.StorageSource} - * - * @property {Object} resolvedRepoSource - * A copy of the build's `source.repo_source`, if exists, with any - * revisions resolved. - * - * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} - * - * @property {Object.} fileHashes - * Output only. Hash(es) of the build source, which can be used to verify that - * the original source integrity was maintained in the build. Note that - * `FileHashes` will only be populated if `BuildOptions` has requested a - * `SourceProvenanceHash`. - * - * The keys to this map are file paths used as build source and the values - * contain the hash values for those files. - * - * If the build source came in a single package such as a gzipped tarfile - * (`.tar.gz`), the `FileHash` will be for the single path to that file. - * - * @typedef SourceProvenance - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.SourceProvenance definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const SourceProvenance = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Container message for hashes of byte content of files, used in - * SourceProvenance messages to verify integrity of source input to the build. - * - * @property {Object[]} fileHash - * Collection of file hashes. - * - * This object should have the same structure as [Hash]{@link google.devtools.cloudbuild.v1.Hash} - * - * @typedef FileHashes - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.FileHashes definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const FileHashes = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Container message for hash values. - * - * @property {number} type - * The type of hash that was performed. - * - * The number should be among the values of [HashType]{@link google.devtools.cloudbuild.v1.HashType} - * - * @property {Buffer} value - * The hash value. - * - * @typedef Hash - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Hash definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Hash = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Specifies the hash algorithm, if any. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - HashType: { - - /** - * No hash requested. - */ - NONE: 0, - - /** - * Use a sha256 hash. - */ - SHA256: 1, - - /** - * Use a md5 hash. - */ - MD5: 2 - } -}; - -/** - * Pairs a set of secret environment variables containing encrypted - * values with the Cloud KMS key to use to decrypt the value. - * - * @property {string} kmsKeyName - * Cloud KMS key name to use to decrypt these envs. - * - * @property {Object.} secretEnv - * Map of environment variable name to its encrypted value. - * - * Secret environment variables must be unique across all of a build's - * secrets, and must be used by at least one build step. Values can be at most - * 64 KB in size. There can be at most 100 secret values across all of a - * build's secrets. - * - * @typedef Secret - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Secret definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Secret = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to create a new build. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {Object} build - * Required. Build resource to create. - * - * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} - * - * @typedef CreateBuildRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.CreateBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const CreateBuildRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to get a build. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {string} id - * Required. ID of the build. - * - * @typedef GetBuildRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.GetBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const GetBuildRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to list builds. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {number} pageSize - * Number of results to return in the list. - * - * @property {string} pageToken - * Token to provide to skip to a particular spot in the list. - * - * @property {string} filter - * The raw filter text to constrain the results. - * - * @typedef ListBuildsRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListBuildsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListBuildsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response including listed builds. - * - * @property {Object[]} builds - * Builds will be sorted by `create_time`, descending. - * - * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} - * - * @property {string} nextPageToken - * Token to receive the next page of results. - * - * @typedef ListBuildsResponse - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListBuildsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListBuildsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to cancel an ongoing build. - * - * @property {string} projectId - * Required. ID of the project. - * - * @property {string} id - * Required. ID of the build. - * - * @typedef CancelBuildRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.CancelBuildRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const CancelBuildRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Configuration for an automated build in response to source repository - * changes. - * - * @property {string} id - * Output only. Unique identifier of the trigger. - * - * @property {string} description - * Human-readable description of this trigger. - * - * @property {string} name - * User assigned name of the trigger. Must be unique within the project. - * - * @property {string[]} tags - * Tags for annotation of a `BuildTrigger` - * - * @property {Object} triggerTemplate - * Template describing the types of source changes to trigger a build. - * - * Branch and tag names in trigger templates are interpreted as regular - * expressions. Any branch or tag change that matches that regular expression - * will trigger a build. - * - * This object should have the same structure as [RepoSource]{@link google.devtools.cloudbuild.v1.RepoSource} - * - * @property {Object} github - * GitHubEventsConfig describes the configuration of a trigger that creates - * a build whenever a GitHub event is received. - * - * This object should have the same structure as [GitHubEventsConfig]{@link google.devtools.cloudbuild.v1.GitHubEventsConfig} - * - * @property {Object} build - * Contents of the build template. - * - * This object should have the same structure as [Build]{@link google.devtools.cloudbuild.v1.Build} - * - * @property {string} filename - * Path, from the source root, to a file whose contents is used for the - * template. - * - * @property {Object} createTime - * Output only. Time when the trigger was created. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {boolean} disabled - * If true, the trigger will never result in a build. - * - * @property {Object.} substitutions - * Substitutions data for Build resource. - * - * @property {string[]} ignoredFiles - * ignored_files and included_files are file glob matches using - * http://godoc/pkg/path/filepath#Match extended with support for "**". - * - * If ignored_files and changed files are both empty, then they are - * not used to determine whether or not to trigger a build. - * - * If ignored_files is not empty, then we ignore any files that match - * any of the ignored_file globs. If the change has no files that are - * outside of the ignored_files globs, then we do not trigger a build. - * - * @property {string[]} includedFiles - * If any of the files altered in the commit pass the ignored_files - * filter and included_files is empty, then as far as this filter is - * concerned, we should trigger the build. - * - * If any of the files altered in the commit pass the ignored_files - * filter and included_files is not empty, then we make sure that at - * least one of those files matches a included_files glob. If not, - * then we do not trigger a build. - * - * @typedef BuildTrigger - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.BuildTrigger definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const BuildTrigger = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * GitHubEventsConfig describes the configuration of a trigger that creates a - * build whenever a GitHub event is received. - * - * This message is experimental. - * - * @property {number} installationId - * The installationID that emits the GitHub event. - * - * @property {string} owner - * Owner of the repository. For example: The owner for - * https://github.com/googlecloudplatform/cloud-builders is - * "googlecloudplatform". - * - * @property {string} name - * Name of the repository. For example: The name for - * https://github.com/googlecloudplatform/cloud-builders is "cloud-builders". - * - * @property {Object} pullRequest - * filter to match changes in pull requests. - * - * This object should have the same structure as [PullRequestFilter]{@link google.devtools.cloudbuild.v1.PullRequestFilter} - * - * @property {Object} push - * filter to match changes in refs like branches, tags. - * - * This object should have the same structure as [PushFilter]{@link google.devtools.cloudbuild.v1.PushFilter} - * - * @typedef GitHubEventsConfig - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.GitHubEventsConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const GitHubEventsConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * PullRequestFilter contains filter properties for matching GitHub Pull - * Requests. - * - * @property {string} branch - * Regex of branches to match. - * - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * @property {number} commentControl - * Whether to block builds on a "/gcbrun" comment from a repository owner or - * collaborator. - * - * The number should be among the values of [CommentControl]{@link google.devtools.cloudbuild.v1.CommentControl} - * - * @typedef PullRequestFilter - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.PullRequestFilter definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const PullRequestFilter = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Controls behavior of Pull Request comments. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - CommentControl: { - - /** - * Do not require comments on Pull Requests before builds are triggered. - */ - COMMENTS_DISABLED: 0, - - /** - * Enforce that repository owners or collaborators must comment on Pull - * Requests before builds are triggered. - */ - COMMENTS_ENABLED: 1 - } -}; - -/** - * Push contains filter properties for matching GitHub git pushes. - * - * @property {string} branch - * Regexes matching branches to build. - * - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * @property {string} tag - * Regexes matching tags to build. - * - * The syntax of the regular expressions accepted is the syntax accepted by - * RE2 and described at https://github.com/google/re2/wiki/Syntax - * - * @typedef PushFilter - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.PushFilter definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const PushFilter = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to create a new `BuildTrigger`. - * - * @property {string} projectId - * Required. ID of the project for which to configure automatic builds. - * - * @property {Object} trigger - * Required. `BuildTrigger` to create. - * - * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} - * - * @typedef CreateBuildTriggerRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.CreateBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const CreateBuildTriggerRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Returns the `BuildTrigger` with the specified ID. - * - * @property {string} projectId - * Required. ID of the project that owns the trigger. - * - * @property {string} triggerId - * Required. ID of the `BuildTrigger` to get. - * - * @typedef GetBuildTriggerRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.GetBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const GetBuildTriggerRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to list existing `BuildTriggers`. - * - * @property {string} projectId - * Required. ID of the project for which to list BuildTriggers. - * - * @property {number} pageSize - * Number of results to return in the list. - * - * @property {string} pageToken - * Token to provide to skip to a particular spot in the list. - * - * @typedef ListBuildTriggersRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListBuildTriggersRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListBuildTriggersRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response containing existing `BuildTriggers`. - * - * @property {Object[]} triggers - * `BuildTriggers` for the project, sorted by `create_time` descending. - * - * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} - * - * @property {string} nextPageToken - * Token to receive the next page of results. - * - * @typedef ListBuildTriggersResponse - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListBuildTriggersResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListBuildTriggersResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to delete a `BuildTrigger`. - * - * @property {string} projectId - * Required. ID of the project that owns the trigger. - * - * @property {string} triggerId - * Required. ID of the `BuildTrigger` to delete. - * - * @typedef DeleteBuildTriggerRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const DeleteBuildTriggerRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to update an existing `BuildTrigger`. - * - * @property {string} projectId - * Required. ID of the project that owns the trigger. - * - * @property {string} triggerId - * Required. ID of the `BuildTrigger` to update. - * - * @property {Object} trigger - * Required. `BuildTrigger` to update. - * - * This object should have the same structure as [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} - * - * @typedef UpdateBuildTriggerRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const UpdateBuildTriggerRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Optional arguments to enable specific features of builds. - * - * @property {number[]} sourceProvenanceHash - * Requested hash for SourceProvenance. - * - * The number should be among the values of [HashType]{@link google.devtools.cloudbuild.v1.HashType} - * - * @property {number} requestedVerifyOption - * Requested verifiability options. - * - * The number should be among the values of [VerifyOption]{@link google.devtools.cloudbuild.v1.VerifyOption} - * - * @property {number} machineType - * Compute Engine machine type on which to run the build. - * - * The number should be among the values of [MachineType]{@link google.devtools.cloudbuild.v1.MachineType} - * - * @property {number} diskSizeGb - * Requested disk size for the VM that runs the build. Note that this is *NOT* - * "disk free"; some of the space will be used by the operating system and - * build utilities. Also note that this is the minimum disk size that will be - * allocated for the build -- the build may run with a larger disk than - * requested. At present, the maximum disk size is 1000GB; builds that request - * more than the maximum are rejected with an error. - * - * @property {number} substitutionOption - * Option to specify behavior when there is an error in the substitution - * checks. - * - * The number should be among the values of [SubstitutionOption]{@link google.devtools.cloudbuild.v1.SubstitutionOption} - * - * @property {number} logStreamingOption - * Option to define build log streaming behavior to Google Cloud - * Storage. - * - * The number should be among the values of [LogStreamingOption]{@link google.devtools.cloudbuild.v1.LogStreamingOption} - * - * @property {string} workerPool - * Option to specify a `WorkerPool` for the build. User specifies the pool - * with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". - * This is an experimental field. - * - * @property {number} logging - * Option to specify the logging mode, which determines where the logs are - * stored. - * - * The number should be among the values of [LoggingMode]{@link google.devtools.cloudbuild.v1.LoggingMode} - * - * @property {string[]} env - * A list of global environment variable definitions that will exist for all - * build steps in this build. If a variable is defined in both globally and in - * a build step, the variable will use the build step value. - * - * The elements are of the form "KEY=VALUE" for the environment variable "KEY" - * being given the value "VALUE". - * - * @property {string[]} secretEnv - * A list of global environment variables, which are encrypted using a Cloud - * Key Management Service crypto key. These values must be specified in the - * build's `Secret`. These variables will be available to all build steps - * in this build. - * - * @property {Object[]} volumes - * Global list of volumes to mount for ALL build steps - * - * Each volume is created as an empty volume prior to starting the build - * process. Upon completion of the build, volumes and their contents are - * discarded. Global volume names and paths cannot conflict with the volumes - * defined a build step. - * - * Using a global volume in a build with only one step is not valid as - * it is indicative of a build request with an incorrect configuration. - * - * This object should have the same structure as [Volume]{@link google.devtools.cloudbuild.v1.Volume} - * - * @typedef BuildOptions - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.BuildOptions definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const BuildOptions = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Specifies the behavior when writing build logs to Google Cloud Storage. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - LogStreamingOption: { - - /** - * Service may automatically determine build log streaming behavior. - */ - STREAM_DEFAULT: 0, - - /** - * Build logs should be streamed to Google Cloud Storage. - */ - STREAM_ON: 1, - - /** - * Build logs should not be streamed to Google Cloud Storage; they will be - * written when the build is completed. - */ - STREAM_OFF: 2 - }, - - /** - * Specifies the logging mode. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - LoggingMode: { - - /** - * The service determines the logging mode. The default is `LEGACY`. Do not - * rely on the default logging behavior as it may change in the future. - */ - LOGGING_UNSPECIFIED: 0, - - /** - * Stackdriver logging and Cloud Storage logging are enabled. - */ - LEGACY: 1, - - /** - * Only Cloud Storage logging is enabled. - */ - GCS_ONLY: 2 - }, - - /** - * Supported VM sizes. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - MachineType: { - - /** - * Standard machine type. - */ - UNSPECIFIED: 0, - - /** - * Highcpu machine with 8 CPUs. - */ - N1_HIGHCPU_8: 1, - - /** - * Highcpu machine with 32 CPUs. - */ - N1_HIGHCPU_32: 2 - }, - - /** - * Specifies the behavior when there is an error in the substitution checks. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - SubstitutionOption: { - - /** - * Fails the build if error in substitutions checks, like missing - * a substitution in the template or in the map. - */ - MUST_MATCH: 0, - - /** - * Do not fail the build if error in substitutions checks. - */ - ALLOW_LOOSE: 1 - }, - - /** - * Specifies the manner in which the build should be verified, if at all. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - VerifyOption: { - - /** - * Not a verifiable build. (default) - */ - NOT_VERIFIED: 0, - - /** - * Verified build. - */ - VERIFIED: 1 - } -}; - -/** - * Configuration for a WorkerPool to run the builds. - * - * Workers are machines that Cloud Build uses to run your builds. By default, - * all workers run in a project owned by Cloud Build. To have full control over - * the workers that execute your builds -- such as enabling them to access - * private resources on your private network -- you can request Cloud Build to - * run the workers in your own project by creating a custom workers pool. - * - * @property {string} name - * User-defined name of the `WorkerPool`. - * - * @property {string} projectId - * The project ID of the GCP project for which the `WorkerPool` is created. - * - * @property {string} serviceAccountEmail - * Output only. The service account used to manage the `WorkerPool`. The - * service account must have the Compute Instance Admin (Beta) permission at - * the project level. - * - * @property {number} workerCount - * Total number of workers to be created across all requested regions. - * - * @property {Object} workerConfig - * Configuration to be used for a creating workers in the `WorkerPool`. - * - * This object should have the same structure as [WorkerConfig]{@link google.devtools.cloudbuild.v1.WorkerConfig} - * - * @property {number[]} regions - * List of regions to create the `WorkerPool`. Regions can't be empty. - * If Cloud Build adds a new GCP region in the future, the existing - * `WorkerPool` will not be enabled in the new region automatically; - * you must add the new region to the `regions` field to enable the - * `WorkerPool` in that region. - * - * The number should be among the values of [Region]{@link google.devtools.cloudbuild.v1.Region} - * - * @property {Object} createTime - * Output only. Time at which the request to create the `WorkerPool` was - * received. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} updateTime - * Output only. Time at which the request to update the `WorkerPool` was - * received. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {Object} deleteTime - * Output only. Time at which the request to delete the `WorkerPool` was - * received. - * - * This object should have the same structure as [Timestamp]{@link google.protobuf.Timestamp} - * - * @property {number} status - * Output only. WorkerPool Status. - * - * The number should be among the values of [Status]{@link google.devtools.cloudbuild.v1.Status} - * - * @typedef WorkerPool - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.WorkerPool definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const WorkerPool = { - // This is for documentation. Actual contents will be loaded by gRPC. - - /** - * Supported GCP regions to create the `WorkerPool`. - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - Region: { - - /** - * no region - */ - REGION_UNSPECIFIED: 0, - - /** - * us-central1 region - */ - US_CENTRAL1: 1, - - /** - * us-west1 region - */ - US_WEST1: 2, - - /** - * us-east1 region - */ - US_EAST1: 3, - - /** - * us-east4 region - */ - US_EAST4: 4 - }, - - /** - * `WorkerPool` status - * - * @enum {number} - * @memberof google.devtools.cloudbuild.v1 - */ - Status: { - - /** - * Status of the `WorkerPool` is unknown. - */ - STATUS_UNSPECIFIED: 0, - - /** - * `WorkerPool` is being created. - */ - CREATING: 1, - - /** - * `WorkerPool` is running. - */ - RUNNING: 2, - - /** - * `WorkerPool` is being deleting: cancelling builds and draining workers. - */ - DELETING: 3, - - /** - * `WorkerPool` is deleted. - */ - DELETED: 4 - } -}; - -/** - * WorkerConfig defines the configuration to be used for a creating workers in - * the pool. - * - * @property {string} machineType - * Machine Type of the worker, such as n1-standard-1. - * See https://cloud.google.com/compute/docs/machine-types. - * If left blank, Cloud Build will use a standard unspecified machine to - * create the worker pool. - * `machine_type` is overridden if you specify a different machine type in - * `build_options`. In this case, the VM specified in the `build_options` - * will be created on demand at build time. For more information see - * https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes - * - * @property {number} diskSizeGb - * Size of the disk attached to the worker, in GB. - * See https://cloud.google.com/compute/docs/disks/ - * If `0` is specified, Cloud Build will use a standard disk size. - * `disk_size` is overridden if you specify a different disk size in - * `build_options`. In this case, a VM with a disk size specified in the - * `build_options` will be created on demand at build time. For more - * information see - * https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions - * - * @property {Object} network - * The network definition used to create the worker. - * If this section is left empty, the workers will be created in - * WorkerPool.project_id on the default network. - * - * This object should have the same structure as [Network]{@link google.devtools.cloudbuild.v1.Network} - * - * @property {string} tag - * The tag applied to the worker, and the same tag used by the firewall rule. - * It is used to identify the Cloud Build workers among other VMs. - * The default value for tag is `worker`. - * - * @typedef WorkerConfig - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.WorkerConfig definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const WorkerConfig = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Network describes the GCP network used to create workers in. - * - * @property {string} projectId - * Project id containing the defined network and subnetwork. For a peered VPC, - * this will be the same as the project_id in which the workers are created. - * For a shared VPC, this will be the project sharing the network with the - * project_id project in which workers will be created. For custom workers - * with no VPC, this will be the same as project_id. - * - * @property {string} network - * Network on which the workers are created. - * "default" network is used if empty. - * - * @property {string} subnetwork - * Subnetwork on which the workers are created. - * "default" subnetwork is used if empty. - * - * @typedef Network - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.Network definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const Network = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to create a new `WorkerPool`. - * - * @property {string} parent - * ID of the parent project. - * - * @property {Object} workerPool - * `WorkerPool` resource to create. - * - * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} - * - * @typedef CreateWorkerPoolRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.CreateWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const CreateWorkerPoolRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to get a `WorkerPool` with the specified name. - * - * @property {string} name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * - * @typedef GetWorkerPoolRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.GetWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const GetWorkerPoolRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to delete a `WorkerPool`. - * - * @property {string} name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * - * @typedef DeleteWorkerPoolRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const DeleteWorkerPoolRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to update a `WorkerPool`. - * - * @property {string} name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * - * @property {Object} workerPool - * `WorkerPool` resource to update. - * - * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} - * - * @typedef UpdateWorkerPoolRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const UpdateWorkerPoolRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Request to list `WorkerPool`s. - * - * @property {string} parent - * ID of the parent project. - * - * @typedef ListWorkerPoolsRequest - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListWorkerPoolsRequest definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListWorkerPoolsRequest = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; - -/** - * Response containing existing `WorkerPools`. - * - * @property {Object[]} workerPools - * `WorkerPools` for the project. - * - * This object should have the same structure as [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} - * - * @typedef ListWorkerPoolsResponse - * @memberof google.devtools.cloudbuild.v1 - * @see [google.devtools.cloudbuild.v1.ListWorkerPoolsResponse definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/devtools/cloudbuild/v1/cloudbuild.proto} - */ -const ListWorkerPoolsResponse = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js deleted file mode 100644 index 4719aebdc91b..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/longrunning/doc_operations.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * This resource represents a long-running operation that is the result of a - * network API call. - * - * @property {string} name - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should have the format of `operations/some/unique/name`. - * - * @property {Object} metadata - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @property {boolean} done - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * @property {Object} error - * The error result of the operation in case of failure or cancellation. - * - * This object should have the same structure as [Status]{@link google.rpc.Status} - * - * @property {Object} response - * The normal response of the operation in case of success. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Operation - * @memberof google.longrunning - * @see [google.longrunning.Operation definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/longrunning/operations.proto} - */ -const Operation = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js deleted file mode 100644 index cdd2fc80e49b..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_any.js +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * `Any` contains an arbitrary serialized protocol buffer message along with a - * URL that describes the type of the serialized message. - * - * Protobuf library provides support to pack/unpack Any values in the form - * of utility functions or additional generated methods of the Any type. - * - * Example 1: Pack and unpack a message in C++. - * - * Foo foo = ...; - * Any any; - * any.PackFrom(foo); - * ... - * if (any.UnpackTo(&foo)) { - * ... - * } - * - * Example 2: Pack and unpack a message in Java. - * - * Foo foo = ...; - * Any any = Any.pack(foo); - * ... - * if (any.is(Foo.class)) { - * foo = any.unpack(Foo.class); - * } - * - * Example 3: Pack and unpack a message in Python. - * - * foo = Foo(...) - * any = Any() - * any.Pack(foo) - * ... - * if any.Is(Foo.DESCRIPTOR): - * any.Unpack(foo) - * ... - * - * Example 4: Pack and unpack a message in Go - * - * foo := &pb.Foo{...} - * any, err := ptypes.MarshalAny(foo) - * ... - * foo := &pb.Foo{} - * if err := ptypes.UnmarshalAny(any, foo); err != nil { - * ... - * } - * - * The pack methods provided by protobuf library will by default use - * 'type.googleapis.com/full.type.name' as the type URL and the unpack - * methods only use the fully qualified type name after the last '/' - * in the type URL, for example "foo.bar.com/x/y.z" will yield type - * name "y.z". - * - * - * # JSON - * - * The JSON representation of an `Any` value uses the regular - * representation of the deserialized, embedded message, with an - * additional field `@type` which contains the type URL. Example: - * - * package google.profile; - * message Person { - * string first_name = 1; - * string last_name = 2; - * } - * - * { - * "@type": "type.googleapis.com/google.profile.Person", - * "firstName": , - * "lastName": - * } - * - * If the embedded message type is well-known and has a custom JSON - * representation, that representation will be embedded adding a field - * `value` which holds the custom JSON in addition to the `@type` - * field. Example (for message google.protobuf.Duration): - * - * { - * "@type": "type.googleapis.com/google.protobuf.Duration", - * "value": "1.212s" - * } - * - * @property {string} typeUrl - * A URL/resource name that uniquely identifies the type of the serialized - * protocol buffer message. This string must contain at least - * one "/" character. The last segment of the URL's path must represent - * the fully qualified name of the type (as in - * `path/google.protobuf.Duration`). The name should be in a canonical form - * (e.g., leading "." is not accepted). - * - * In practice, teams usually precompile into the binary all types that they - * expect it to use in the context of Any. However, for URLs which use the - * scheme `http`, `https`, or no scheme, one can optionally set up a type - * server that maps type URLs to message definitions as follows: - * - * * If no scheme is provided, `https` is assumed. - * * An HTTP GET on the URL must yield a google.protobuf.Type - * value in binary format, or produce an error. - * * Applications are allowed to cache lookup results based on the - * URL, or have them precompiled into a binary to avoid any - * lookup. Therefore, binary compatibility needs to be preserved - * on changes to types. (Use versioned type names to manage - * breaking changes.) - * - * Note: this functionality is not currently available in the official - * protobuf release, and it is not used for type URLs beginning with - * type.googleapis.com. - * - * Schemes other than `http`, `https` (or the empty scheme) might be - * used with implementation specific semantics. - * - * @property {Buffer} value - * Must be a valid serialized protocol buffer of the above specified type. - * - * @typedef Any - * @memberof google.protobuf - * @see [google.protobuf.Any definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/any.proto} - */ -const Any = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js deleted file mode 100644 index 1275f8f4d136..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_duration.js +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Duration represents a signed, fixed-length span of time represented - * as a count of seconds and fractions of seconds at nanosecond - * resolution. It is independent of any calendar and concepts like "day" - * or "month". It is related to Timestamp in that the difference between - * two Timestamp values is a Duration and it can be added or subtracted - * from a Timestamp. Range is approximately +-10,000 years. - * - * # Examples - * - * Example 1: Compute Duration from two Timestamps in pseudo code. - * - * Timestamp start = ...; - * Timestamp end = ...; - * Duration duration = ...; - * - * duration.seconds = end.seconds - start.seconds; - * duration.nanos = end.nanos - start.nanos; - * - * if (duration.seconds < 0 && duration.nanos > 0) { - * duration.seconds += 1; - * duration.nanos -= 1000000000; - * } else if (durations.seconds > 0 && duration.nanos < 0) { - * duration.seconds -= 1; - * duration.nanos += 1000000000; - * } - * - * Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - * - * Timestamp start = ...; - * Duration duration = ...; - * Timestamp end = ...; - * - * end.seconds = start.seconds + duration.seconds; - * end.nanos = start.nanos + duration.nanos; - * - * if (end.nanos < 0) { - * end.seconds -= 1; - * end.nanos += 1000000000; - * } else if (end.nanos >= 1000000000) { - * end.seconds += 1; - * end.nanos -= 1000000000; - * } - * - * Example 3: Compute Duration from datetime.timedelta in Python. - * - * td = datetime.timedelta(days=3, minutes=10) - * duration = Duration() - * duration.FromTimedelta(td) - * - * # JSON Mapping - * - * In JSON format, the Duration type is encoded as a string rather than an - * object, where the string ends in the suffix "s" (indicating seconds) and - * is preceded by the number of seconds, with nanoseconds expressed as - * fractional seconds. For example, 3 seconds with 0 nanoseconds should be - * encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - * be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - * microsecond should be expressed in JSON format as "3.000001s". - * - * @property {number} seconds - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. Note: these bounds are computed from: - * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - * - * @property {number} nanos - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * - * @typedef Duration - * @memberof google.protobuf - * @see [google.protobuf.Duration definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/duration.proto} - */ -const Duration = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js deleted file mode 100644 index 0b446dd9ce4f..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_empty.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A generic empty message that you can re-use to avoid defining duplicated - * empty messages in your APIs. A typical example is to use it as the request - * or the response type of an API method. For instance: - * - * service Foo { - * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - * } - * - * The JSON representation for `Empty` is empty JSON object `{}`. - * @typedef Empty - * @memberof google.protobuf - * @see [google.protobuf.Empty definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/empty.proto} - */ -const Empty = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js deleted file mode 100644 index 3bc1e986897a..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/protobuf/doc_timestamp.js +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * A Timestamp represents a point in time independent of any time zone or local - * calendar, encoded as a count of seconds and fractions of seconds at - * nanosecond resolution. The count is relative to an epoch at UTC midnight on - * January 1, 1970, in the proleptic Gregorian calendar which extends the - * Gregorian calendar backwards to year one. - * - * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - * second table is needed for interpretation, using a [24-hour linear - * smear](https://developers.google.com/time/smear). - * - * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - * restricting to that range, we ensure that we can convert to and from [RFC - * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - * - * # Examples - * - * Example 1: Compute Timestamp from POSIX `time()`. - * - * Timestamp timestamp; - * timestamp.set_seconds(time(NULL)); - * timestamp.set_nanos(0); - * - * Example 2: Compute Timestamp from POSIX `gettimeofday()`. - * - * struct timeval tv; - * gettimeofday(&tv, NULL); - * - * Timestamp timestamp; - * timestamp.set_seconds(tv.tv_sec); - * timestamp.set_nanos(tv.tv_usec * 1000); - * - * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - * - * FILETIME ft; - * GetSystemTimeAsFileTime(&ft); - * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - * - * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - * Timestamp timestamp; - * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - * - * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - * - * long millis = System.currentTimeMillis(); - * - * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - * .setNanos((int) ((millis % 1000) * 1000000)).build(); - * - * - * Example 5: Compute Timestamp from current time in Python. - * - * timestamp = Timestamp() - * timestamp.GetCurrentTime() - * - * # JSON Mapping - * - * In JSON format, the Timestamp type is encoded as a string in the - * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" - * where {year} is always expressed using four digits while {month}, {day}, - * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional - * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - * is required. A proto3 JSON serializer should always use UTC (as indicated by - * "Z") when printing the Timestamp type and a proto3 JSON parser should be - * able to accept both UTC and other timezones (as indicated by an offset). - * - * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - * 01:30 UTC on January 15, 2017. - * - * In JavaScript, one can convert a Date object to this format using the - * standard - * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - * method. In Python, a standard `datetime.datetime` object can be converted - * to this format using - * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - * the Joda Time's [`ISODateTimeFormat.dateTime()`](https://cloud.google.com - * http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D - * ) to obtain a formatter capable of generating timestamps in this format. - * - * @property {number} seconds - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * - * @property {number} nanos - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * - * @typedef Timestamp - * @memberof google.protobuf - * @see [google.protobuf.Timestamp definition in proto format]{@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto} - */ -const Timestamp = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js b/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js deleted file mode 100644 index 432ab6bb928a..000000000000 --- a/packages/google-devtools-cloudbuild/src/v1/doc/google/rpc/doc_status.js +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Note: this file is purely for documentation. Any contents are not expected -// to be loaded as the JS file. - -/** - * The `Status` type defines a logical error model that is suitable for - * different programming environments, including REST APIs and RPC APIs. It is - * used by [gRPC](https://github.com/grpc). The error model is designed to be: - * - * - Simple to use and understand for most users - * - Flexible enough to meet unexpected needs - * - * # Overview - * - * The `Status` message contains three pieces of data: error code, error - * message, and error details. The error code should be an enum value of - * google.rpc.Code, but it may accept additional error codes - * if needed. The error message should be a developer-facing English message - * that helps developers *understand* and *resolve* the error. If a localized - * user-facing error message is needed, put the localized message in the error - * details or localize it in the client. The optional error details may contain - * arbitrary information about the error. There is a predefined set of error - * detail types in the package `google.rpc` that can be used for common error - * conditions. - * - * # Language mapping - * - * The `Status` message is the logical representation of the error model, but it - * is not necessarily the actual wire format. When the `Status` message is - * exposed in different client libraries and different wire protocols, it can be - * mapped differently. For example, it will likely be mapped to some exceptions - * in Java, but more likely mapped to some error codes in C. - * - * # Other uses - * - * The error model and the `Status` message can be used in a variety of - * environments, either with or without APIs, to provide a - * consistent developer experience across different environments. - * - * Example uses of this error model include: - * - * - Partial errors. If a service needs to return partial errors to the client, - * it may embed the `Status` in the normal response to indicate the partial - * errors. - * - * - Workflow errors. A typical workflow has multiple steps. Each step may - * have a `Status` message for error reporting. - * - * - Batch operations. If a client uses batch request and batch response, the - * `Status` message should be used directly inside batch response, one for - * each error sub-response. - * - * - Asynchronous operations. If an API call embeds asynchronous operation - * results in its response, the status of those operations should be - * represented directly using the `Status` message. - * - * - Logging. If some API errors are stored in logs, the message `Status` could - * be used directly after any stripping needed for security/privacy reasons. - * - * @property {number} code - * The status code, which should be an enum value of - * google.rpc.Code. - * - * @property {string} message - * A developer-facing error message, which should be in English. Any - * user-facing error message should be localized and sent in the - * google.rpc.Status.details field, or localized - * by the client. - * - * @property {Object[]} details - * A list of messages that carry the error details. There is a common set of - * message types for APIs to use. - * - * This object should have the same structure as [Any]{@link google.protobuf.Any} - * - * @typedef Status - * @memberof google.rpc - * @see [google.rpc.Status definition in proto format]{@link https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto} - */ -const Status = { - // This is for documentation. Actual contents will be loaded by gRPC. -}; \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/src/browser.js b/packages/google-devtools-cloudbuild/src/v1/index.ts similarity index 69% rename from packages/google-devtools-cloudbuild/src/browser.js rename to packages/google-devtools-cloudbuild/src/v1/index.ts index ddbcd7ecb9ad..f95068dcfe8f 100644 --- a/packages/google-devtools-cloudbuild/src/browser.js +++ b/packages/google-devtools-cloudbuild/src/v1/index.ts @@ -11,11 +11,9 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** 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'; - -// Set a flag that we are running in a browser bundle. -global.isBrowser = true; - -// Re-export all exports from ./index.js. -module.exports = require('./index'); +export {CloudBuildClient} from './cloud_build_client'; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 891350614ca0..bd84d9a13f0a 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,26 +1,19 @@ { - "updateTime": "2019-10-17T02:06:50.108570Z", + "updateTime": "2019-10-31T17:56:42.279918Z", "sources": [ - { - "generator": { - "name": "artman", - "version": "0.39.0", - "dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c6e62c7e5e61e6dae7fdc3bc3de81f60e6a9445c", - "internalRef": "274798600" + "sha": "b21f96290006525e039b9bd1acddeeae407ae1ff", + "internalRef": "277750396" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.5.2" + "version": "2019.10.17" } } ], @@ -30,9 +23,8 @@ "source": "googleapis", "apiName": "cloudbuild", "apiVersion": "v1", - "language": "nodejs", - "generator": "gapic", - "config": "google/devtools/cloudbuild/artman_cloudbuild.yaml" + "language": "typescript", + "generator": "gapic-generator-typescript" } } ] diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 61ea6b62bfe7..0d53e5479202 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -21,18 +21,21 @@ logging.basicConfig(level=logging.DEBUG) # run the gapic generator -gapic = gcp.GAPICGenerator() +gapic = gcp.GAPICMicrogenerator() versions = ['v1'] for version in versions: - library = gapic.node_library( - 'cloudbuild', - config_path='/google/devtools/cloudbuild/artman_cloudbuild.yaml', - version=version) - s.copy(library, excludes=['README.md', 'package.json']) + library = gapic.typescript_library( + 'cloudbuild', + generator_args={ + "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json" + }, + proto_path='/google/devtools/cloudbuild/v1', + version=version) +s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library() +templates = common_templates.node_library(source_location='build/src') s.copy(templates, excludes=[]) # Node.js specific cleanup diff --git a/packages/google-devtools-cloudbuild/system-test/system.js b/packages/google-devtools-cloudbuild/system-test/system.js index c682da709de1..911f6f78034f 100644 --- a/packages/google-devtools-cloudbuild/system-test/system.js +++ b/packages/google-devtools-cloudbuild/system-test/system.js @@ -1,17 +1,17 @@ -/** - * Copyright 2019, Google, LLC. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// 'use strict'; @@ -25,6 +25,6 @@ describe('Integration Tests', () => { const [result] = await cb.listBuildTriggers({ projectId: PROJECT_ID, }); - assert.ok(result.triggers.length > 0); + assert.ok(result.length > 0); }); }); diff --git a/packages/google-devtools-cloudbuild/test/.eslintrc.yml b/packages/google-devtools-cloudbuild/test/.eslintrc.yml deleted file mode 100644 index e28757c0a59b..000000000000 --- a/packages/google-devtools-cloudbuild/test/.eslintrc.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -env: - mocha: true \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts new file mode 100644 index 000000000000..fb711fa780f6 --- /dev/null +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -0,0 +1,780 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 assert from 'assert'; + +import * as protosTypes from '../protos/protos'; + +const cloudbuildModule = require('../src'); + + +const FAKE_STATUS_CODE = 1; +class FakeError { + name: string; + message: string; + code: number; + constructor(n: number) { + this.name = 'fakeName'; + this.message = 'fake message'; + this.code = n; + } +} +const error = new FakeError(FAKE_STATUS_CODE); +export interface Callback { + (err: FakeError|null, response?: {}|null): void; +} + +export class Operation { + constructor() {} + promise() {} +} + +function mockSimpleGrpcMethod( + expectedRequest: {}, response: {}|null, error: FakeError|null) { + return (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, expectedRequest); + if (error) { + callback(error); + } else if (response) { + callback(null, response); + } else { + callback(null); + } + }; +} +function mockLongRunningGrpcMethod( + expectedRequest: {}, response: {}|null, error?: {}|null) { + return (request: {}) => { + assert.deepStrictEqual(request, expectedRequest); + const mockOperation = { + promise() { + return new Promise((resolve, reject) => { + if (error) { + reject(error); + } else { + resolve([response]); + } + }); + } + }; + return Promise.resolve([mockOperation]); + }; +} +describe('CloudBuildClient', () => { + it('has servicePath', () => { + const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; + assert(servicePath); + }); + it('has apiEndpoint', () => { + const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; + assert(apiEndpoint); + }); + it('has port', () => { + const port = cloudbuildModule.v1.CloudBuildClient.port; + assert(port); + assert(typeof port === 'number'); + }); + it('should create a client with no option', () => { + const client = new cloudbuildModule.v1.CloudBuildClient(); + assert(client); + }); + it('should create a client with gRPC option', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + fallback: true, + }); + assert(client); + }); + describe('getBuild', () => { + it('invokes getBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBuild = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.getBuild(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBuild = + mockSimpleGrpcMethod(request, null, error); + client.getBuild(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('cancelBuild', () => { + it('invokes cancelBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.cancelBuild = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.cancelBuild(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes cancelBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.cancelBuild = + mockSimpleGrpcMethod(request, null, error); + client.cancelBuild(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createBuildTrigger', () => { + it('invokes createBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .ICreateBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createBuildTrigger = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.createBuildTrigger(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .ICreateBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createBuildTrigger = + mockSimpleGrpcMethod(request, null, error); + client.createBuildTrigger(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getBuildTrigger', () => { + it('invokes getBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IGetBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBuildTrigger = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.getBuildTrigger(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IGetBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getBuildTrigger = + mockSimpleGrpcMethod(request, null, error); + client.getBuildTrigger(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteBuildTrigger', () => { + it('invokes deleteBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IDeleteBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteBuildTrigger = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.deleteBuildTrigger(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IDeleteBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteBuildTrigger = + mockSimpleGrpcMethod(request, null, error); + client.deleteBuildTrigger(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateBuildTrigger', () => { + it('invokes updateBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IUpdateBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateBuildTrigger = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.updateBuildTrigger(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IUpdateBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateBuildTrigger = + mockSimpleGrpcMethod(request, null, error); + client.updateBuildTrigger(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createWorkerPool', () => { + it('invokes createWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .ICreateWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createWorkerPool = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.createWorkerPool(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes createWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .ICreateWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createWorkerPool = + mockSimpleGrpcMethod(request, null, error); + client.createWorkerPool(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('getWorkerPool', () => { + it('invokes getWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getWorkerPool = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.getWorkerPool(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes getWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.getWorkerPool = + mockSimpleGrpcMethod(request, null, error); + client.getWorkerPool(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('deleteWorkerPool', () => { + it('invokes deleteWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IDeleteWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteWorkerPool = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.deleteWorkerPool(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes deleteWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IDeleteWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.deleteWorkerPool = + mockSimpleGrpcMethod(request, null, error); + client.deleteWorkerPool(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('updateWorkerPool', () => { + it('invokes updateWorkerPool without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IUpdateWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateWorkerPool = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.updateWorkerPool(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes updateWorkerPool with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IUpdateWorkerPoolRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.updateWorkerPool = + mockSimpleGrpcMethod(request, null, error); + client.updateWorkerPool(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('listWorkerPools', () => { + it('invokes listWorkerPools without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IListWorkerPoolsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listWorkerPools = + mockSimpleGrpcMethod(request, expectedResponse, null); + client.listWorkerPools(request, (err: {}, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + + it('invokes listWorkerPools with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IListWorkerPoolsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.listWorkerPools = + mockSimpleGrpcMethod(request, null, error); + client.listWorkerPools(request, (err: FakeError, response: {}) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + assert(typeof response === 'undefined'); + done(); + }); + }); + }); + describe('createBuild', () => { + it('invokes createBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createBuild = + mockLongRunningGrpcMethod(request, expectedResponse); + client.createBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes createBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.createBuild = + mockLongRunningGrpcMethod(request, null, error); + client.createBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('retryBuild', () => { + it('invokes retryBuild without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.retryBuild = + mockLongRunningGrpcMethod(request, expectedResponse); + client.retryBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes retryBuild with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.retryBuild = + mockLongRunningGrpcMethod(request, null, error); + client.retryBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('runBuildTrigger', () => { + it('invokes runBuildTrigger without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IRunBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.runBuildTrigger = + mockLongRunningGrpcMethod(request, expectedResponse); + client.runBuildTrigger(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); + }); + + it('invokes runBuildTrigger with error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IRunBuildTriggerRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock gRPC layer + client._innerApiCalls.runBuildTrigger = + mockLongRunningGrpcMethod(request, null, error); + client.runBuildTrigger(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); + }); + }); + describe('listBuilds', () => { + it('invokes listBuilds without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listBuilds = + (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listBuilds(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); + describe('listBuildTriggers', () => { + it('invokes listBuildTriggers without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1 + .IListBuildTriggersRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listBuildTriggers = + (actualRequest: {}, options: {}, callback: Callback) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + client.listBuildTriggers(request, (err: FakeError, response: {}) => { + assert.ifError(err); + assert.deepStrictEqual(response, expectedResponse); + done(); + }); + }); + }); +}); diff --git a/packages/google-devtools-cloudbuild/test/gapic-v1.js b/packages/google-devtools-cloudbuild/test/gapic-v1.js deleted file mode 100644 index 70bd26c0450c..000000000000 --- a/packages/google-devtools-cloudbuild/test/gapic-v1.js +++ /dev/null @@ -1,1084 +0,0 @@ -// Copyright 2019 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -'use strict'; - -const assert = require('assert'); - -const cloudbuildModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -const error = new Error(); -error.code = FAKE_STATUS_CODE; - -describe('CloudBuildClient', () => { - it('has servicePath', () => { - const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = cloudbuildModule.v1.CloudBuildClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no options', () => { - const client = new cloudbuildModule.v1.CloudBuildClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new cloudbuildModule.v1.CloudBuildClient({fallback: true}); - assert(client); - }); - - describe('createBuild', () => { - it('invokes createBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const build = {}; - const request = { - projectId: projectId, - build: build, - }; - - // Mock response - const name = 'name3373707'; - const done_ = true; - const expectedResponse = { - name: name, - done: done_, - }; - - // Mock Grpc layer - client._innerApiCalls.createBuild = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createBuild(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const build = {}; - const request = { - projectId: projectId, - build: build, - }; - - // Mock Grpc layer - client._innerApiCalls.createBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createBuild(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getBuild', () => { - it('invokes getBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock response - const id2 = 'id23227150'; - const projectId2 = 'projectId2939242356'; - const statusDetail = 'statusDetail2089931070'; - const logsBucket = 'logsBucket1565363834'; - const buildTriggerId = 'buildTriggerId1105559411'; - const logUrl = 'logUrl342054388'; - const expectedResponse = { - id: id2, - projectId: projectId2, - statusDetail: statusDetail, - logsBucket: logsBucket, - buildTriggerId: buildTriggerId, - logUrl: logUrl, - }; - - // Mock Grpc layer - client._innerApiCalls.getBuild = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getBuild(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock Grpc layer - client._innerApiCalls.getBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getBuild(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listBuilds', () => { - it('invokes listBuilds without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const request = { - projectId: projectId, - }; - - // Mock response - const nextPageToken = ''; - const buildsElement = {}; - const builds = [buildsElement]; - const expectedResponse = { - nextPageToken: nextPageToken, - builds: builds, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuilds = (actualRequest, options, callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse.builds); - }; - - client.listBuilds(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse.builds); - done(); - }); - }); - - it('invokes listBuilds with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const request = { - projectId: projectId, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuilds = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listBuilds(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('cancelBuild', () => { - it('invokes cancelBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock response - const id2 = 'id23227150'; - const projectId2 = 'projectId2939242356'; - const statusDetail = 'statusDetail2089931070'; - const logsBucket = 'logsBucket1565363834'; - const buildTriggerId = 'buildTriggerId1105559411'; - const logUrl = 'logUrl342054388'; - const expectedResponse = { - id: id2, - projectId: projectId2, - statusDetail: statusDetail, - logsBucket: logsBucket, - buildTriggerId: buildTriggerId, - logUrl: logUrl, - }; - - // Mock Grpc layer - client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.cancelBuild(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes cancelBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock Grpc layer - client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.cancelBuild(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createBuildTrigger', () => { - it('invokes createBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const trigger = {}; - const request = { - projectId: projectId, - trigger: trigger, - }; - - // Mock response - const id = 'id3355'; - const description = 'description-1724546052'; - const name = 'name3373707'; - const filename = 'filename-734768633'; - const disabled = true; - const expectedResponse = { - id: id, - description: description, - name: name, - filename: filename, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createBuildTrigger(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const trigger = {}; - const request = { - projectId: projectId, - trigger: trigger, - }; - - // Mock Grpc layer - client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createBuildTrigger(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getBuildTrigger', () => { - it('invokes getBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const request = { - projectId: projectId, - triggerId: triggerId, - }; - - // Mock response - const id = 'id3355'; - const description = 'description-1724546052'; - const name = 'name3373707'; - const filename = 'filename-734768633'; - const disabled = true; - const expectedResponse = { - id: id, - description: description, - name: name, - filename: filename, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getBuildTrigger(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const request = { - projectId: projectId, - triggerId: triggerId, - }; - - // Mock Grpc layer - client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getBuildTrigger(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listBuildTriggers', () => { - it('invokes listBuildTriggers without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const request = { - projectId: projectId, - }; - - // Mock response - const nextPageToken = 'nextPageToken-1530815211'; - const expectedResponse = { - nextPageToken: nextPageToken, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuildTriggers = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.listBuildTriggers(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listBuildTriggers with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const request = { - projectId: projectId, - }; - - // Mock Grpc layer - client._innerApiCalls.listBuildTriggers = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listBuildTriggers(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteBuildTrigger', () => { - it('invokes deleteBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const request = { - projectId: projectId, - triggerId: triggerId, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod(request); - - client.deleteBuildTrigger(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const request = { - projectId: projectId, - triggerId: triggerId, - }; - - // Mock Grpc layer - client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteBuildTrigger(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('updateBuildTrigger', () => { - it('invokes updateBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const trigger = {}; - const request = { - projectId: projectId, - triggerId: triggerId, - trigger: trigger, - }; - - // Mock response - const id = 'id3355'; - const description = 'description-1724546052'; - const name = 'name3373707'; - const filename = 'filename-734768633'; - const disabled = true; - const expectedResponse = { - id: id, - description: description, - name: name, - filename: filename, - disabled: disabled, - }; - - // Mock Grpc layer - client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateBuildTrigger(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const trigger = {}; - const request = { - projectId: projectId, - triggerId: triggerId, - trigger: trigger, - }; - - // Mock Grpc layer - client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateBuildTrigger(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('runBuildTrigger', () => { - it('invokes runBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const source = {}; - const request = { - projectId: projectId, - triggerId: triggerId, - source: source, - }; - - // Mock response - const name = 'name3373707'; - const done_ = true; - const expectedResponse = { - name: name, - done: done_, - }; - - // Mock Grpc layer - client._innerApiCalls.runBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.runBuildTrigger(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes runBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const triggerId = 'triggerId1363517698'; - const source = {}; - const request = { - projectId: projectId, - triggerId: triggerId, - source: source, - }; - - // Mock Grpc layer - client._innerApiCalls.runBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.runBuildTrigger(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('retryBuild', () => { - it('invokes retryBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock response - const name = 'name3373707'; - const done_ = true; - const expectedResponse = { - name: name, - done: done_, - }; - - // Mock Grpc layer - client._innerApiCalls.retryBuild = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.retryBuild(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes retryBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const projectId = 'projectId-1969970175'; - const id = 'id3355'; - const request = { - projectId: projectId, - id: id, - }; - - // Mock Grpc layer - client._innerApiCalls.retryBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.retryBuild(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('createWorkerPool', () => { - it('invokes createWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const name = 'name3373707'; - const projectId = 'projectId-1969970175'; - const serviceAccountEmail = 'serviceAccountEmail-1300473088'; - const workerCount = 372044046; - const expectedResponse = { - name: name, - projectId: projectId, - serviceAccountEmail: serviceAccountEmail, - workerCount: workerCount, - }; - - // Mock Grpc layer - client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.createWorkerPool(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.createWorkerPool(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('getWorkerPool', () => { - it('invokes getWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const name = 'name3373707'; - const projectId = 'projectId-1969970175'; - const serviceAccountEmail = 'serviceAccountEmail-1300473088'; - const workerCount = 372044046; - const expectedResponse = { - name: name, - projectId: projectId, - serviceAccountEmail: serviceAccountEmail, - workerCount: workerCount, - }; - - // Mock Grpc layer - client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.getWorkerPool(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.getWorkerPool(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('deleteWorkerPool', () => { - it('invokes deleteWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod(request); - - client.deleteWorkerPool(request, err => { - assert.ifError(err); - done(); - }); - }); - - it('invokes deleteWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.deleteWorkerPool(request, err => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - - describe('updateWorkerPool', () => { - it('invokes updateWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const name = 'name3373707'; - const projectId = 'projectId-1969970175'; - const serviceAccountEmail = 'serviceAccountEmail-1300473088'; - const workerCount = 372044046; - const expectedResponse = { - name: name, - projectId: projectId, - serviceAccountEmail: serviceAccountEmail, - workerCount: workerCount, - }; - - // Mock Grpc layer - client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.updateWorkerPool(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.updateWorkerPool(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - - describe('listWorkerPools', () => { - it('invokes listWorkerPools without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock response - const expectedResponse = {}; - - // Mock Grpc layer - client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( - request, - expectedResponse - ); - - client.listWorkerPools(request, (err, response) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listWorkerPools with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - - // Mock request - const request = {}; - - // Mock Grpc layer - client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( - request, - null, - error - ); - - client.listWorkerPools(request, (err, response) => { - assert(err instanceof Error); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); -}); - -function mockSimpleGrpcMethod(expectedRequest, response, error) { - return function(actualRequest, options, callback) { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} diff --git a/packages/google-devtools-cloudbuild/tsconfig.json b/packages/google-devtools-cloudbuild/tsconfig.json new file mode 100644 index 000000000000..653c21079782 --- /dev/null +++ b/packages/google-devtools-cloudbuild/tsconfig.json @@ -0,0 +1,18 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2016", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts" + ] +} diff --git a/packages/google-devtools-cloudbuild/tslint.json b/packages/google-devtools-cloudbuild/tslint.json new file mode 100644 index 000000000000..b3bfaf59207d --- /dev/null +++ b/packages/google-devtools-cloudbuild/tslint.json @@ -0,0 +1,6 @@ +{ + "extends": "gts/tslint.json", + "rules": { + "ban-ts-ignore": false + } +} From b99fed377bc5115f72e2e482c6e9df42a6c84449 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2019 11:51:38 -0700 Subject: [PATCH 007/223] chore: release 1.0.0 (#3) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 10 ++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/CHANGELOG.md diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md new file mode 100644 index 000000000000..6a2c1f55f702 --- /dev/null +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 1.0.0 (2019-10-31) + + +### Features + +* initial release of cloud build library ([#2](https://www.github.com/googleapis/nodejs-cloudbuild/issues/2)) ([b3dbed2](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b3dbed28a63e88f09bcaf7bfa2984582ef058fb6)) +* **docs:** add listBuildTriggers sample to README ([#5](https://www.github.com/googleapis/nodejs-cloudbuild/issues/5)) ([adcdb63](https://www.github.com/googleapis/nodejs-cloudbuild/commit/adcdb632244ddf18c1b57a1b0bdef1dcef3ae14b)) +* moves library to TypeScript code generation ([#10](https://www.github.com/googleapis/nodejs-cloudbuild/issues/10)) ([871fa08](https://www.github.com/googleapis/nodejs-cloudbuild/commit/871fa0814d9483fdfa0081fad409c535ce25cac1)) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 9c0077142fa4..cf9496b8eb57 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "0.1.0", + "version": "1.0.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index f595a78f013c..84c56c3c386a 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^0.1.0" + "@google-cloud/cloudbuild": "^1.0.0" }, "devDependencies": { "c8": "^6.0.1", From fd011e70255df1734022d9cf7959fb16af369893 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 1 Nov 2019 22:59:07 +0200 Subject: [PATCH 008/223] chore(deps): update dependency typescript to ~3.6.0 (#13) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index cf9496b8eb57..221ded2abed1 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -37,7 +37,7 @@ "mocha": "^6.1.4", "gts": "^0.9.0", "prettier": "^1.17.0", - "typescript": "~3.5.3" + "typescript": "~3.6.0" }, "scripts": { "predocs": "npm run compile", From 16c0e185034484c8a3c019af2c5459f57f20978c Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 5 Nov 2019 12:19:21 -0800 Subject: [PATCH 009/223] chore(deps): update gts dependency (#15) --- .../google-devtools-cloudbuild/package.json | 4 +- .../src/v1/cloud_build_client.ts | 1871 ++++++++++------- .../google-devtools-cloudbuild/synth.metadata | 6 +- .../test/gapic-cloud_build-v1.ts | 484 +++-- .../google-devtools-cloudbuild/tslint.json | 5 +- 5 files changed, 1425 insertions(+), 945 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 221ded2abed1..82cf1b3d2bc2 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -24,18 +24,18 @@ "Cloud Build API" ], "devDependencies": { - "c8": "^6.0.0", "@types/mocha": "^5.2.5", + "c8": "^6.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^10.0.0", "eslint-plugin-prettier": "^3.0.1", + "gts": "^1.1.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "linkinator": "^1.4.0", "mocha": "^6.1.4", - "gts": "^0.9.0", "prettier": "^1.17.0", "typescript": "~3.6.0" }, diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 11fa174a2001..8ab74f0aaf95 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -24,9 +24,10 @@ import * as gapicConfig from './cloud_build_client_config.json'; const version = require('../../../package.json').version; -export interface ClientOptions extends gax.GrpcClientOptions, - gax.GoogleAuthOptions, - gax.ClientStubOptions { +export interface ClientOptions + extends gax.GrpcClientOptions, + gax.GoogleAuthOptions, + gax.ClientStubOptions { libName?: string; libVersion?: string; clientConfig?: gax.ClientConfig; @@ -41,41 +42,58 @@ interface Descriptors { } export interface Callback< - ResponseObject, NextRequestObject, RawResponseObject> { - (err: Error|null|undefined, value?: ResponseObject|null, - nextRequest?: NextRequestObject, rawResponse?: RawResponseObject): void; + ResponseObject, + NextRequestObject, + RawResponseObject +> { + ( + err: Error | null | undefined, + value?: ResponseObject | null, + nextRequest?: NextRequestObject, + rawResponse?: RawResponseObject + ): void; } export interface Operation extends gax.Operation { promise(): Promise< - [ResultType, MetadataType, protosTypes.google.longrunning.IOperation]>; + [ResultType, MetadataType, protosTypes.google.longrunning.IOperation] + >; } - export interface PaginationCallback< - RequestObject, ResponseObject, ResponseType> { - (err: Error|null, values?: ResponseType[], nextPageRequest?: RequestObject, - rawResponse?: ResponseObject): void; + RequestObject, + ResponseObject, + ResponseType +> { + ( + err: Error | null, + values?: ResponseType[], + nextPageRequest?: RequestObject, + rawResponse?: ResponseObject + ): void; } export interface PaginationResponse< - RequestObject, ResponseObject, ResponseType> { + RequestObject, + ResponseObject, + ResponseType +> { values?: ResponseType[]; nextPageRequest?: RequestObject; rawResponse?: ResponseObject; } export class CloudBuildClient { - /* - Creates and manages builds on Google Cloud Platform. - - The main concept used by this API is a `Build`, which describes the location - of the source to build, how to build the source, and where to store the - built artifacts, if any. - - A user can list previously-requested builds or get builds by their ID to - determine the status of the build. - */ + /** + * Creates and manages builds on Google Cloud Platform. + * + * The main concept used by this API is a `Build`, which describes the location + * of the source to build, how to build the source, and where to store the + * built artifacts, if any. + * + * A user can list previously-requested builds or get builds by their ID to + * determine the status of the build. + */ private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; auth: gax.GoogleAuth; @@ -113,10 +131,12 @@ export class CloudBuildClient { constructor(opts?: ClientOptions) { // Ensure that options include the service address and port. const staticMembers = this.constructor as typeof CloudBuildClient; - const servicePath = opts && opts.servicePath ? - opts.servicePath : - ((opts && opts.apiEndpoint) ? opts.apiEndpoint : - staticMembers.servicePath); + const servicePath = + opts && opts.servicePath + ? opts.servicePath + : opts && opts.apiEndpoint + ? opts.apiEndpoint + : staticMembers.servicePath; const port = opts && opts.port ? opts.port : staticMembers.port; if (!opts) { @@ -126,7 +146,7 @@ export class CloudBuildClient { opts.port = opts.port || port; opts.clientConfig = opts.clientConfig || {}; - const isBrowser = (typeof window !== 'undefined'); + const isBrowser = typeof window !== 'undefined'; if (isBrowser) { opts.fallback = true; } @@ -141,13 +161,15 @@ export class CloudBuildClient { const gaxGrpc = new gaxModule.GrpcClient(opts); // Save the auth object to the client, for use by other methods. - this.auth = (gaxGrpc.auth as gax.GoogleAuth); + this.auth = gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. const clientHeader = [ - `gl-node/${process.version}`, `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gaxModule.version}`, `gapic/${version}`, - `gl-web/${gaxModule.version}` + `gl-node/${process.version}`, + `grpc/${gaxGrpc.grpcVersion}`, + `gax/${gaxModule.version}`, + `gapic/${version}`, + `gl-web/${gaxModule.version}`, ]; if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -156,66 +178,89 @@ export class CloudBuildClient { // For Node.js, pass the path to JSON proto file. // For browsers, pass the JSON content. - const nodejsProtoPath = - path.join(__dirname, '..', '..', 'protos', 'protos.json'); + const nodejsProtoPath = path.join( + __dirname, + '..', + '..', + 'protos', + 'protos.json' + ); const protos = gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath); + opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + ); // 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 = { - listBuilds: - new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'builds'), - listBuildTriggers: - new gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'triggers') + listBuilds: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'builds' + ), + listBuildTriggers: new gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'triggers' + ), }; // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - const protoFilesRoot = opts.fallback ? - gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) : - gaxModule.protobuf.loadSync(nodejsProtoPath); - - const operationsClient = - gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined - }) - .operationsClient(opts); - const createBuildResponse = - protoFilesRoot.lookup('Build') as gax.protobuf.Type; - const createBuildMetadata = - protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; - const retryBuildResponse = - protoFilesRoot.lookup('Build') as gax.protobuf.Type; - const retryBuildMetadata = - protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; - const runBuildTriggerResponse = - protoFilesRoot.lookup('Build') as gax.protobuf.Type; - const runBuildTriggerMetadata = - protoFilesRoot.lookup('BuildOperationMetadata') as gax.protobuf.Type; + const protoFilesRoot = opts.fallback + ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) + : gaxModule.protobuf.loadSync(nodejsProtoPath); + + const operationsClient = gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const createBuildResponse = protoFilesRoot.lookup( + 'Build' + ) as gax.protobuf.Type; + const createBuildMetadata = protoFilesRoot.lookup( + 'BuildOperationMetadata' + ) as gax.protobuf.Type; + const retryBuildResponse = protoFilesRoot.lookup( + 'Build' + ) as gax.protobuf.Type; + const retryBuildMetadata = protoFilesRoot.lookup( + 'BuildOperationMetadata' + ) as gax.protobuf.Type; + const runBuildTriggerResponse = protoFilesRoot.lookup( + 'Build' + ) as gax.protobuf.Type; + const runBuildTriggerMetadata = protoFilesRoot.lookup( + 'BuildOperationMetadata' + ) as gax.protobuf.Type; this._descriptors.longrunning = { createBuild: new gaxModule.LongrunningDescriptor( - operationsClient, - createBuildResponse.decode.bind(createBuildResponse), - createBuildMetadata.decode.bind(createBuildMetadata)), + operationsClient, + createBuildResponse.decode.bind(createBuildResponse), + createBuildMetadata.decode.bind(createBuildMetadata) + ), retryBuild: new gaxModule.LongrunningDescriptor( - operationsClient, retryBuildResponse.decode.bind(retryBuildResponse), - retryBuildMetadata.decode.bind(retryBuildMetadata)), + operationsClient, + retryBuildResponse.decode.bind(retryBuildResponse), + retryBuildMetadata.decode.bind(retryBuildMetadata) + ), runBuildTrigger: new gaxModule.LongrunningDescriptor( - operationsClient, - runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), - runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata)) + operationsClient, + runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), + runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata) + ), }; // Put together the default options sent with requests. const defaults = gaxGrpc.constructSettings( - 'google.devtools.cloudbuild.v1.CloudBuild', - gapicConfig as gax.ClientConfig, opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')}); + 'google.devtools.cloudbuild.v1.CloudBuild', + 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 @@ -224,38 +269,52 @@ export class CloudBuildClient { // Put together the "service stub" for // google.showcase.v1alpha2.Echo. - const cloudBuildStub = - gaxGrpc.createStub( - opts.fallback ? - // @ts-ignore Do not check types for loaded protos - protos.lookupService( - 'google.devtools.cloudbuild.v1.CloudBuild') : - // @ts-ignore Do not check types for loaded protos - protos.google.devtools.cloudbuild.v1.CloudBuild, - opts) as Promise<{[method: string]: Function}>; + const cloudBuildStub = gaxGrpc.createStub( + opts.fallback + ? (protos as protobuf.Root).lookupService( + 'google.devtools.cloudbuild.v1.CloudBuild' + ) + : // tslint:disable-next-line no-any + (protos as any).google.devtools.cloudbuild.v1.CloudBuild, + opts + ) as Promise<{[method: string]: Function}>; const cloudBuildStubMethods = [ - 'createBuild', 'getBuild', 'listBuilds', 'cancelBuild', 'retryBuild', - 'createBuildTrigger', 'getBuildTrigger', 'listBuildTriggers', - 'deleteBuildTrigger', 'updateBuildTrigger', 'runBuildTrigger', - 'createWorkerPool', 'getWorkerPool', 'deleteWorkerPool', - 'updateWorkerPool', 'listWorkerPools' + 'createBuild', + 'getBuild', + 'listBuilds', + 'cancelBuild', + 'retryBuild', + 'createBuildTrigger', + 'getBuildTrigger', + 'listBuildTriggers', + 'deleteBuildTrigger', + 'updateBuildTrigger', + 'runBuildTrigger', + 'createWorkerPool', + 'getWorkerPool', + 'deleteWorkerPool', + 'updateWorkerPool', + 'listWorkerPools', ]; for (const methodName of cloudBuildStubMethods) { const innerCallPromise = cloudBuildStub.then( - (stub: {[method: string]: Function}) => (...args: Array<{}>) => { - return stub[methodName].apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); + (stub: {[method: string]: Function}) => (...args: Array<{}>) => { + return stub[methodName].apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); this._innerApiCalls[methodName] = gax.createApiCall( - innerCallPromise, defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName]); + innerCallPromise, + defaults[methodName], + this._descriptors.page[methodName] || + this._descriptors.stream[methodName] || + this._descriptors.longrunning[methodName] + ); } } /** @@ -294,8 +353,9 @@ export class CloudBuildClient { */ getProjectId(): Promise; getProjectId(callback: Callback): void; - getProjectId(callback?: Callback): - Promise|void { + getProjectId( + callback?: Callback + ): Promise | void { if (callback) { this.auth.getProjectId(callback); return; @@ -306,42 +366,63 @@ export class CloudBuildClient { // ------------------- // -- Service calls -- // ------------------- - /* - Returns information about a previously requested build. - - The `Build` that is returned includes its status (such as `SUCCESS`, - `FAILURE`, or `WORKING`), and timing information. - */ + /** + * Returns information about a previously requested build. + * + * The `Build` that is returned includes its status (such as `SUCCESS`, + * `FAILURE`, or `WORKING`), and timing information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + {} | undefined + ] + >; getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + {} | undefined + > + ): void; getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, - {}|undefined>, - callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest|undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -353,42 +434,60 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getBuild(request, options, callback); } - /* - Cancels a build in progress. - */ + /** + * Cancels a build in progress. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest|undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + {} | undefined + ] + >; cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + {} | undefined + > + ): void; cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest|undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -400,49 +499,70 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.cancelBuild(request, options, callback); } - /* - Creates a new `BuildTrigger`. - - This API is experimental. - */ + /** + * Creates a new `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project for which to configure automatic builds. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` to create. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | undefined, + {} | undefined + ] + >; createBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | undefined, + {} | undefined + > + ): void; createBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -454,49 +574,70 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createBuildTrigger(request, options, callback); } - /* - Returns information about a `BuildTrigger`. - - This API is experimental. - */ + /** + * Returns information about a `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to get. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | undefined, + {} | undefined + ] + >; getBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | undefined, + {} | undefined + > + ): void; getBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -508,49 +649,70 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getBuildTrigger(request, options, callback); } - /* - Deletes a `BuildTrigger` by its project ID and trigger ID. - - This API is experimental. - */ + /** + * Deletes a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to delete. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ deleteBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + + + | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | undefined, + {} | undefined + ] + >; deleteBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | undefined, + {} | undefined + > + ): void; deleteBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + + + | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -562,49 +724,72 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.deleteBuildTrigger(request, options, callback); } - /* - Updates a `BuildTrigger` by its project ID and trigger ID. - - This API is experimental. - */ + /** + * Updates a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to update. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` to update. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | undefined, + {} | undefined + ] + >; updateBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | undefined, + {} | undefined + > + ): void; updateBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| - undefined, - {}|undefined>, - callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + + + | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -616,49 +801,70 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.updateBuildTrigger(request, options, callback); } - /* - Creates a `WorkerPool` to run the builds, and returns the new worker pool. - - This API is experimental. - */ + /** + * Creates a `WorkerPool` to run the builds, and returns the new worker pool. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * ID of the parent project. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * `WorkerPool` resource to create. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | undefined, + {} | undefined + ] + >; createWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | undefined, + {} | undefined + > + ): void; createWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -670,46 +876,69 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createWorkerPool(request, options, callback); } - /* - Returns information about a `WorkerPool`. - - This API is experimental. - */ + /** + * Returns information about a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | undefined, + {} | undefined + ] + >; getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | undefined, + {} | undefined + > + ): void; getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -721,49 +950,69 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getWorkerPool(request, options, callback); } - /* - Deletes a `WorkerPool` by its project ID and WorkerPool name. - - This API is experimental. - */ + /** + * Deletes a `WorkerPool` by its project ID and WorkerPool name. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ deleteWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + + + | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | undefined, + {} | undefined + ] + >; deleteWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | undefined, + {} | undefined + > + ): void; deleteWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.protobuf.IEmpty, - protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.protobuf.IEmpty, + | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.protobuf.IEmpty, + + + | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -775,49 +1024,71 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.deleteWorkerPool(request, options, callback); } - /* - Update a `WorkerPool`. - - This API is experimental. - */ + /** + * Update a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * `WorkerPool` resource to update. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | undefined, + {} | undefined + ] + >; updateWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | undefined, + {} | undefined + > + ): void; updateWorkerPool( - request: - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| - undefined, - {}|undefined>, - callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, + + + | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -829,49 +1100,68 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.updateWorkerPool(request, options, callback); } - /* - List project's `WorkerPool`s. - - This API is experimental. - */ + /** + * List project's `WorkerPool`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * ID of the parent project. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listWorkerPools( - request: - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| - undefined, - {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + + + | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | undefined, + {} | undefined + ] + >; listWorkerPools( - request: - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| - undefined, - {}|undefined>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | undefined, + {} | undefined + > + ): void; listWorkerPools( - request: - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| - undefined, - {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| - undefined, - {}|undefined>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest| - undefined, - {}|undefined - ]>|void { + | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | undefined, + {} | undefined + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | undefined, + {} | undefined + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + + + | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -884,52 +1174,78 @@ export class CloudBuildClient { return this._innerApiCalls.listWorkerPools(request, options, callback); } - /* - Starts a build with the specified configuration. - - This method returns a long-running `Operation`, which includes the build - ID. Pass the build ID to `GetBuild` to determine the build status (such as - `SUCCESS` or `FAILURE`). - */ + /** + * Starts a build with the specified configuration. + * + * This method returns a long-running `Operation`, which includes the build + * ID. Pass the build ID to `GetBuild` to determine the build status (such as + * `SUCCESS` or `FAILURE`). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {google.devtools.cloudbuild.v1.Build} request.build + * Required. Build resource to create. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, - options?: gax.CallOptions): - Promise<[ - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + options?: gax.CallOptions + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, - options: gax.CallOptions, - callback: Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - void; + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, - optionsOrCallback?: gax.CallOptions|Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - Promise<[ - Operation< protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -941,74 +1257,100 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createBuild(request, options, callback); } - /* - Creates a new build based on the specified build. - - This method creates a new build using the original build request, which may - or may not result in an identical build. - - For triggered builds: - - * Triggered builds resolve to a precise revision; therefore a retry of a - triggered build will result in a build that uses the same revision. - - For non-triggered builds that specify `RepoSource`: - - * If the original build built from the tip of a branch, the retried build - will build from the tip of that branch, which may not be the same revision - as the original build. - * If the original build specified a commit sha or revision ID, the retried - build will use the identical source. - - For builds that specify `StorageSource`: - - * If the original build pulled source from Google Cloud Storage without - specifying the generation of the object, the new build will use the current - object, which may be different from the original build source. - * If the original build pulled source from Cloud Storage and specified the - generation of the object, the new build will attempt to use the same - object, which may or may not be available depending on the bucket's - lifecycle management settings. - */ + /** + * Creates a new build based on the specified build. + * + * This method creates a new build using the original build request, which may + * or may not result in an identical build. + * + * For triggered builds: + * + * * Triggered builds resolve to a precise revision; therefore a retry of a + * triggered build will result in a build that uses the same revision. + * + * For non-triggered builds that specify `RepoSource`: + * + * * If the original build built from the tip of a branch, the retried build + * will build from the tip of that branch, which may not be the same revision + * as the original build. + * * If the original build specified a commit sha or revision ID, the retried + * build will use the identical source. + * + * For builds that specify `StorageSource`: + * + * * If the original build pulled source from Google Cloud Storage without + * specifying the generation of the object, the new build will use the current + * object, which may be different from the original build source. + * * If the original build pulled source from Cloud Storage and specified the + * generation of the object, the new build will attempt to use the same + * object, which may or may not be available depending on the bucket's + * lifecycle management settings. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.id + * Required. Build ID of the original build. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options?: gax.CallOptions): - Promise<[ - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options?: gax.CallOptions + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options: gax.CallOptions, - callback: Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - void; + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, - optionsOrCallback?: gax.CallOptions|Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, - callback?: Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - Promise<[ - Operation< protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -1020,51 +1362,76 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.retryBuild(request, options, callback); } - /* - Runs a `BuildTrigger` at a particular source revision. - */ + /** + * Runs a `BuildTrigger` at a particular source revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.trigger_id + * Required. ID of the trigger. + * @param {google.devtools.cloudbuild.v1.RepoSource} request.source + * Required. Source to build against this trigger. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ runBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, - options?: gax.CallOptions): - Promise<[ - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + options?: gax.CallOptions + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; runBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, - options: gax.CallOptions, - callback: Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - void; + request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; runBuildTrigger( - request: - protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, - optionsOrCallback?: gax.CallOptions|Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1 - .IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined>): - Promise<[ - Operation< protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata>, - protosTypes.google.longrunning.IOperation|undefined, {}|undefined - ]>|void { + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + >, + callback?: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -1076,42 +1443,73 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.runBuildTrigger(request, options, callback); } - /* - Lists previously requested builds. - - Previously requested builds may still be in-progress, or may have finished - successfully or unsuccessfully. - */ + /** + * Lists previously requested builds. + * + * Previously requested builds may still be in-progress, or may have finished + * successfully or unsuccessfully. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {number} request.page_size + * Number of results to return in the list. + * @param {string} request.page_token + * Token to provide to skip to a particular spot in the list. + * @param {string} request.filter + * The raw filter text to constrain the results. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + ] + >; listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + > + ): void; listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest|null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse - ]>|void { + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { @@ -1123,51 +1521,70 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.listBuilds(request, options, callback); } - /* - Lists existing `BuildTrigger`s. - - This API is experimental. - */ + /** + * Lists existing `BuildTrigger`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project for which to list BuildTriggers. + * @param {number} request.page_size + * Number of results to return in the list. + * @param {string} request.page_token + * Token to provide to skip to a particular spot in the list. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse} in a single response. + * The second element is the next request object if the response + * indicates the next page exists, or null. The third element is + * an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listBuildTriggers( - request: - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| - null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse - ]>; + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + ] + >; listBuildTriggers( - request: - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| - null, - protosTypes.google.devtools.cloudbuild.v1 - .IListBuildTriggersResponse>): void; + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + > + ): void; listBuildTriggers( - request: - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - optionsOrCallback?: gax.CallOptions|Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| - null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse>, - callback?: Callback< + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| - null, - protosTypes.google.devtools.cloudbuild.v1 - .IListBuildTriggersResponse>): - Promise<[ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest| - null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse - ]>|void { + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + >, + callback?: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + > + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + ] + > | void { request = request || {}; let options: gax.CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index bd84d9a13f0a..9ddeea61d0d9 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-10-31T17:56:42.279918Z", + "updateTime": "2019-11-05T00:48:23.641691Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b21f96290006525e039b9bd1acddeeae407ae1ff", - "internalRef": "277750396" + "sha": "21262f41c4445d24bf441e2a5c250a4207348008", + "internalRef": "278486499" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index fb711fa780f6..2010a711768c 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -16,13 +16,10 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import * as assert from 'assert'; - import * as protosTypes from '../protos/protos'; - +import * as assert from 'assert'; const cloudbuildModule = require('../src'); - const FAKE_STATUS_CODE = 1; class FakeError { name: string; @@ -36,7 +33,7 @@ class FakeError { } const error = new FakeError(FAKE_STATUS_CODE); export interface Callback { - (err: FakeError|null, response?: {}|null): void; + (err: FakeError | null, response?: {} | null): void; } export class Operation { @@ -45,7 +42,10 @@ export class Operation { } function mockSimpleGrpcMethod( - expectedRequest: {}, response: {}|null, error: FakeError|null) { + expectedRequest: {}, + response: {} | null, + error: FakeError | null +) { return (actualRequest: {}, options: {}, callback: Callback) => { assert.deepStrictEqual(actualRequest, expectedRequest); if (error) { @@ -58,7 +58,10 @@ function mockSimpleGrpcMethod( }; } function mockLongRunningGrpcMethod( - expectedRequest: {}, response: {}|null, error?: {}|null) { + expectedRequest: {}, + response: {} | null, + error?: {} | null +) { return (request: {}) => { assert.deepStrictEqual(request, expectedRequest); const mockOperation = { @@ -70,7 +73,7 @@ function mockLongRunningGrpcMethod( resolve([response]); } }); - } + }, }; return Promise.resolve([mockOperation]); }; @@ -106,13 +109,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getBuild = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.getBuild = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.getBuild(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -126,13 +131,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getBuild = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getBuild = mockSimpleGrpcMethod( + request, + null, + error + ); client.getBuild(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -148,13 +155,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.cancelBuild = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.cancelBuild(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -168,13 +177,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.cancelBuild = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( + request, + null, + error + ); client.cancelBuild(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -190,13 +201,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .ICreateBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createBuildTrigger = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.createBuildTrigger(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -210,13 +223,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .ICreateBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createBuildTrigger = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); client.createBuildTrigger(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -232,13 +247,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IGetBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getBuildTrigger = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.getBuildTrigger(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -252,13 +269,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IGetBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getBuildTrigger = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); client.getBuildTrigger(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -274,13 +293,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IDeleteBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.deleteBuildTrigger = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.deleteBuildTrigger(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -294,13 +315,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IDeleteBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.deleteBuildTrigger = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteBuildTrigger(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -316,13 +339,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IUpdateBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.updateBuildTrigger = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.updateBuildTrigger(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -336,13 +361,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IUpdateBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.updateBuildTrigger = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( + request, + null, + error + ); client.updateBuildTrigger(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -358,13 +385,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .ICreateWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createWorkerPool = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.createWorkerPool(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -378,13 +407,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .ICreateWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createWorkerPool = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); client.createWorkerPool(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -400,13 +431,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getWorkerPool = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.getWorkerPool(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -420,13 +453,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.getWorkerPool = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); client.getWorkerPool(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -442,13 +477,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IDeleteWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.deleteWorkerPool = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.deleteWorkerPool(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -462,13 +499,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IDeleteWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.deleteWorkerPool = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); client.deleteWorkerPool(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -484,13 +523,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IUpdateWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.updateWorkerPool = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.updateWorkerPool(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -504,13 +545,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IUpdateWorkerPoolRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.updateWorkerPool = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( + request, + null, + error + ); client.updateWorkerPool(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -526,13 +569,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IListWorkerPoolsRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.listWorkerPools = - mockSimpleGrpcMethod(request, expectedResponse, null); + client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( + request, + expectedResponse, + null + ); client.listWorkerPools(request, (err: {}, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -546,13 +591,15 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IListWorkerPoolsRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.listWorkerPools = - mockSimpleGrpcMethod(request, null, error); + client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( + request, + null, + error + ); client.listWorkerPools(request, (err: FakeError, response: {}) => { assert(err instanceof FakeError); assert.strictEqual(err.code, FAKE_STATUS_CODE); @@ -568,25 +615,27 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createBuild = - mockLongRunningGrpcMethod(request, expectedResponse); - client.createBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); + client._innerApiCalls.createBuild = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .createBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); }); it('invokes createBuild with error', done => { @@ -595,26 +644,29 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.createBuild = - mockLongRunningGrpcMethod(request, null, error); - client.createBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); + client._innerApiCalls.createBuild = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .createBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); }); }); describe('retryBuild', () => { @@ -624,25 +676,27 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.retryBuild = - mockLongRunningGrpcMethod(request, expectedResponse); - client.retryBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); + client._innerApiCalls.retryBuild = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .retryBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); }); it('invokes retryBuild with error', done => { @@ -651,26 +705,29 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.retryBuild = - mockLongRunningGrpcMethod(request, null, error); - client.retryBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); + client._innerApiCalls.retryBuild = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .retryBuild(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); }); }); describe('runBuildTrigger', () => { @@ -680,25 +737,27 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IRunBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.runBuildTrigger = - mockLongRunningGrpcMethod(request, expectedResponse); - client.runBuildTrigger(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); + client._innerApiCalls.runBuildTrigger = mockLongRunningGrpcMethod( + request, + expectedResponse + ); + client + .runBuildTrigger(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then((responses: [Operation]) => { + assert.deepStrictEqual(responses[0], expectedResponse); + done(); + }) + .catch((err: {}) => { + done(err); + }); }); it('invokes runBuildTrigger with error', done => { @@ -707,26 +766,29 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IRunBuildTriggerRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; // Mock response const expectedResponse = {}; // Mock gRPC layer - client._innerApiCalls.runBuildTrigger = - mockLongRunningGrpcMethod(request, null, error); - client.runBuildTrigger(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); + client._innerApiCalls.runBuildTrigger = mockLongRunningGrpcMethod( + request, + null, + error + ); + client + .runBuildTrigger(request) + .then((responses: [Operation]) => { + const operation = responses[0]; + return operation ? operation.promise() : {}; + }) + .then(() => { + assert.fail(); + }) + .catch((err: FakeError) => { + assert(err instanceof FakeError); + assert.strictEqual(err.code, FAKE_STATUS_CODE); + done(); + }); }); }); describe('listBuilds', () => { @@ -736,16 +798,18 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; // Mock response const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.listBuilds = - (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; + client._innerApiCalls.listBuilds = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; client.listBuilds(request, (err: FakeError, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); @@ -760,16 +824,18 @@ describe('CloudBuildClient', () => { projectId: 'bogus', }); // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1 - .IListBuildTriggersRequest = {}; + const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; // Mock response const expectedResponse = {}; // Mock Grpc layer - client._innerApiCalls.listBuildTriggers = - (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; + client._innerApiCalls.listBuildTriggers = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; client.listBuildTriggers(request, (err: FakeError, response: {}) => { assert.ifError(err); assert.deepStrictEqual(response, expectedResponse); diff --git a/packages/google-devtools-cloudbuild/tslint.json b/packages/google-devtools-cloudbuild/tslint.json index b3bfaf59207d..617dc975bae8 100644 --- a/packages/google-devtools-cloudbuild/tslint.json +++ b/packages/google-devtools-cloudbuild/tslint.json @@ -1,6 +1,3 @@ { - "extends": "gts/tslint.json", - "rules": { - "ban-ts-ignore": false - } + "extends": "gts/tslint.json" } From 686bd45f17370880bf48151a69fddef2c51195d5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 6 Nov 2019 09:25:06 +0000 Subject: [PATCH 010/223] chore(deps): update dependency typescript to ~3.7.0 --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 82cf1b3d2bc2..d988ea095c78 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -37,7 +37,7 @@ "linkinator": "^1.4.0", "mocha": "^6.1.4", "prettier": "^1.17.0", - "typescript": "~3.6.0" + "typescript": "~3.7.0" }, "scripts": { "predocs": "npm run compile", From 84c87becf6bb8185e87dd6648a936325a5dabc5e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 10 Nov 2019 10:59:07 -0800 Subject: [PATCH 011/223] chore: trim whitespace in gapic file (#18) --- packages/google-devtools-cloudbuild/package.json | 4 ++-- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index d988ea095c78..2436c6302c0c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -42,9 +42,9 @@ "scripts": { "predocs": "npm run compile", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check && eslint .", + "lint": "gts check && eslint samples system-test", "clean": "gts clean", - "fix": "gts fix && eslint . --fix", + "fix": "gts fix && eslint samples system-test --fix", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile-protos && npm run compile", diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 9ddeea61d0d9..73f3a6916626 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-05T00:48:23.641691Z", + "updateTime": "2019-11-06T12:10:25.580462Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "21262f41c4445d24bf441e2a5c250a4207348008", - "internalRef": "278486499" + "sha": "5691fcb7c1a926b52577aa1834f31d9c50efda54", + "internalRef": "278731899" } }, { From 832baf86c06444196c197bddd8bb9ffa729438ea Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 11 Nov 2019 10:18:53 -0800 Subject: [PATCH 012/223] feat: adds listBuildTriggersStream method --- .../src/v1/cloud_build_client.ts | 750 ++++++++++-------- .../google-devtools-cloudbuild/synth.metadata | 6 +- .../test/gapic-cloud_build-v1.ts | 62 ++ 3 files changed, 472 insertions(+), 346 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 8ab74f0aaf95..4853a4d93d16 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -19,6 +19,7 @@ import * as gax from 'google-gax'; import * as path from 'path'; +import {Transform} from 'stream'; import * as protosTypes from '../../protos/protos'; import * as gapicConfig from './cloud_build_client_config.json'; @@ -83,17 +84,17 @@ export interface PaginationResponse< rawResponse?: ResponseObject; } +/** + * Creates and manages builds on Google Cloud Platform. + * + * The main concept used by this API is a `Build`, which describes the location + * of the source to build, how to build the source, and where to store the + * built artifacts, if any. + * + * A user can list previously-requested builds or get builds by their ID to + * determine the status of the build. + */ export class CloudBuildClient { - /** - * Creates and manages builds on Google Cloud Platform. - * - * The main concept used by this API is a `Build`, which describes the location - * of the source to build, how to build the source, and where to store the - * built artifacts, if any. - * - * A user can list previously-requested builds or get builds by their ID to - * determine the status of the build. - */ private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; auth: gax.GoogleAuth; @@ -118,10 +119,8 @@ export class CloudBuildClient { * 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. + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. * @param {function} [options.promise] - Custom promise module to use instead * of native Promises. * @param {string} [options.apiEndpoint] - The domain name of the @@ -164,13 +163,15 @@ export class CloudBuildClient { this.auth = gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [ - `gl-node/${process.version}`, - `grpc/${gaxGrpc.grpcVersion}`, - `gax/${gaxModule.version}`, - `gapic/${version}`, - `gl-web/${gaxModule.version}`, - ]; + const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } @@ -204,6 +205,7 @@ export class CloudBuildClient { 'triggers' ), }; + // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. @@ -218,22 +220,22 @@ export class CloudBuildClient { }) .operationsClient(opts); const createBuildResponse = protoFilesRoot.lookup( - 'Build' + '.google.devtools.cloudbuild.v1.Build' ) as gax.protobuf.Type; const createBuildMetadata = protoFilesRoot.lookup( - 'BuildOperationMetadata' + '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; const retryBuildResponse = protoFilesRoot.lookup( - 'Build' + '.google.devtools.cloudbuild.v1.Build' ) as gax.protobuf.Type; const retryBuildMetadata = protoFilesRoot.lookup( - 'BuildOperationMetadata' + '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; const runBuildTriggerResponse = protoFilesRoot.lookup( - 'Build' + '.google.devtools.cloudbuild.v1.Build' ) as gax.protobuf.Type; const runBuildTriggerMetadata = protoFilesRoot.lookup( - 'BuildOperationMetadata' + '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; this._descriptors.longrunning = { @@ -268,7 +270,7 @@ export class CloudBuildClient { this._innerApiCalls = {}; // Put together the "service stub" for - // google.showcase.v1alpha2.Echo. + // google.devtools.cloudbuild.v1.CloudBuild. const cloudBuildStub = gaxGrpc.createStub( opts.fallback ? (protos as protobuf.Root).lookupService( @@ -279,6 +281,8 @@ export class CloudBuildClient { opts ) as Promise<{[method: string]: Function}>; + // Iterate over each of the methods that the service provides + // and create an API call method for each. const cloudBuildStubMethods = [ 'createBuild', 'getBuild', @@ -308,7 +312,7 @@ export class CloudBuildClient { } ); - this._innerApiCalls[methodName] = gax.createApiCall( + this._innerApiCalls[methodName] = gaxModule.createApiCall( innerCallPromise, defaults[methodName], this._descriptors.page[methodName] || @@ -317,12 +321,14 @@ export class CloudBuildClient { ); } } + /** * The DNS address for this API service. */ static get servicePath() { return 'cloudbuild.googleapis.com'; } + /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. @@ -346,13 +352,13 @@ export class CloudBuildClient { return ['https://www.googleapis.com/auth/cloud-platform']; } + getProjectId(): Promise; + getProjectId(callback: Callback): void; /** * Return the project ID used by this class. * @param {function(Error, string)} callback - the callback to * be called with the current project Id. */ - getProjectId(): Promise; - getProjectId(callback: Callback): void; getProjectId( callback?: Callback ): Promise | void { @@ -366,22 +372,6 @@ export class CloudBuildClient { // ------------------- // -- Service calls -- // ------------------- - /** - * Returns information about a previously requested build. - * - * The `Build` that is returned includes its status (such as `SUCCESS`, - * `FAILURE`, or `WORKING`), and timing information. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ getBuild( request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, options?: gax.CallOptions @@ -401,6 +391,24 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Returns information about a previously requested build. + * + * The `Build` that is returned includes its status (such as `SUCCESS`, + * `FAILURE`, or `WORKING`), and timing information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getBuild( request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, optionsOrCallback?: @@ -434,19 +442,6 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getBuild(request, options, callback); } - /** - * Cancels a build in progress. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ cancelBuild( request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, options?: gax.CallOptions @@ -466,6 +461,21 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Cancels a build in progress. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ cancelBuild( request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, optionsOrCallback?: @@ -499,31 +509,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.cancelBuild(request, options, callback); } - /** - * Creates a new `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project for which to configure automatic builds. - * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger - * Required. `BuildTrigger` to create. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ createBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -537,6 +532,23 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Creates a new `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project for which to configure automatic builds. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, optionsOrCallback?: @@ -556,10 +568,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -574,31 +586,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createBuildTrigger(request, options, callback); } - /** - * Returns information about a `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id - * Required. ID of the `BuildTrigger` to get. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ getBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -612,6 +609,23 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Returns information about a `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to get. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, optionsOrCallback?: @@ -631,10 +645,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -649,31 +663,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getBuildTrigger(request, options, callback); } - /** - * Deletes a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id - * Required. ID of the `BuildTrigger` to delete. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ deleteBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.protobuf.IEmpty, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -687,6 +686,23 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Deletes a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ deleteBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, optionsOrCallback?: @@ -706,10 +722,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.protobuf.IEmpty, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -724,33 +740,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.deleteBuildTrigger(request, options, callback); } - /** - * Updates a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id - * Required. ID of the `BuildTrigger` to update. - * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger - * Required. `BuildTrigger` to update. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ updateBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -764,6 +763,25 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Updates a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project that owns the trigger. + * @param {string} request.trigger_id + * Required. ID of the `BuildTrigger` to update. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, optionsOrCallback?: @@ -783,10 +801,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -801,31 +819,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.updateBuildTrigger(request, options, callback); } - /** - * Creates a `WorkerPool` to run the builds, and returns the new worker pool. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * ID of the parent project. - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool - * `WorkerPool` resource to create. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ createWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -839,6 +842,23 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Creates a `WorkerPool` to run the builds, and returns the new worker pool. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * ID of the parent project. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * `WorkerPool` 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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: @@ -858,10 +878,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -876,30 +896,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createWorkerPool(request, options, callback); } - /** - * Returns information about a `WorkerPool`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ getWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -913,6 +919,22 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Returns information about a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ getWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, optionsOrCallback?: @@ -932,10 +954,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -950,30 +972,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.getWorkerPool(request, options, callback); } - /** - * Deletes a `WorkerPool` by its project ID and WorkerPool name. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ deleteWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.protobuf.IEmpty, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -987,6 +995,22 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Deletes a `WorkerPool` by its project ID and WorkerPool name. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ deleteWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: @@ -1006,10 +1030,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.protobuf.IEmpty, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -1024,32 +1048,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.deleteWorkerPool(request, options, callback); } - /** - * Update a `WorkerPool`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool - * `WorkerPool` resource to update. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ updateWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -1063,6 +1071,24 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Update a `WorkerPool`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The field will contain name of the resource requested, for example: + * "projects/project-1/workerPools/workerpool-name" + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * `WorkerPool` resource 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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ updateWorkerPool( request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: @@ -1082,10 +1108,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -1100,29 +1126,16 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.updateWorkerPool(request, options, callback); } - /** - * List project's `WorkerPool`s. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * ID of the parent project. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ listWorkerPools( request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, options?: gax.CallOptions ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | undefined, + | undefined + ), {} | undefined ] >; @@ -1136,6 +1149,21 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * List project's `WorkerPool`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * ID of the parent project. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ listWorkerPools( request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, optionsOrCallback?: @@ -1155,10 +1183,10 @@ export class CloudBuildClient { ): Promise< [ protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - - + ( | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | undefined, + | undefined + ), {} | undefined ] > | void { @@ -1174,23 +1202,6 @@ export class CloudBuildClient { return this._innerApiCalls.listWorkerPools(request, options, callback); } - /** - * Starts a build with the specified configuration. - * - * This method returns a long-running `Operation`, which includes the build - * ID. Pass the build ID to `GetBuild` to determine the build status (such as - * `SUCCESS` or `FAILURE`). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project. - * @param {google.devtools.cloudbuild.v1.Build} request.build - * Required. Build resource to create. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ createBuild( request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: gax.CallOptions @@ -1216,6 +1227,25 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Starts a build with the specified configuration. + * + * This method returns a long-running `Operation`, which includes the build + * ID. Pass the build ID to `GetBuild` to determine the build status (such as + * `SUCCESS` or `FAILURE`). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {google.devtools.cloudbuild.v1.Build} request.build + * Required. Build 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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ createBuild( request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: @@ -1257,6 +1287,31 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.createBuild(request, options, callback); } + retryBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options?: gax.CallOptions + ): Promise< + [ + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + retryBuild( + request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options: gax.CallOptions, + callback: Callback< + Operation< + protosTypes.google.devtools.cloudbuild.v1.IBuild, + protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protosTypes.google.longrunning.IOperation | undefined, + {} | undefined + > + ): void; /** * Creates a new build based on the specified build. * @@ -1292,35 +1347,12 @@ export class CloudBuildClient { * Required. ID of the project. * @param {string} request.id * Required. Build ID of the original build. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. * The promise has a method named "cancel" which cancels the ongoing API call. */ - retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options?: gax.CallOptions - ): Promise< - [ - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options: gax.CallOptions, - callback: Callback< - Operation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata - >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined - > - ): void; retryBuild( request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: @@ -1362,21 +1394,6 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.retryBuild(request, options, callback); } - /** - * Runs a `BuildTrigger` at a particular source revision. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.project_id - * Required. ID of the project. - * @param {string} request.trigger_id - * Required. ID of the trigger. - * @param {google.devtools.cloudbuild.v1.RepoSource} request.source - * Required. Source to build against this trigger. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ runBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: gax.CallOptions @@ -1402,6 +1419,23 @@ export class CloudBuildClient { {} | undefined > ): void; + /** + * Runs a `BuildTrigger` at a particular source revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.project_id + * Required. ID of the project. + * @param {string} request.trigger_id + * Required. ID of the trigger. + * @param {google.devtools.cloudbuild.v1.RepoSource} request.source + * Required. Source to build against this trigger. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ runBuildTrigger( request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: @@ -1443,6 +1477,25 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.runBuildTrigger(request, options, callback); } + listBuilds( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + ] + >; + listBuilds( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuild[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + > + ): void; /** * Lists previously requested builds. * @@ -1459,6 +1512,8 @@ export class CloudBuildClient { * Token to provide to skip to a particular spot in the list. * @param {string} request.filter * The raw filter text to constrain the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. * @@ -1470,25 +1525,6 @@ export class CloudBuildClient { * * The promise has a method named "cancel" which cancels the ongoing API call. */ - listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions - ): Promise< - [ - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse - ] - >; - listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse - > - ): void; listBuilds( request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, optionsOrCallback?: @@ -1521,6 +1557,38 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.listBuilds(request, options, callback); } + + listBuildsStream( + request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listBuilds.createStream( + this._innerApiCalls.listBuilds as gax.GaxCall, + request, + callSettings + ); + } + listBuildTriggers( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options?: gax.CallOptions + ): Promise< + [ + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + ] + >; + listBuildTriggers( + request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options: gax.CallOptions, + callback: Callback< + protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + > + ): void; /** * Lists existing `BuildTrigger`s. * @@ -1534,6 +1602,8 @@ export class CloudBuildClient { * Number of results to return in the list. * @param {string} request.page_token * Token to provide to skip to a particular spot in the 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 an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. * @@ -1545,25 +1615,6 @@ export class CloudBuildClient { * * The promise has a method named "cancel" which cancels the ongoing API call. */ - listBuildTriggers( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions - ): Promise< - [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse - ] - >; - listBuildTriggers( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse - > - ): void; listBuildTriggers( request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, optionsOrCallback?: @@ -1596,4 +1647,17 @@ export class CloudBuildClient { options = options || {}; return this._innerApiCalls.listBuildTriggers(request, options, callback); } + + listBuildTriggersStream( + request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options?: gax.CallOptions | {} + ): Transform { + request = request || {}; + const callSettings = new gax.CallSettings(options); + return this._descriptors.page.listBuildTriggers.createStream( + this._innerApiCalls.listBuildTriggers as gax.GaxCall, + request, + callSettings + ); + } } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 73f3a6916626..e4b65c2e7cb9 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-06T12:10:25.580462Z", + "updateTime": "2019-11-11T12:11:18.063466Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5691fcb7c1a926b52577aa1834f31d9c50efda54", - "internalRef": "278731899" + "sha": "6b125955bf0d6377b96f205e5d187e9d524b7ea2", + "internalRef": "279657866" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index 2010a711768c..262d35ea5687 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -817,6 +817,37 @@ describe('CloudBuildClient', () => { }); }); }); + describe('listBuildsStream', () => { + it('invokes listBuildsStream without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listBuilds = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listBuildsStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); describe('listBuildTriggers', () => { it('invokes listBuildTriggers without error', done => { const client = new cloudbuildModule.v1.CloudBuildClient({ @@ -843,4 +874,35 @@ describe('CloudBuildClient', () => { }); }); }); + describe('listBuildTriggersStream', () => { + it('invokes listBuildTriggersStream without error', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + // Mock request + const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; + // Mock response + const expectedResponse = {}; + // Mock Grpc layer + client._innerApiCalls.listBuildTriggers = ( + actualRequest: {}, + options: {}, + callback: Callback + ) => { + assert.deepStrictEqual(actualRequest, request); + callback(null, expectedResponse); + }; + const stream = client + .listBuildTriggersStream(request, {}) + .on('data', (response: {}) => { + assert.deepStrictEqual(response, expectedResponse); + done(); + }) + .on('error', (err: FakeError) => { + done(err); + }); + stream.write(request); + }); + }); }); From 6973fafe586eceffcdb036a2795019aea542c1e0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2019 10:48:32 -0800 Subject: [PATCH 013/223] chore: release 1.1.0 (#20) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 6a2c1f55f702..b0e574fe3a47 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.1.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.0.0...v1.1.0) (2019-11-11) + + +### Features + +* adds listBuildTriggersStream method ([59dad8a](https://www.github.com/googleapis/nodejs-cloudbuild/commit/59dad8afb351527cd7fd3348921ce30e4cd1956b)) + ## 1.0.0 (2019-10-31) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 2436c6302c0c..5c70dc812bc4 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.0.0", + "version": "1.1.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 84c56c3c386a..28cc0ef592bd 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.0.0" + "@google-cloud/cloudbuild": "^1.1.0" }, "devDependencies": { "c8": "^6.0.1", From 6ca642d49dde32fec134ed44326e9712b4a06a7f Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Mon, 11 Nov 2019 17:01:32 -0800 Subject: [PATCH 014/223] fix(docs): add jsdoc-region-tag plugin --- packages/google-devtools-cloudbuild/.jsdoc.js | 3 ++- packages/google-devtools-cloudbuild/package.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 43f9436a41f9..c9bc4de76f52 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -26,7 +26,8 @@ module.exports = { destination: './docs/' }, plugins: [ - 'plugins/markdown' + 'plugins/markdown', + 'jsdoc-region-tag' ], source: { excludePattern: '(^|\\/|\\\\)[._]', diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 5c70dc812bc4..afd2b1c80335 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -60,6 +60,7 @@ "node": ">=8.10.0" }, "dependencies": { - "google-gax": "^1.7.5" + "google-gax": "^1.7.5", + "jsdoc-region-tag": "^1.0.2" } } From bde8f669bd36a5ebea409344a3d6c13fc6ea1917 Mon Sep 17 00:00:00 2001 From: Benjamin Coe Date: Mon, 11 Nov 2019 18:04:56 -0800 Subject: [PATCH 015/223] chore: move jsdoc plugin to dev-deps --- packages/google-devtools-cloudbuild/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index afd2b1c80335..7bfbc53dd9a2 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -34,6 +34,7 @@ "gts": "^1.1.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", + "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.4.0", "mocha": "^6.1.4", "prettier": "^1.17.0", @@ -60,7 +61,6 @@ "node": ">=8.10.0" }, "dependencies": { - "google-gax": "^1.7.5", - "jsdoc-region-tag": "^1.0.2" + "google-gax": "^1.7.5" } } From aa164349fe24ca09b9518149c50acca1ab01bff9 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 15 Nov 2019 17:34:06 -0800 Subject: [PATCH 016/223] feat: add default exports (#22) --- .../linkinator.config.json | 7 + .../google-devtools-cloudbuild/package.json | 3 +- .../protos/protos.d.ts | 15 ++ .../protos/protos.js | 14 ++ .../google-devtools-cloudbuild/src/index.ts | 6 +- .../src/v1/cloud_build_client.ts | 233 ++++++++++-------- .../google-devtools-cloudbuild/synth.metadata | 6 +- packages/google-devtools-cloudbuild/synth.py | 1 + .../system-test/.eslintrc.yml | 2 + .../system-test/install.ts | 50 ++++ .../google-devtools-cloudbuild/tsconfig.json | 3 +- .../webpack.config.js | 38 ++- 12 files changed, 262 insertions(+), 116 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/linkinator.config.json create mode 100644 packages/google-devtools-cloudbuild/system-test/install.ts diff --git a/packages/google-devtools-cloudbuild/linkinator.config.json b/packages/google-devtools-cloudbuild/linkinator.config.json new file mode 100644 index 000000000000..d780d6bfff5a --- /dev/null +++ b/packages/google-devtools-cloudbuild/linkinator.config.json @@ -0,0 +1,7 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com" + ] +} diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 7bfbc53dd9a2..2e9b3251a185 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -37,6 +37,7 @@ "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.4.0", "mocha": "^6.1.4", + "pack-n-play": "^1.0.0-2", "prettier": "^1.17.0", "typescript": "~3.7.0" }, @@ -54,7 +55,7 @@ "system-test": "c8 mocha --timeout=15000 system-test/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", - "docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/cloudbuild|googleapis.dev.*|github.com.*'" + "docs-test": "linkinator docs" }, "license": "Apache-2.0", "engines": { diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 35b1ba618a42..9453dc00920e 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1,3 +1,18 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as Long from "long"; import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 0c903c9d3fdd..5759daef7437 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1,3 +1,17 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + /*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 */ diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index 7bccb121606e..fa27b3415abd 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -17,6 +17,8 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; -export {v1}; const CloudBuildClient = v1.CloudBuildClient; -export {CloudBuildClient}; +export {v1, CloudBuildClient}; +// For compatibility with JavaScript libraries we need to provide this default export: +// tslint:disable-next-line no-default-export +export default {v1, CloudBuildClient}; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 4853a4d93d16..5fc9aa21a549 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -17,6 +17,16 @@ // ** All changes to this file may be overwritten. ** import * as gax from 'google-gax'; +import { + APICallback, + Callback, + CallOptions, + Descriptors, + ClientOptions, + LROperation, + PaginationCallback, + PaginationResponse, +} from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; @@ -25,65 +35,6 @@ import * as gapicConfig from './cloud_build_client_config.json'; const version = require('../../../package.json').version; -export interface ClientOptions - extends gax.GrpcClientOptions, - gax.GoogleAuthOptions, - gax.ClientStubOptions { - libName?: string; - libVersion?: string; - clientConfig?: gax.ClientConfig; - fallback?: boolean; - apiEndpoint?: string; -} - -interface Descriptors { - page: {[name: string]: gax.PageDescriptor}; - stream: {[name: string]: gax.StreamDescriptor}; - longrunning: {[name: string]: gax.LongrunningDescriptor}; -} - -export interface Callback< - ResponseObject, - NextRequestObject, - RawResponseObject -> { - ( - err: Error | null | undefined, - value?: ResponseObject | null, - nextRequest?: NextRequestObject, - rawResponse?: RawResponseObject - ): void; -} - -export interface Operation extends gax.Operation { - promise(): Promise< - [ResultType, MetadataType, protosTypes.google.longrunning.IOperation] - >; -} - -export interface PaginationCallback< - RequestObject, - ResponseObject, - ResponseType -> { - ( - err: Error | null, - values?: ResponseType[], - nextPageRequest?: RequestObject, - rawResponse?: ResponseObject - ): void; -} - -export interface PaginationResponse< - RequestObject, - ResponseObject, - ResponseType -> { - values?: ResponseType[]; - nextPageRequest?: RequestObject; - rawResponse?: ResponseObject; -} - /** * Creates and manages builds on Google Cloud Platform. * @@ -93,10 +44,14 @@ export interface PaginationResponse< * * A user can list previously-requested builds or get builds by their ID to * determine the status of the build. + * @class + * @memberof v1 */ export class CloudBuildClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _cloudBuildStub: Promise<{[name: string]: Function}>; private _innerApiCalls: {[name: string]: Function}; + private _terminated = false; auth: gax.GoogleAuth; /** @@ -271,7 +226,7 @@ export class CloudBuildClient { // Put together the "service stub" for // google.devtools.cloudbuild.v1.CloudBuild. - const cloudBuildStub = gaxGrpc.createStub( + this._cloudBuildStub = gaxGrpc.createStub( opts.fallback ? (protos as protobuf.Root).lookupService( 'google.devtools.cloudbuild.v1.CloudBuild' @@ -303,8 +258,8 @@ export class CloudBuildClient { ]; for (const methodName of cloudBuildStubMethods) { - const innerCallPromise = cloudBuildStub.then( - (stub: {[method: string]: Function}) => (...args: Array<{}>) => { + const innerCallPromise = this._cloudBuildStub.then( + stub => (...args: Array<{}>) => { return stub[methodName].apply(stub, args); }, (err: Error | null | undefined) => () => { @@ -312,13 +267,24 @@ export class CloudBuildClient { } ); - this._innerApiCalls[methodName] = gaxModule.createApiCall( + const apiCall = gaxModule.createApiCall( innerCallPromise, defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] ); + + this._innerApiCalls[methodName] = ( + argument: {}, + callOptions?: CallOptions, + callback?: APICallback + ) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + return apiCall(argument, callOptions, callback); + }; } } @@ -399,7 +365,7 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id * Required. ID of the build. @@ -466,7 +432,7 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id * Required. ID of the build. @@ -539,7 +505,7 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project for which to configure automatic builds. * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger * Required. `BuildTrigger` to create. @@ -616,9 +582,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id + * @param {string} request.triggerId * Required. ID of the `BuildTrigger` to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -693,9 +659,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id + * @param {string} request.triggerId * Required. ID of the `BuildTrigger` to delete. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -770,9 +736,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project that owns the trigger. - * @param {string} request.trigger_id + * @param {string} request.triggerId * Required. ID of the `BuildTrigger` to update. * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger * Required. `BuildTrigger` to update. @@ -851,7 +817,7 @@ export class CloudBuildClient { * The request object that will be sent. * @param {string} request.parent * ID of the parent project. - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool * `WorkerPool` resource to create. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1081,7 +1047,7 @@ export class CloudBuildClient { * @param {string} request.name * The field will contain name of the resource requested, for example: * "projects/project-1/workerPools/workerpool-name" - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.worker_pool + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool * `WorkerPool` resource to update. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1207,7 +1173,7 @@ export class CloudBuildClient { options?: gax.CallOptions ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1219,7 +1185,7 @@ export class CloudBuildClient { request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, options: gax.CallOptions, callback: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1236,7 +1202,7 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. * @param {google.devtools.cloudbuild.v1.Build} request.build * Required. Build resource to create. @@ -1251,7 +1217,7 @@ export class CloudBuildClient { optionsOrCallback?: | gax.CallOptions | Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1259,7 +1225,7 @@ export class CloudBuildClient { {} | undefined >, callback?: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1268,7 +1234,7 @@ export class CloudBuildClient { > ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1292,7 +1258,7 @@ export class CloudBuildClient { options?: gax.CallOptions ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1304,7 +1270,7 @@ export class CloudBuildClient { request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, options: gax.CallOptions, callback: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1343,7 +1309,7 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id * Required. Build ID of the original build. @@ -1358,7 +1324,7 @@ export class CloudBuildClient { optionsOrCallback?: | gax.CallOptions | Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1366,7 +1332,7 @@ export class CloudBuildClient { {} | undefined >, callback?: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1375,7 +1341,7 @@ export class CloudBuildClient { > ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1399,7 +1365,7 @@ export class CloudBuildClient { options?: gax.CallOptions ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1411,7 +1377,7 @@ export class CloudBuildClient { request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options: gax.CallOptions, callback: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1424,9 +1390,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. - * @param {string} request.trigger_id + * @param {string} request.triggerId * Required. ID of the trigger. * @param {google.devtools.cloudbuild.v1.RepoSource} request.source * Required. Source to build against this trigger. @@ -1441,7 +1407,7 @@ export class CloudBuildClient { optionsOrCallback?: | gax.CallOptions | Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1449,7 +1415,7 @@ export class CloudBuildClient { {} | undefined >, callback?: Callback< - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1458,7 +1424,7 @@ export class CloudBuildClient { > ): Promise< [ - Operation< + LROperation< protosTypes.google.devtools.cloudbuild.v1.IBuild, protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, @@ -1504,11 +1470,11 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project. - * @param {number} request.page_size + * @param {number} request.pageSize * Number of results to return in the list. - * @param {string} request.page_token + * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {string} request.filter * The raw filter text to constrain the results. @@ -1558,6 +1524,34 @@ export class CloudBuildClient { return this._innerApiCalls.listBuilds(request, options, callback); } + /** + * Equivalent to {@link listBuilds}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listBuilds} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Token to provide to skip to a particular spot in the list. + * @param {string} request.filter + * The raw filter text to constrain the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. + */ listBuildsStream( request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, options?: gax.CallOptions | {} @@ -1596,11 +1590,11 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. - * @param {string} request.project_id + * @param {string} request.projectId * Required. ID of the project for which to list BuildTriggers. - * @param {number} request.page_size + * @param {number} request.pageSize * Number of results to return in the list. - * @param {string} request.page_token + * @param {string} request.pageToken * Token to provide to skip to a particular spot in the list. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -1648,6 +1642,32 @@ export class CloudBuildClient { return this._innerApiCalls.listBuildTriggers(request, options, callback); } + /** + * Equivalent to {@link listBuildTriggers}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listBuildTriggers} continuously + * and invokes the callback registered for 'data' event for each element in the + * responses. + * + * The returned object has 'end' method when no more elements are required. + * + * autoPaginate option will be ignored. + * + * @see {@link https://nodejs.org/api/stream.html} + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project for which to list BuildTriggers. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Token to provide to skip to a particular spot in the 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} on 'data' event. + */ listBuildTriggersStream( request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options?: gax.CallOptions | {} @@ -1660,4 +1680,19 @@ export class CloudBuildClient { callSettings ); } + + /** + * Terminate the GRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + */ + close(): Promise { + if (!this._terminated) { + return this._cloudBuildStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index e4b65c2e7cb9..775e245d6773 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-11T12:11:18.063466Z", + "updateTime": "2019-11-16T01:21:52.992305Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6b125955bf0d6377b96f205e5d187e9d524b7ea2", - "internalRef": "279657866" + "sha": "c89394342a9ef70acaf73a6959e04b943fbc817b", + "internalRef": "280761373" } }, { diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 0d53e5479202..f7dd862b279f 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -39,6 +39,7 @@ s.copy(templates, excludes=[]) # Node.js specific cleanup +subprocess.run(['rm', '-rf', './system-test/fixtures']) subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) diff --git a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml index 6db2a46c5358..f9605165c0fb 100644 --- a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml +++ b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml @@ -1,3 +1,5 @@ --- env: mocha: true +rules: + no-console: off diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts new file mode 100644 index 000000000000..2736aee84f78 --- /dev/null +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -0,0 +1,50 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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'; + +describe('typescript consumer tests', () => { + it('should have correct type signature for typescript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); + + it('should have correct type signature for javascript users', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), // path to your module. + sample: { + description: 'typescript based user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); // will throw upon error. + }); +}); diff --git a/packages/google-devtools-cloudbuild/tsconfig.json b/packages/google-devtools-cloudbuild/tsconfig.json index 653c21079782..613d35597b5a 100644 --- a/packages/google-devtools-cloudbuild/tsconfig.json +++ b/packages/google-devtools-cloudbuild/tsconfig.json @@ -13,6 +13,7 @@ "src/*.ts", "src/**/*.ts", "test/*.ts", - "test/**/*.ts" + "test/**/*.ts", + "system-test/*.ts" ] } diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index 53f96ef10ba5..c7a89fdac346 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +const path = require('path'); + module.exports = { - entry: './src/browser.js', + entry: './src/index.ts', output: { - library: 'cloudbuild', - filename: './cloudbuild.js', + library: 'CloudBuild', + filename: './cloud-build.js', }, node: { child_process: 'empty', @@ -24,21 +26,37 @@ module.exports = { crypto: 'empty', }, resolve: { - extensions: ['.js', '.json'], + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], }, module: { rules: [ { - test: /node_modules[\\/]retry-request[\\/]/, - use: 'null-loader', + 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[\\\/]https-proxy-agent/, + use: 'null-loader' }, { - test: /node_modules[\\/]gtoken[\\/]/, - use: 'null-loader', + test: /node_modules[\\\/]gtoken/, + use: 'null-loader' }, ], }, From a13be474264277c2d0f65c1c5904c8447a5afca0 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 19 Nov 2019 04:12:01 -0800 Subject: [PATCH 017/223] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- packages/google-devtools-cloudbuild/webpack.config.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 775e245d6773..605c0bbf3799 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-16T01:21:52.992305Z", + "updateTime": "2019-11-19T12:12:01.860565Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c89394342a9ef70acaf73a6959e04b943fbc817b", - "internalRef": "280761373" + "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", + "internalRef": "281088257" } }, { diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index c7a89fdac346..eb8698ab8f15 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -39,23 +39,23 @@ module.exports = { exclude: /node_modules/ }, { - test: /node_modules[\\\/]@grpc[\\\/]grpc-js/, + test: /node_modules[\\/]@grpc[\\/]grpc-js/, use: 'null-loader' }, { - test: /node_modules[\\\/]grpc/, + test: /node_modules[\\/]grpc/, use: 'null-loader' }, { - test: /node_modules[\\\/]retry-request/, + test: /node_modules[\\/]retry-request/, use: 'null-loader' }, { - test: /node_modules[\\\/]https-proxy-agent/, + test: /node_modules[\\/]https-proxy-agent/, use: 'null-loader' }, { - test: /node_modules[\\\/]gtoken/, + test: /node_modules[\\/]gtoken/, use: 'null-loader' }, ], From a3214a64e157ac9cd526a1c6e76e9f789c049d23 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Sat, 23 Nov 2019 04:12:00 -0800 Subject: [PATCH 018/223] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- .../google-devtools-cloudbuild/system-test/.eslintrc.yml | 3 +-- .../google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts | 5 ++--- packages/google-devtools-cloudbuild/webpack.config.js | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 605c0bbf3799..a6d9aba01f7c 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-19T12:12:01.860565Z", + "updateTime": "2019-11-23T12:12:00.743756Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d8dd7fe8d5304f7bd1c52207703d7f27d5328c5a", - "internalRef": "281088257" + "sha": "777b580a046c4fa84a35e1d00658b71964120bb0", + "internalRef": "282068850" } }, { diff --git a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml index f9605165c0fb..dc5d9b0171ba 100644 --- a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml +++ b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml @@ -1,5 +1,4 @@ --- env: mocha: true -rules: - no-console: off + diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index 262d35ea5687..23a42a311494 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -40,7 +40,6 @@ export class Operation { constructor() {} promise() {} } - function mockSimpleGrpcMethod( expectedRequest: {}, response: {} | null, @@ -78,7 +77,7 @@ function mockLongRunningGrpcMethod( return Promise.resolve([mockOperation]); }; } -describe('CloudBuildClient', () => { +describe('v1.CloudBuildClient', () => { it('has servicePath', () => { const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; assert(servicePath); @@ -96,7 +95,7 @@ describe('CloudBuildClient', () => { const client = new cloudbuildModule.v1.CloudBuildClient(); assert(client); }); - it('should create a client with gRPC option', () => { + it('should create a client with gRPC fallback', () => { const client = new cloudbuildModule.v1.CloudBuildClient({ fallback: true, }); diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index eb8698ab8f15..5f578c552282 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -51,7 +51,7 @@ module.exports = { use: 'null-loader' }, { - test: /node_modules[\\/]https-proxy-agent/, + test: /node_modules[\\/]https?-proxy-agent/, use: 'null-loader' }, { From 992685f7e2be7789fb6a91a8284e244648cbbdd1 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Thu, 5 Dec 2019 10:43:48 -0800 Subject: [PATCH 019/223] fix(deps): pin TypeScript below 3.7.0 --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 2e9b3251a185..6d3dfa6d070e 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -39,7 +39,7 @@ "mocha": "^6.1.4", "pack-n-play": "^1.0.0-2", "prettier": "^1.17.0", - "typescript": "~3.7.0" + "typescript": "3.6.4" }, "scripts": { "predocs": "npm run compile", From 51325f831d3f2a90875edb7776f845c986b04381 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2019 13:29:33 -0800 Subject: [PATCH 020/223] chore: release 1.2.0 (#25) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 13 +++++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index b0e574fe3a47..737e100ae656 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.2.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.1.0...v1.2.0) (2019-12-05) + + +### Features + +* add default exports ([#22](https://www.github.com/googleapis/nodejs-cloudbuild/issues/22)) ([870bfd6](https://www.github.com/googleapis/nodejs-cloudbuild/commit/870bfd649e99f0332b04b51eddfce27ab5078cf5)) + + +### Bug Fixes + +* **deps:** pin TypeScript below 3.7.0 ([c8d7267](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c8d72671a810750d13d327e78b0eafbd0aeac46f)) +* **docs:** snippets are now replaced in jsdoc comments ([#21](https://www.github.com/googleapis/nodejs-cloudbuild/issues/21)) ([b6bf159](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b6bf159e7d3799121b58fe8b290181c16b6aa894)) + ## [1.1.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.0.0...v1.1.0) (2019-11-11) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 6d3dfa6d070e..c024dede8190 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.1.0", + "version": "1.2.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 28cc0ef592bd..e706c711717b 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.1.0" + "@google-cloud/cloudbuild": "^1.2.0" }, "devDependencies": { "c8": "^6.0.1", From 56eb3cf5389d7658105c9ddc0304ef00668619a3 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Tue, 10 Dec 2019 04:12:01 -0800 Subject: [PATCH 021/223] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .../protos/google/devtools/cloudbuild/v1/cloudbuild.proto | 2 +- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index a50ec126796b..1cf045394e33 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1159,7 +1159,7 @@ message WorkerPool { // `WorkerPool` is running. RUNNING = 2; - // `WorkerPool` is being deleting: cancelling builds and draining workers. + // `WorkerPool` is being deleted: cancelling builds and draining workers. DELETING = 3; // `WorkerPool` is deleted. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index a6d9aba01f7c..db5b1117d983 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-11-23T12:12:00.743756Z", + "updateTime": "2019-12-10T12:12:01.622533Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "777b580a046c4fa84a35e1d00658b71964120bb0", - "internalRef": "282068850" + "sha": "6cc9499e225a4f6a5e34fe07e390f67055d7991c", + "internalRef": "284643689" } }, { From 8fe22d0aa5dc6de8f71341d8ff063e612d0d8188 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 11 Dec 2019 11:52:33 -0800 Subject: [PATCH 022/223] feat: make operationsClient and service stub public --- .../src/v1/cloud_build_client.ts | 17 +++++++++-------- .../google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 5fc9aa21a549..50b85d37bbb0 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -49,10 +49,11 @@ const version = require('../../../package.json').version; */ export class CloudBuildClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; - private _cloudBuildStub: Promise<{[name: string]: Function}>; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; auth: gax.GoogleAuth; + operationsClient: gax.OperationsClient; + cloudBuildStub: Promise<{[name: string]: Function}>; /** * Construct an instance of CloudBuildClient. @@ -168,7 +169,7 @@ export class CloudBuildClient { ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) : gaxModule.protobuf.loadSync(nodejsProtoPath); - const operationsClient = gaxModule + this.operationsClient = gaxModule .lro({ auth: this.auth, grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, @@ -195,17 +196,17 @@ export class CloudBuildClient { this._descriptors.longrunning = { createBuild: new gaxModule.LongrunningDescriptor( - operationsClient, + this.operationsClient, createBuildResponse.decode.bind(createBuildResponse), createBuildMetadata.decode.bind(createBuildMetadata) ), retryBuild: new gaxModule.LongrunningDescriptor( - operationsClient, + this.operationsClient, retryBuildResponse.decode.bind(retryBuildResponse), retryBuildMetadata.decode.bind(retryBuildMetadata) ), runBuildTrigger: new gaxModule.LongrunningDescriptor( - operationsClient, + this.operationsClient, runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata) ), @@ -226,7 +227,7 @@ export class CloudBuildClient { // Put together the "service stub" for // google.devtools.cloudbuild.v1.CloudBuild. - this._cloudBuildStub = gaxGrpc.createStub( + this.cloudBuildStub = gaxGrpc.createStub( opts.fallback ? (protos as protobuf.Root).lookupService( 'google.devtools.cloudbuild.v1.CloudBuild' @@ -258,7 +259,7 @@ export class CloudBuildClient { ]; for (const methodName of cloudBuildStubMethods) { - const innerCallPromise = this._cloudBuildStub.then( + const innerCallPromise = this.cloudBuildStub.then( stub => (...args: Array<{}>) => { return stub[methodName].apply(stub, args); }, @@ -1688,7 +1689,7 @@ export class CloudBuildClient { */ close(): Promise { if (!this._terminated) { - return this._cloudBuildStub.then(stub => { + return this.cloudBuildStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index db5b1117d983..26c8e593eb16 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-10T12:12:01.622533Z", + "updateTime": "2019-12-11T12:12:24.059572Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6cc9499e225a4f6a5e34fe07e390f67055d7991c", - "internalRef": "284643689" + "sha": "e47fdd266542386e5e7346697f90476e96dc7ee8", + "internalRef": "284822593" } }, { From 03a8d41cbfbb62c4116a6f6582e64c4845e542f7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2019 11:58:29 -0800 Subject: [PATCH 023/223] chore: release 1.3.0 (#33) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 737e100ae656..d6a27e14bc28 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.2.0...v1.3.0) (2019-12-11) + + +### Features + +* make operationsClient and service stub public ([2fa96df](https://www.github.com/googleapis/nodejs-cloudbuild/commit/2fa96dfe9145f479a2561b5a1215a6ffd19ddf07)) + ## [1.2.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.1.0...v1.2.0) (2019-12-05) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index c024dede8190..0e84dfed4527 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.2.0", + "version": "1.3.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index e706c711717b..0d7d653f5f10 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.2.0" + "@google-cloud/cloudbuild": "^1.3.0" }, "devDependencies": { "c8": "^6.0.1", From 2735fac34a182eee52ecbf5adbdb781eb4ce2eaf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 13 Dec 2019 11:01:24 -0800 Subject: [PATCH 024/223] docs: updated jsdoc comments for generated methods --- .../src/v1/cloud_build_client.ts | 30 +- .../google-devtools-cloudbuild/synth.metadata | 2381 ++++++++++++++++- 2 files changed, 2398 insertions(+), 13 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 50b85d37bbb0..3cf09acc2656 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1482,13 +1482,18 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * The first element of the array is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. + * The client library support 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. * * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. + * The first element is Array of [Build]{@link google.devtools.cloudbuild.v1.Build} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListBuildsRequest]{@link google.devtools.cloudbuild.v1.ListBuildsRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. * * The promise has a method named "cancel" which cancels the ongoing API call. */ @@ -1600,13 +1605,18 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * The first element of the array is Array of [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The client library support 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. * * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse} in a single response. - * The second element is the next request object if the response - * indicates the next page exists, or null. The third element is - * an object representing [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. + * The first element is Array of [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} that corresponds to + * the one page received from the API server. + * If the second element is not null it contains the request object of type [ListBuildTriggersRequest]{@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest} + * that can be used to obtain the next page of the results. + * If it is null, the next page does not exist. + * The third element contains the raw response received from the API server. Its type is + * [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. * * The promise has a method named "cancel" which cancels the ongoing API call. */ diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 26c8e593eb16..5a05312941dd 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-11T12:12:24.059572Z", + "updateTime": "2019-12-13T12:12:27.974692Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e47fdd266542386e5e7346697f90476e96dc7ee8", - "internalRef": "284822593" + "sha": "2085a0d3c76180ee843cf2ecef2b94ca5266be31", + "internalRef": "285233245" } }, { @@ -27,5 +27,2380 @@ "generator": "gapic-generator-typescript" } } + ], + "newFiles": [ + { + "path": "tslint.json" + }, + { + "path": "codecov.yaml" + }, + { + "path": "tsconfig.json" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "cloudbuild.yaml" + }, + { + "path": "renovate.json" + }, + { + "path": ".prettierrc" + }, + { + "path": "linkinator.config.json" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": "synth.metadata" + }, + { + "path": ".nycrc" + }, + { + "path": "LICENSE" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "synth.py" + }, + { + "path": ".eslintignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".prettierignore" + }, + { + "path": "webpack.config.js" + }, + { + "path": "package.json" + }, + { + "path": "README.md" + }, + { + "path": "proto.list" + }, + { + "path": ".gitignore" + }, + { + "path": "package-lock.json" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/config" + }, + { + "path": ".git/index" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/logs/HEAD" + }, + { + "path": ".git/logs/refs/remotes/origin/HEAD" + }, + { + "path": ".git/logs/refs/heads/autosynth" + }, + { + "path": ".git/logs/refs/heads/master" + }, + { + "path": ".git/refs/tags/v1.3.0" + }, + { + "path": ".git/refs/remotes/origin/HEAD" + }, + { + "path": ".git/refs/heads/autosynth" + }, + { + "path": ".git/refs/heads/master" + }, + { + "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" + }, + { + "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" + }, + { + "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" + }, + { + "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" + }, + { + "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" + }, + { + "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" + }, + { + "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" + }, + { + "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" + }, + { + "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" + }, + { + "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" + }, + { + "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" + }, + { + "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" + }, + { + "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" + }, + { + "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" + }, + { + "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" + }, + { + "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" + }, + { + "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" + }, + { + "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" + }, + { + "path": ".git/objects/26/c8e593eb16ba18e03a25f80bea693b2bc5e4eb" + }, + { + "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" + }, + { + "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" + }, + { + "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" + }, + { + "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" + }, + { + "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" + }, + { + "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" + }, + { + "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" + }, + { + "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" + }, + { + "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" + }, + { + "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" + }, + { + "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" + }, + { + "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" + }, + { + "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" + }, + { + "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" + }, + { + "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" + }, + { + "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" + }, + { + "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" + }, + { + "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" + }, + { + "path": ".git/objects/0e/48991c202e1738497edd7199ee87d76b769abd" + }, + { + "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" + }, + { + "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" + }, + { + "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" + }, + { + "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" + }, + { + "path": ".git/objects/2f/31c6ef40a687b5388865c386b08ea2831a0268" + }, + { + "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" + }, + { + "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" + }, + { + "path": ".git/objects/23/98e64e2f4bbe337a41b81bdb6ba4074947e596" + }, + { + "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" + }, + { + "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" + }, + { + "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" + }, + { + "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" + }, + { + "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" + }, + { + "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" + }, + { + "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" + }, + { + "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" + }, + { + "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" + }, + { + "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" + }, + { + "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" + }, + { + "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" + }, + { + "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" + }, + { + "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" + }, + { + "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" + }, + { + "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" + }, + { + "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" + }, + { + "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" + }, + { + "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" + }, + { + "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" + }, + { + "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" + }, + { + "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" + }, + { + "path": ".git/objects/0c/674cb5bc1a0690ddf833dc281de87c358c9848" + }, + { + "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" + }, + { + "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" + }, + { + "path": ".git/objects/50/b85d37bbb081be7945ee98a4bc7cef23a5558b" + }, + { + "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" + }, + { + "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" + }, + { + "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" + }, + { + "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" + }, + { + "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" + }, + { + "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" + }, + { + "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" + }, + { + "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" + }, + { + "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" + }, + { + "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" + }, + { + "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" + }, + { + "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" + }, + { + "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" + }, + { + "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" + }, + { + "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" + }, + { + "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" + }, + { + "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" + }, + { + "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" + }, + { + "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" + }, + { + "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" + }, + { + "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" + }, + { + "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" + }, + { + "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" + }, + { + "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" + }, + { + "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" + }, + { + "path": ".git/objects/65/2150f9dc5d675d3cc3aefb5f867f2d9361c189" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + }, + { + "path": "node_modules/eslint-plugin-node/package.json" + }, + { + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + }, + { + "path": "node_modules/is-callable/package.json" + }, + { + "path": "node_modules/natural-compare/package.json" + }, + { + "path": "node_modules/indent-string/package.json" + }, + { + "path": "node_modules/ansi-colors/package.json" + }, + { + "path": "node_modules/uglify-js/package.json" + }, + { + "path": "node_modules/mimic-fn/package.json" + }, + { + "path": "node_modules/path-is-absolute/package.json" + }, + { + "path": "node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs/node_modules/find-up/package.json" + }, + { + "path": "node_modules/is-ci/package.json" + }, + { + "path": "node_modules/esrecurse/package.json" + }, + { + "path": "node_modules/chai/package.json" + }, + { + "path": "node_modules/string.prototype.trimleft/package.json" + }, + { + "path": "node_modules/once/package.json" + }, + { + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/index.js" + }, + { + "path": "node_modules/typedarray-to-buffer/LICENSE" + }, + { + "path": "node_modules/typedarray-to-buffer/.travis.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/package.json" + }, + { + "path": "node_modules/typedarray-to-buffer/README.md" + }, + { + "path": "node_modules/typedarray-to-buffer/.airtap.yml" + }, + { + "path": "node_modules/typedarray-to-buffer/test/basic.js" + }, + { + "path": "node_modules/progress/package.json" + }, + { + "path": "node_modules/camelcase-keys/package.json" + }, + { + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/regexpp/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/markdown-it/package.json" + }, + { + "path": "node_modules/deep-is/package.json" + }, + { + "path": "node_modules/statuses/package.json" + }, + { + "path": "node_modules/eventemitter3/package.json" + }, + { + "path": "node_modules/trim-newlines/package.json" + }, + { + "path": "node_modules/v8-compile-cache/package.json" + }, + { + "path": "node_modules/got/package.json" + }, + { + "path": "node_modules/got/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/ci-info/package.json" + }, + { + "path": "node_modules/error-ex/package.json" + }, + { + "path": "node_modules/object.getownpropertydescriptors/package.json" + }, + { + "path": "node_modules/callsites/package.json" + }, + { + "path": "node_modules/dot-prop/package.json" + }, + { + "path": "node_modules/stream-shift/package.json" + }, + { + "path": "node_modules/wordwrap/package.json" + }, + { + "path": "node_modules/is-date-object/package.json" + }, + { + "path": "node_modules/long/package.json" + }, + { + "path": "node_modules/pathval/package.json" + }, + { + "path": "node_modules/functional-red-black-tree/package.json" + }, + { + "path": "node_modules/graceful-fs/package.json" + }, + { + "path": "node_modules/is-regex/package.json" + }, + { + "path": "node_modules/lodash.at/package.json" + }, + { + "path": "node_modules/locate-path/package.json" + }, + { + "path": "node_modules/onetime/package.json" + }, + { + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/css-what/package.json" + }, + { + "path": "node_modules/toidentifier/package.json" + }, + { + "path": "node_modules/google-p12-pem/package.json" + }, + { + "path": "node_modules/ee-first/package.json" + }, + { + "path": "node_modules/es-abstract/package.json" + }, + { + "path": "node_modules/execa/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/execa/node_modules/which/package.json" + }, + { + "path": "node_modules/execa/node_modules/is-stream/package.json" + }, + { + "path": "node_modules/execa/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/execa/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/execa/node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/execa/node_modules/yallist/package.json" + }, + { + "path": "node_modules/globals/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/esutils/package.json" + }, + { + "path": "node_modules/js2xmlparser/package.json" + }, + { + "path": "node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/cli-width/package.json" + }, + { + "path": "node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/registry-url/package.json" + }, + { + "path": "node_modules/os-tmpdir/package.json" + }, + { + "path": "node_modules/object.assign/package.json" + }, + { + "path": "node_modules/mdurl/package.json" + }, + { + "path": "node_modules/minimist/package.json" + }, + { + "path": "node_modules/mute-stream/package.json" + }, + { + "path": "node_modules/p-try/package.json" + }, + { + "path": "node_modules/gts/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/gts/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/gts/node_modules/color-name/package.json" + }, + { + "path": "node_modules/gts/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/gts/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/gts/node_modules/chalk/package.json" + }, + { + "path": "node_modules/gcp-metadata/package.json" + }, + { + "path": "node_modules/builtin-modules/package.json" + }, + { + "path": "node_modules/is-typedarray/package.json" + }, + { + "path": "node_modules/loud-rejection/package.json" + }, + { + "path": "node_modules/object-keys/package.json" + }, + { + "path": "node_modules/requizzle/package.json" + }, + { + "path": "node_modules/end-of-stream/package.json" + }, + { + "path": "node_modules/spdx-correct/package.json" + }, + { + "path": "node_modules/parse5/package.json" + }, + { + "path": "node_modules/domhandler/package.json" + }, + { + "path": "node_modules/ini/package.json" + }, + { + "path": "node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/map-obj/package.json" + }, + { + "path": "node_modules/get-stream/package.json" + }, + { + "path": "node_modules/chardet/package.json" + }, + { + "path": "node_modules/assertion-error/package.json" + }, + { + "path": "node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/flat/package.json" + }, + { + "path": "node_modules/balanced-match/package.json" + }, + { + "path": "node_modules/esquery/package.json" + }, + { + "path": "node_modules/set-blocking/package.json" + }, + { + "path": "node_modules/configstore/package.json" + }, + { + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + }, + { + "path": "node_modules/configstore/node_modules/pify/package.json" + }, + { + "path": "node_modules/configstore/node_modules/make-dir/package.json" + }, + { + "path": "node_modules/dom-serializer/package.json" + }, + { + "path": "node_modules/process-nextick-args/package.json" + }, + { + "path": "node_modules/defer-to-connect/package.json" + }, + { + "path": "node_modules/c8/package.json" + }, + { + "path": "node_modules/klaw/package.json" + }, + { + "path": "node_modules/latest-version/package.json" + }, + { + "path": "node_modules/istanbul-lib-report/package.json" + }, + { + "path": "node_modules/mimic-response/package.json" + }, + { + "path": "node_modules/rimraf/package.json" + }, + { + "path": "node_modules/camelcase/package.json" + }, + { + "path": "node_modules/domutils/package.json" + }, + { + "path": "node_modules/file-entry-cache/package.json" + }, + { + "path": "node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/run-async/package.json" + }, + { + "path": "node_modules/markdown-it-anchor/package.json" + }, + { + "path": "node_modules/deep-eql/package.json" + }, + { + "path": "node_modules/uri-js/package.json" + }, + { + "path": "node_modules/commander/package.json" + }, + { + "path": "node_modules/ms/package.json" + }, + { + "path": "node_modules/boolbase/package.json" + }, + { + "path": "node_modules/inflight/package.json" + }, + { + "path": "node_modules/on-finished/package.json" + }, + { + "path": "node_modules/wide-align/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/string-width/package.json" + }, + { + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/package.json" + }, + { + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + }, + { + "path": "node_modules/decamelize/package.json" + }, + { + "path": "node_modules/handlebars/package.json" + }, + { + "path": "node_modules/json-parse-better-errors/package.json" + }, + { + "path": "node_modules/load-json-file/package.json" + }, + { + "path": "node_modules/load-json-file/node_modules/pify/package.json" + }, + { + "path": "node_modules/optimist/package.json" + }, + { + "path": "node_modules/http-errors/package.json" + }, + { + "path": "node_modules/escape-html/package.json" + }, + { + "path": "node_modules/safer-buffer/package.json" + }, + { + "path": "node_modules/yargs-unparser/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + }, + { + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/has-flag/package.json" + }, + { + "path": "node_modules/string.prototype.trimright/package.json" + }, + { + "path": "node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + }, + { + "path": "node_modules/jsdoc-region-tag/package.json" + }, + { + "path": "node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/path-exists/package.json" + }, + { + "path": "node_modules/es6-promisify/package.json" + }, + { + "path": "node_modules/tsutils/package.json" + }, + { + "path": "node_modules/underscore/package.json" + }, + { + "path": "node_modules/eslint/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-command/package.json" + }, + { + "path": "node_modules/eslint/node_modules/which/package.json" + }, + { + "path": "node_modules/eslint/node_modules/debug/package.json" + }, + { + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + }, + { + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + }, + { + "path": "node_modules/eslint/node_modules/path-key/package.json" + }, + { + "path": "node_modules/test-exclude/package.json" + }, + { + "path": "node_modules/serve-static/package.json" + }, + { + "path": "node_modules/@babel/parser/package.json" + }, + { + "path": "node_modules/@babel/highlight/package.json" + }, + { + "path": "node_modules/@babel/code-frame/package.json" + }, + { + "path": "node_modules/deep-extend/package.json" + }, + { + "path": "node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/type-fest/package.json" + }, + { + "path": "node_modules/he/package.json" + }, + { + "path": "node_modules/json-bigint/package.json" + }, + { + "path": "node_modules/prepend-http/package.json" + }, + { + "path": "node_modules/extend/package.json" + }, + { + "path": "node_modules/color-name/package.json" + }, + { + "path": "node_modules/diff/package.json" + }, + { + "path": "node_modules/hosted-git-info/package.json" + }, + { + "path": "node_modules/require-main-filename/package.json" + }, + { + "path": "node_modules/node-fetch/package.json" + }, + { + "path": "node_modules/finalhandler/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/ms/package.json" + }, + { + "path": "node_modules/finalhandler/node_modules/debug/package.json" + }, + { + "path": "node_modules/js-tokens/package.json" + }, + { + "path": "node_modules/fast-deep-equal/package.json" + }, + { + "path": "node_modules/linkinator/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-convert/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/has-flag/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/color-name/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/linkinator/node_modules/chalk/package.json" + }, + { + "path": "node_modules/jsdoc/package.json" + }, + { + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + }, + { + "path": "node_modules/which/package.json" + }, + { + "path": "node_modules/lodash.camelcase/package.json" + }, + { + "path": "node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/is-extglob/package.json" + }, + { + "path": "node_modules/imurmurhash/package.json" + }, + { + "path": "node_modules/supports-color/package.json" + }, + { + "path": "node_modules/eslint-plugin-prettier/package.json" + }, + { + "path": "node_modules/normalize-package-data/package.json" + }, + { + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + }, + { + "path": "node_modules/punycode/package.json" + }, + { + "path": "node_modules/istanbul-reports/package.json" + }, + { + "path": "node_modules/eslint-utils/package.json" + }, + { + "path": "node_modules/string-width/package.json" + }, + { + "path": "node_modules/p-cancelable/package.json" + }, + { + "path": "node_modules/npm-bundled/package.json" + }, + { + "path": "node_modules/iconv-lite/package.json" + }, + { + "path": "node_modules/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/spdx-license-ids/package.json" + }, + { + "path": "node_modules/through/package.json" + }, + { + "path": "node_modules/pseudomap/package.json" + }, + { + "path": "node_modules/npm-normalize-package-bin/package.json" + }, + { + "path": "node_modules/semver/package.json" + }, + { + "path": "node_modules/read-pkg/package.json" + }, + { + "path": "node_modules/arrify/package.json" + }, + { + "path": "node_modules/gtoken/package.json" + }, + { + "path": "node_modules/prettier-linter-helpers/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/package.json" + }, + { + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + }, + { + "path": "node_modules/@protobufjs/fetch/package.json" + }, + { + "path": "node_modules/@protobufjs/utf8/package.json" + }, + { + "path": "node_modules/@protobufjs/aspromise/package.json" + }, + { + "path": "node_modules/@protobufjs/path/package.json" + }, + { + "path": "node_modules/@protobufjs/float/package.json" + }, + { + "path": "node_modules/@protobufjs/eventemitter/package.json" + }, + { + "path": "node_modules/@protobufjs/codegen/package.json" + }, + { + "path": "node_modules/@protobufjs/inquire/package.json" + }, + { + "path": "node_modules/@protobufjs/base64/package.json" + }, + { + "path": "node_modules/@protobufjs/pool/package.json" + }, + { + "path": "node_modules/safe-buffer/package.json" + }, + { + "path": "node_modules/import-fresh/package.json" + }, + { + "path": "node_modules/js-yaml/package.json" + }, + { + "path": "node_modules/foreground-child/package.json" + }, + { + "path": "node_modules/external-editor/package.json" + }, + { + "path": "node_modules/abort-controller/package.json" + }, + { + "path": "node_modules/google-auth-library/package.json" + }, + { + "path": "node_modules/catharsis/package.json" + }, + { + "path": "node_modules/wrap-ansi/package.json" + }, + { + "path": "node_modules/mocha/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs/package.json" + }, + { + "path": "node_modules/mocha/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/mocha/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/mocha/node_modules/ms/package.json" + }, + { + "path": "node_modules/mocha/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/mocha/node_modules/diff/package.json" + }, + { + "path": "node_modules/mocha/node_modules/which/package.json" + }, + { + "path": "node_modules/mocha/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/mocha/node_modules/find-up/package.json" + }, + { + "path": "node_modules/mocha/node_modules/glob/package.json" + }, + { + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/agent-base/package.json" + }, + { + "path": "node_modules/fast-diff/package.json" + }, + { + "path": "node_modules/flat-cache/package.json" + }, + { + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/htmlparser2/package.json" + }, + { + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/npm-run-path/package.json" + }, + { + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + }, + { + "path": "node_modules/rxjs/package.json" + }, + { + "path": "node_modules/fs.realpath/package.json" + }, + { + "path": "node_modules/fs-minipass/package.json" + }, + { + "path": "node_modules/parse-json/package.json" + }, + { + "path": "node_modules/debug/package.json" + }, + { + "path": "node_modules/isarray/package.json" + }, + { + "path": "node_modules/widest-line/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/string-width/package.json" + }, + { + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/has-yarn/package.json" + }, + { + "path": "node_modules/base64-js/package.json" + }, + { + "path": "node_modules/restore-cursor/package.json" + }, + { + "path": "node_modules/es6-promise/package.json" + }, + { + "path": "node_modules/clone-response/package.json" + }, + { + "path": "node_modules/tslint/package.json" + }, + { + "path": "node_modules/tslint/node_modules/semver/package.json" + }, + { + "path": "node_modules/crypto-random-string/package.json" + }, + { + "path": "node_modules/is-stream/package.json" + }, + { + "path": "node_modules/shebang-regex/package.json" + }, + { + "path": "node_modules/jsonexport/package.json" + }, + { + "path": "node_modules/fast-json-stable-stringify/package.json" + }, + { + "path": "node_modules/fresh/package.json" + }, + { + "path": "node_modules/cross-spawn/package.json" + }, + { + "path": "node_modules/type-check/package.json" + }, + { + "path": "node_modules/tmp/package.json" + }, + { + "path": "node_modules/inherits/package.json" + }, + { + "path": "node_modules/find-up/package.json" + }, + { + "path": "node_modules/is-symbol/package.json" + }, + { + "path": "node_modules/furi/package.json" + }, + { + "path": "node_modules/gaxios/package.json" + }, + { + "path": "node_modules/pump/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" + }, + { + "path": "node_modules/doctrine/package.json" + }, + { + "path": "node_modules/check-error/package.json" + }, + { + "path": "node_modules/@types/long/package.json" + }, + { + "path": "node_modules/@types/color-name/package.json" + }, + { + "path": "node_modules/@types/istanbul-lib-coverage/package.json" + }, + { + "path": "node_modules/@types/mocha/package.json" + }, + { + "path": "node_modules/@types/node/package.json" + }, + { + "path": "node_modules/@types/is-windows/package.json" + }, + { + "path": "node_modules/strip-indent/package.json" + }, + { + "path": "node_modules/keyv/package.json" + }, + { + "path": "node_modules/brace-expansion/package.json" + }, + { + "path": "node_modules/eslint-scope/package.json" + }, + { + "path": "node_modules/update-notifier/package.json" + }, + { + "path": "node_modules/inquirer/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/slice-ansi/package.json" + }, + { + "path": "node_modules/path-is-inside/package.json" + }, + { + "path": "node_modules/is-path-inside/package.json" + }, + { + "path": "node_modules/which-module/package.json" + }, + { + "path": "node_modules/sprintf-js/package.json" + }, + { + "path": "node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/normalize-url/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/mkdirp/package.json" + }, + { + "path": "node_modules/mkdirp/node_modules/minimist/package.json" + }, + { + "path": "node_modules/setprototypeof/package.json" + }, + { + "path": "node_modules/entities/package.json" + }, + { + "path": "node_modules/send/package.json" + }, + { + "path": "node_modules/send/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/package.json" + }, + { + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + }, + { + "path": "node_modules/send/node_modules/mime/package.json" + }, + { + "path": "node_modules/eslint-visitor-keys/package.json" + }, + { + "path": "node_modules/taffydb/package.json" + }, + { + "path": "node_modules/espree/package.json" + }, + { + "path": "node_modules/readable-stream/package.json" + }, + { + "path": "node_modules/minipass/package.json" + }, + { + "path": "node_modules/minipass/node_modules/yallist/package.json" + }, + { + "path": "node_modules/parseurl/package.json" + }, + { + "path": "node_modules/spdx-expression-parse/package.json" + }, + { + "path": "node_modules/google-gax/package.json" + }, + { + "path": "node_modules/astral-regex/package.json" + }, + { + "path": "node_modules/p-timeout/package.json" + }, + { + "path": "node_modules/boxen/package.json" + }, + { + "path": "node_modules/boxen/node_modules/type-fest/package.json" + }, + { + "path": "node_modules/tar/package.json" + }, + { + "path": "node_modules/tar/node_modules/yallist/package.json" + }, + { + "path": "node_modules/ansi-styles/package.json" + }, + { + "path": "node_modules/glob-parent/package.json" + }, + { + "path": "node_modules/json-schema-traverse/package.json" + }, + { + "path": "node_modules/lodash/package.json" + }, + { + "path": "node_modules/server-destroy/package.json" + }, + { + "path": "node_modules/cheerio/package.json" + }, + { + "path": "node_modules/growl/package.json" + }, + { + "path": "node_modules/http-cache-semantics/package.json" + }, + { + "path": "node_modules/levn/package.json" + }, + { + "path": "node_modules/resolve-from/package.json" + }, + { + "path": "node_modules/protobufjs/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package.json" + }, + { + "path": "node_modules/protobufjs/cli/package-lock.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" + }, + { + "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" + }, + { + "path": "node_modules/walkdir/package.json" + }, + { + "path": "node_modules/browser-stdout/package.json" + }, + { + "path": "node_modules/@bcoe/v8-coverage/package.json" + }, + { + "path": "node_modules/strip-bom/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/package.json" + }, + { + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + }, + { + "path": "node_modules/esprima/package.json" + }, + { + "path": "node_modules/cli-cursor/package.json" + }, + { + "path": "node_modules/meow/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-locate/package.json" + }, + { + "path": "node_modules/meow/node_modules/locate-path/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-try/package.json" + }, + { + "path": "node_modules/meow/node_modules/camelcase/package.json" + }, + { + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/path-exists/package.json" + }, + { + "path": "node_modules/meow/node_modules/find-up/package.json" + }, + { + "path": "node_modules/meow/node_modules/p-limit/package.json" + }, + { + "path": "node_modules/meow/node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/jws/package.json" + }, + { + "path": "node_modules/to-readable-stream/package.json" + }, + { + "path": "node_modules/json-buffer/package.json" + }, + { + "path": "node_modules/is-npm/package.json" + }, + { + "path": "node_modules/is-fullwidth-code-point/package.json" + }, + { + "path": "node_modules/path-parse/package.json" + }, + { + "path": "node_modules/lru-cache/package.json" + }, + { + "path": "node_modules/glob/package.json" + }, + { + "path": "node_modules/pify/package.json" + }, + { + "path": "node_modules/object-inspect/package.json" + }, + { + "path": "node_modules/wrappy/package.json" + }, + { + "path": "node_modules/string_decoder/package.json" + }, + { + "path": "node_modules/is-windows/package.json" + }, + { + "path": "node_modules/ansi-escapes/package.json" + }, + { + "path": "node_modules/argparse/package.json" + }, + { + "path": "node_modules/minimatch/package.json" + }, + { + "path": "node_modules/encodeurl/package.json" + }, + { + "path": "node_modules/define-properties/package.json" + }, + { + "path": "node_modules/require-directory/package.json" + }, + { + "path": "node_modules/p-limit/package.json" + }, + { + "path": "node_modules/bignumber.js/package.json" + }, + { + "path": "node_modules/make-dir/package.json" + }, + { + "path": "node_modules/make-dir/node_modules/semver/package.json" + }, + { + "path": "node_modules/source-map/package.json" + }, + { + "path": "node_modules/uc.micro/package.json" + }, + { + "path": "node_modules/eslint-config-prettier/package.json" + }, + { + "path": "node_modules/path-key/package.json" + }, + { + "path": "node_modules/validate-npm-package-license/package.json" + }, + { + "path": "node_modules/node-environment-flags/package.json" + }, + { + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + }, + { + "path": "node_modules/minimist-options/package.json" + }, + { + "path": "node_modules/minimist-options/node_modules/arrify/package.json" + }, + { + "path": "node_modules/signal-exit/package.json" + }, + { + "path": "node_modules/mime/package.json" + }, + { + "path": "node_modules/spdx-exceptions/package.json" + }, + { + "path": "node_modules/acorn/package.json" + }, + { + "path": "node_modules/ecdsa-sig-formatter/package.json" + }, + { + "path": "node_modules/p-queue/package.json" + }, + { + "path": "node_modules/linkify-it/package.json" + }, + { + "path": "node_modules/depd/package.json" + }, + { + "path": "node_modules/chalk/package.json" + }, + { + "path": "node_modules/chalk/node_modules/supports-color/package.json" + }, + { + "path": "node_modules/has-symbols/package.json" + }, + { + "path": "node_modules/typescript/package.json" + }, + { + "path": "node_modules/domelementtype/package.json" + }, + { + "path": "node_modules/ignore/package.json" + }, + { + "path": "node_modules/function-bind/package.json" + }, + { + "path": "node_modules/duplexify/package.json" + }, + { + "path": "node_modules/nth-check/package.json" + }, + { + "path": "node_modules/ansi-align/package.json" + }, + { + "path": "node_modules/fast-text-encoding/package.json" + }, + { + "path": "node_modules/ajv/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/xmlcreate/package.json" + }, + { + "path": "node_modules/is-stream-ended/package.json" + }, + { + "path": "node_modules/is-plain-obj/package.json" + }, + { + "path": "node_modules/strip-eof/package.json" + }, + { + "path": "node_modules/currently-unhandled/package.json" + }, + { + "path": "node_modules/cliui/package.json" + }, + { + "path": "node_modules/figures/package.json" + }, + { + "path": "node_modules/chownr/package.json" + }, + { + "path": "node_modules/@szmarczak/http-timer/package.json" + }, + { + "path": "node_modules/redent/package.json" + }, + { + "path": "node_modules/ignore-walk/package.json" + }, + { + "path": "node_modules/buffer-equal-constant-time/package.json" + }, + { + "path": "node_modules/rc/package.json" + }, + { + "path": "node_modules/rc/node_modules/minimist/package.json" + }, + { + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + }, + { + "path": "node_modules/is-glob/package.json" + }, + { + "path": "node_modules/array-find-index/package.json" + }, + { + "path": "node_modules/semver-diff/package.json" + }, + { + "path": "node_modules/semver-diff/node_modules/semver/package.json" + }, + { + "path": "node_modules/y18n/package.json" + }, + { + "path": "node_modules/is-installed-globally/package.json" + }, + { + "path": "node_modules/p-finally/package.json" + }, + { + "path": "node_modules/write/package.json" + }, + { + "path": "node_modules/@sindresorhus/is/package.json" + }, + { + "path": "node_modules/ansi-regex/package.json" + }, + { + "path": "node_modules/fast-levenshtein/package.json" + }, + { + "path": "node_modules/isexe/package.json" + }, + { + "path": "node_modules/ncp/package.json" + }, + { + "path": "node_modules/parent-module/package.json" + }, + { + "path": "node_modules/cacheable-request/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + }, + { + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + }, + { + "path": "node_modules/prettier/package.json" + }, + { + "path": "node_modules/cli-boxes/package.json" + }, + { + "path": "node_modules/tslint-config-prettier/package.json" + }, + { + "path": "node_modules/get-stdin/package.json" + }, + { + "path": "node_modules/is-arrayish/package.json" + }, + { + "path": "node_modules/https-proxy-agent/package.json" + }, + { + "path": "node_modules/pack-n-play/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + }, + { + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + }, + { + "path": "node_modules/convert-source-map/package.json" + }, + { + "path": "node_modules/unpipe/package.json" + }, + { + "path": "node_modules/path-type/package.json" + }, + { + "path": "node_modules/path-type/node_modules/pify/package.json" + }, + { + "path": "node_modules/unique-string/package.json" + }, + { + "path": "node_modules/package-json/package.json" + }, + { + "path": "node_modules/range-parser/package.json" + }, + { + "path": "node_modules/lodash.has/package.json" + }, + { + "path": "node_modules/concat-map/package.json" + }, + { + "path": "node_modules/yallist/package.json" + }, + { + "path": "node_modules/etag/package.json" + }, + { + "path": "node_modules/is-buffer/package.json" + }, + { + "path": "node_modules/@grpc/grpc-js/package.json" + }, + { + "path": "node_modules/@grpc/proto-loader/package.json" + }, + { + "path": "node_modules/text-table/package.json" + }, + { + "path": "node_modules/retry-request/package.json" + }, + { + "path": "node_modules/retry-request/node_modules/debug/package.json" + }, + { + "path": "node_modules/yargs-parser/package.json" + }, + { + "path": "node_modules/minizlib/package.json" + }, + { + "path": "node_modules/minizlib/node_modules/yallist/package.json" + }, + { + "path": "node_modules/import-lazy/package.json" + }, + { + "path": "node_modules/resolve/package.json" + }, + { + "path": "node_modules/core-util-is/package.json" + }, + { + "path": "node_modules/tslib/package.json" + }, + { + "path": "node_modules/through2/package.json" + }, + { + "path": "node_modules/node-forge/package.json" + }, + { + "path": "node_modules/global-dirs/package.json" + }, + { + "path": "node_modules/flatted/package.json" + }, + { + "path": "node_modules/quick-lru/package.json" + }, + { + "path": "node_modules/npm-packlist/package.json" + }, + { + "path": "node_modules/has/package.json" + }, + { + "path": "node_modules/marked/package.json" + }, + { + "path": "node_modules/optionator/package.json" + }, + { + "path": "node_modules/jwa/package.json" + }, + { + "path": "node_modules/estraverse/package.json" + }, + { + "path": "node_modules/responselike/package.json" + }, + { + "path": "node_modules/neo-async/package.json" + }, + { + "path": "node_modules/css-select/package.json" + }, + { + "path": "node_modules/destroy/package.json" + }, + { + "path": "node_modules/registry-auth-token/package.json" + }, + { + "path": "node_modules/xdg-basedir/package.json" + }, + { + "path": "node_modules/event-target-shim/package.json" + }, + { + "path": "node_modules/get-func-name/package.json" + }, + { + "path": "node_modules/bluebird/package.json" + }, + { + "path": "node_modules/is-obj/package.json" + }, + { + "path": "node_modules/table/package.json" + }, + { + "path": "node_modules/is-yarn-global/package.json" + }, + { + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + }, + { + "path": "node_modules/is-promise/package.json" + }, + { + "path": "node_modules/type-detect/package.json" + }, + { + "path": "node_modules/nice-try/package.json" + }, + { + "path": "node_modules/get-caller-file/package.json" + }, + { + "path": "node_modules/es-to-primitive/package.json" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": "test/gapic-cloud_build-v1.ts" + }, + { + "path": "__pycache__/synth.cpython-36.pyc" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/listBuildTriggers.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/system-test/samples.js" + }, + { + "path": "samples/system-test/.eslintrc.yml" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": "build/protos/protos.json" + }, + { + "path": "build/protos/protos.js" + }, + { + "path": "build/protos/protos.d.ts" + }, + { + "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + }, + { + "path": "build/test/gapic-cloud_build-v1.js.map" + }, + { + "path": "build/test/gapic-cloud_build-v1.d.ts" + }, + { + "path": "build/test/gapic-cloud_build-v1.js" + }, + { + "path": "build/system-test/install.js.map" + }, + { + "path": "build/system-test/install.d.ts" + }, + { + "path": "build/system-test/install.js" + }, + { + "path": "build/src/index.js.map" + }, + { + "path": "build/src/index.js" + }, + { + "path": "build/src/index.d.ts" + }, + { + "path": "build/src/v1/index.js.map" + }, + { + "path": "build/src/v1/index.js" + }, + { + "path": "build/src/v1/cloud_build_client.d.ts" + }, + { + "path": "build/src/v1/cloud_build_client.js" + }, + { + "path": "build/src/v1/index.d.ts" + }, + { + "path": "build/src/v1/cloud_build_client.js.map" + }, + { + "path": "build/src/v1/cloud_build_client_config.json" + }, + { + "path": "system-test/.eslintrc.yml" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/system.js" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "src/v1/cloud_build_client.ts" + }, + { + "path": "src/v1/cloud_build_client_config.json" + }, + { + "path": "src/v1/cloud_build_proto_list.json" + } ] } \ No newline at end of file From d741850a775e2228ac7f7a8f9379761cb06ad085 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Wed, 18 Dec 2019 04:11:58 -0800 Subject: [PATCH 025/223] [CHANGE ME] Re-generated to pick up changes in the API or client library generator. --- .../src/v1/cloud_build_client_config.json | 4 +- .../google-devtools-cloudbuild/synth.metadata | 1603 ++++++++--------- 2 files changed, 802 insertions(+), 805 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json index 2398e64e2f4b..8d0e7c251ac6 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -13,9 +13,9 @@ "initial_retry_delay_millis": 100, "retry_delay_multiplier": 1.3, "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, + "initial_rpc_timeout_millis": 60000, "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 20000, + "max_rpc_timeout_millis": 60000, "total_timeout_millis": 600000 } }, diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 5a05312941dd..0fa322c89dd6 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-13T12:12:27.974692Z", + "updateTime": "2019-12-18T12:11:58.710605Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2085a0d3c76180ee843cf2ecef2b94ca5266be31", - "internalRef": "285233245" + "sha": "3352100a15ede383f5ab3c34599f7a10a3d066fe", + "internalRef": "286065440" } }, { @@ -30,2302 +30,2323 @@ ], "newFiles": [ { - "path": "tslint.json" - }, - { - "path": "codecov.yaml" - }, - { - "path": "tsconfig.json" + "path": "package.json" }, { - "path": "CONTRIBUTING.md" + "path": "webpack.config.js" }, { - "path": "cloudbuild.yaml" + "path": "linkinator.config.json" }, { - "path": "renovate.json" + "path": ".eslintrc.yml" }, { "path": ".prettierrc" }, { - "path": "linkinator.config.json" + "path": "codecov.yaml" }, { - "path": ".repo-metadata.json" + "path": ".gitignore" }, { - "path": ".readme-partials.yml" + "path": "package-lock.json" }, { - "path": "CODE_OF_CONDUCT.md" + "path": "tslint.json" }, { - "path": ".eslintrc.yml" + "path": "proto.list" }, { - "path": "synth.metadata" + "path": "tsconfig.json" }, { "path": ".nycrc" }, { - "path": "LICENSE" + "path": "cloudbuild.yaml" }, { - "path": "CHANGELOG.md" + "path": "synth.metadata" }, { - "path": "synth.py" + "path": "CONTRIBUTING.md" }, { - "path": ".eslintignore" + "path": "README.md" }, { - "path": ".jsdoc.js" + "path": ".repo-metadata.json" }, { - "path": ".prettierignore" + "path": ".jsdoc.js" }, { - "path": "webpack.config.js" + "path": "renovate.json" }, { - "path": "package.json" + "path": "CODE_OF_CONDUCT.md" }, { - "path": "README.md" + "path": "LICENSE" }, { - "path": "proto.list" + "path": ".readme-partials.yml" }, { - "path": ".gitignore" + "path": ".eslintignore" }, { - "path": "package-lock.json" + "path": ".prettierignore" }, { - "path": ".git/HEAD" + "path": "CHANGELOG.md" }, { - "path": ".git/shallow" + "path": "synth.py" }, { - "path": ".git/config" + "path": "protos/protos.json" }, { - "path": ".git/index" + "path": "protos/protos.d.ts" }, { - "path": ".git/packed-refs" + "path": "protos/protos.js" }, { - "path": ".git/logs/HEAD" + "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": "node_modules/meow/package.json" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" }, { - "path": ".git/logs/refs/heads/master" + "path": "node_modules/meow/node_modules/p-limit/package.json" }, { - "path": ".git/refs/tags/v1.3.0" + "path": "node_modules/meow/node_modules/find-up/package.json" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": ".git/refs/heads/autosynth" + "path": "node_modules/meow/node_modules/p-locate/package.json" }, { - "path": ".git/refs/heads/master" + "path": "node_modules/meow/node_modules/p-try/package.json" }, { - "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" + "path": "node_modules/meow/node_modules/path-exists/package.json" }, { - "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" + "path": "node_modules/meow/node_modules/locate-path/package.json" }, { - "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" + "path": "node_modules/eslint/package.json" }, { - "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": ".git/objects/26/c8e593eb16ba18e03a25f80bea693b2bc5e4eb" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" + "path": "node_modules/error-ex/package.json" }, { - "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" + "path": "node_modules/safer-buffer/package.json" }, { - "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" + "path": "node_modules/unique-string/package.json" }, { - "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" + "path": "node_modules/path-type/package.json" }, { - "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" + "path": "node_modules/path-type/node_modules/pify/package.json" }, { - "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" + "path": "node_modules/esquery/package.json" }, { - "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" + "path": "node_modules/fresh/package.json" }, { - "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" + "path": "node_modules/parse5/package.json" }, { - "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" + "path": "node_modules/restore-cursor/package.json" }, { - "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" + "path": "node_modules/is-windows/package.json" }, { - "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" + "path": "node_modules/flatted/package.json" }, { - "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" + "path": "node_modules/cliui/package.json" }, { - "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" + "path": "node_modules/signal-exit/package.json" }, { - "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" + "path": "node_modules/resolve/package.json" }, { - "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" + "path": "node_modules/uc.micro/package.json" }, { - "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": ".git/objects/0e/48991c202e1738497edd7199ee87d76b769abd" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" + "path": "node_modules/spdx-correct/package.json" }, { - "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" + "path": "node_modules/ms/package.json" }, { - "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": ".git/objects/2f/31c6ef40a687b5388865c386b08ea2831a0268" + "path": "node_modules/entities/package.json" }, { - "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" + "path": "node_modules/write/package.json" }, { - "path": ".git/objects/23/98e64e2f4bbe337a41b81bdb6ba4074947e596" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" + "path": "node_modules/typescript/package.json" }, { - "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" + "path": "node_modules/statuses/package.json" }, { - "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" + "path": "node_modules/natural-compare/package.json" }, { - "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" + "path": "node_modules/onetime/package.json" }, { - "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" + "path": "node_modules/xmlcreate/package.json" }, { - "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" + "path": "node_modules/glob/package.json" }, { - "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" + "path": "node_modules/latest-version/package.json" }, { - "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" + "path": "node_modules/y18n/package.json" }, { - "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" + "path": "node_modules/responselike/package.json" }, { - "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" + "path": "node_modules/nth-check/package.json" }, { - "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" + "path": "node_modules/brace-expansion/package.json" }, { - "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" + "path": "node_modules/figures/package.json" }, { - "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" + "path": "node_modules/cli-boxes/package.json" }, { - "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" + "path": "node_modules/normalize-url/package.json" }, { - "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" + "path": "node_modules/core-util-is/package.json" }, { - "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" + "path": "node_modules/widest-line/package.json" }, { - "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" + "path": "node_modules/through/package.json" }, { - "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" + "path": "node_modules/domutils/package.json" }, { - "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" + "path": "node_modules/c8/package.json" }, { - "path": ".git/objects/0c/674cb5bc1a0690ddf833dc281de87c358c9848" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" + "path": "node_modules/which/package.json" }, { - "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" + "path": "node_modules/map-obj/package.json" }, { - "path": ".git/objects/50/b85d37bbb081be7945ee98a4bc7cef23a5558b" + "path": "node_modules/function-bind/package.json" }, { - "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" + "path": "node_modules/require-directory/package.json" }, { - "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" + "path": "node_modules/npm-bundled/package.json" }, { - "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" + "path": "node_modules/resolve-from/package.json" }, { - "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" + "path": "node_modules/mime/package.json" }, { - "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" + "path": "node_modules/npm-normalize-package-bin/package.json" }, { - "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" + "path": "node_modules/npm-packlist/package.json" }, { - "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" + "path": "node_modules/setprototypeof/package.json" }, { - "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" + "path": "node_modules/strip-indent/package.json" }, { - "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" + "path": "node_modules/ci-info/package.json" }, { - "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" + "path": "node_modules/ansi-styles/package.json" }, { - "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" + "path": "node_modules/is-promise/package.json" }, { - "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" + "path": "node_modules/server-destroy/package.json" }, { - "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" + "path": "node_modules/mkdirp/package.json" }, { - "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" + "path": "node_modules/mkdirp/node_modules/minimist/package.json" }, { - "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" + "path": "node_modules/yallist/package.json" }, { - "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" + "path": "node_modules/esutils/package.json" }, { - "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" + "path": "node_modules/through2/package.json" }, { - "path": ".git/objects/65/2150f9dc5d675d3cc3aefb5f867f2d9361c189" + "path": "node_modules/es6-promisify/package.json" }, { - "path": "protos/protos.json" + "path": "node_modules/lodash/package.json" }, { - "path": "protos/protos.js" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "protos/protos.d.ts" + "path": "node_modules/depd/package.json" }, { - "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/neo-async/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/gts/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/gts/node_modules/color-name/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/gts/node_modules/color-convert/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "node_modules/gts/node_modules/has-flag/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/gts/node_modules/supports-color/package.json" }, { - "path": "node_modules/yargs/package.json" + "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "node_modules/protobufjs/cli/package.json" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "node_modules/protobufjs/cli/package-lock.json" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" }, { - "path": "node_modules/chai/package.json" + "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/markdown-it/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/statuses/package.json" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/wrappy/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/pack-n-play/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" }, { - "path": "node_modules/ci-info/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/long/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/pathval/package.json" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/progress/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/base64-js/package.json" }, { - "path": "node_modules/lodash.at/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/chownr/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/cli-cursor/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/markdown-it/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/make-dir/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-command/package.json" + "path": "node_modules/make-dir/node_modules/semver/package.json" }, { - "path": "node_modules/execa/node_modules/which/package.json" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/execa/node_modules/is-stream/package.json" + "path": "node_modules/destroy/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" + "path": "node_modules/diff/package.json" }, { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/execa/node_modules/lru-cache/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/execa/node_modules/yallist/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/duplexer3/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/color-name/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/handlebars/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": "node_modules/p-queue/package.json" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/uglify-js/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/pump/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/eventemitter3/package.json" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/minipass/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/minipass/node_modules/yallist/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/assertion-error/package.json" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/flat/package.json" + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/configstore/node_modules/pify/package.json" }, { - "path": "node_modules/esquery/package.json" + "path": "node_modules/configstore/node_modules/make-dir/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/is-ci/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + "path": "node_modules/p-try/package.json" }, { - "path": "node_modules/configstore/node_modules/pify/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/configstore/node_modules/make-dir/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/latest-version/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/deep-eql/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/assertion-error/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/decompress-response/package.json" + }, + { + "path": "node_modules/util-deprecate/package.json" + }, + { + "path": "node_modules/type-detect/package.json" + }, + { + "path": "node_modules/duplexer3/package.json" + }, + { + "path": "node_modules/color-convert/package.json" + }, + { + "path": "node_modules/term-size/package.json" + }, + { + "path": "node_modules/decamelize-keys/package.json" + }, + { + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + }, + { + "path": "node_modules/url-parse-lax/package.json" + }, + { + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/chai/package.json" }, { - "path": "node_modules/deep-eql/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/execa/node_modules/which/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/execa/node_modules/yallist/package.json" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/execa/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/execa/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/execa/node_modules/is-stream/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/execa/node_modules/shebang-command/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/execa/node_modules/lru-cache/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/estraverse/package.json" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/safer-buffer/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": "node_modules/emoji-regex/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/escape-html/package.json" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": "node_modules/eslint/package.json" + "path": "node_modules/fast-diff/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "node_modules/js-yaml/package.json" }, { "path": "node_modules/test-exclude/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/css-what/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/has/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/debug/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/jsdoc/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "node_modules/json-parse-better-errors/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/cli-width/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/doctrine/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/npm-bundled/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/isexe/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/levn/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/npm-normalize-package-bin/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/load-json-file/node_modules/pify/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/pathval/package.json" + }, + { + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/is-symbol/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/word-wrap/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/linkinator/node_modules/color-name/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/linkinator/node_modules/color-convert/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/linkinator/node_modules/has-flag/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/linkinator/node_modules/supports-color/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/tar/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/tar/node_modules/yallist/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/keyv/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/flat/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/fs-minipass/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/jsdoc/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/optimist/package.json" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/optionator/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/redent/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/check-error/package.json" + "path": "node_modules/foreground-child/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/rimraf/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/he/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/minizlib/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/minizlib/node_modules/yallist/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/nice-try/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/agent-base/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/catharsis/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/minipass/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/minipass/node_modules/yallist/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/astral-regex/package.json" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/import-fresh/package.json" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/tar/package.json" + "path": "node_modules/long/package.json" }, { - "path": "node_modules/tar/node_modules/yallist/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "node_modules/protobufjs/package.json" + "path": "node_modules/fs-minipass/package.json" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": "node_modules/retry-request/package.json" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" + "path": "node_modules/gaxios/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" + "path": "node_modules/yargs/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" + "path": "node_modules/yargs/node_modules/find-up/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" + "path": "node_modules/yargs/node_modules/p-locate/package.json" }, { - "path": "node_modules/walkdir/package.json" + "path": "node_modules/yargs/node_modules/path-exists/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/yargs/node_modules/locate-path/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/mdurl/package.json" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/which-module/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/es6-promise/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/wordwrap/package.json" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "node_modules/check-error/package.json" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "node_modules/lru-cache/package.json" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/once/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/get-func-name/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/make-dir/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/make-dir/node_modules/semver/package.json" + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/inquirer/node_modules/string-width/package.json" }, { - "path": "node_modules/uc.micro/package.json" + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "test/gapic-cloud_build-v1.ts" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": ".git/packed-refs" }, { - "path": "node_modules/minimist-options/package.json" + "path": ".git/index" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": ".git/shallow" }, { - "path": "node_modules/signal-exit/package.json" + "path": ".git/config" }, { - "path": "node_modules/mime/package.json" + "path": ".git/HEAD" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": ".git/refs/heads/autosynth" }, { - "path": "node_modules/acorn/package.json" + "path": ".git/refs/heads/master" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "node_modules/p-queue/package.json" + "path": ".git/logs/HEAD" }, { - "path": "node_modules/linkify-it/package.json" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "node_modules/depd/package.json" + "path": ".git/logs/refs/heads/master" }, { - "path": "node_modules/chalk/package.json" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": ".git/objects/77/81f767c558e6ae3fdc91469c93db6ccad3ff73" }, { - "path": "node_modules/has-symbols/package.json" + "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" }, { - "path": "node_modules/typescript/package.json" + "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" }, { - "path": "node_modules/domelementtype/package.json" + "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" }, { - "path": "node_modules/ignore/package.json" + "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" }, { - "path": "node_modules/function-bind/package.json" + "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" }, { - "path": "node_modules/duplexify/package.json" + "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" }, { - "path": "node_modules/nth-check/package.json" + "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" }, { - "path": "node_modules/ansi-align/package.json" + "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" }, { - "path": "node_modules/ajv/package.json" + "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" }, { - "path": "node_modules/util-deprecate/package.json" + "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" }, { - "path": "node_modules/xmlcreate/package.json" + "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" }, { - "path": "node_modules/strip-eof/package.json" + "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" }, { - "path": "node_modules/cliui/package.json" + "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" }, { - "path": "node_modules/figures/package.json" + "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" }, { - "path": "node_modules/chownr/package.json" + "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" }, { - "path": "node_modules/redent/package.json" + "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" }, { - "path": "node_modules/ignore-walk/package.json" + "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" }, { - "path": "node_modules/rc/package.json" + "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" }, { - "path": "node_modules/is-glob/package.json" + "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" }, { - "path": "node_modules/array-find-index/package.json" + "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" }, { - "path": "node_modules/semver-diff/package.json" + "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" }, { - "path": "node_modules/y18n/package.json" + "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" }, { - "path": "node_modules/p-finally/package.json" + "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" }, { - "path": "node_modules/write/package.json" + "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": ".git/objects/5a/05312941dd36a88bf242f6b32d851430da5178" }, { - "path": "node_modules/ansi-regex/package.json" + "path": ".git/objects/5a/bf39660151dc875f5c11bef8eb15f9a2e9c0b5" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" }, { - "path": "node_modules/isexe/package.json" + "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" }, { - "path": "node_modules/ncp/package.json" + "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" }, { - "path": "node_modules/parent-module/package.json" + "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" }, { - "path": "node_modules/cacheable-request/package.json" + "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" }, { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" }, { - "path": "node_modules/prettier/package.json" + "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" }, { - "path": "node_modules/cli-boxes/package.json" + "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" }, { - "path": "node_modules/get-stdin/package.json" + "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" }, { - "path": "node_modules/is-arrayish/package.json" + "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" }, { - "path": "node_modules/pack-n-play/package.json" + "path": ".git/objects/32/bf3c61122301bccb04e7944c003ef2684c7140" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + "path": ".git/objects/23/98e64e2f4bbe337a41b81bdb6ba4074947e596" }, { - "path": "node_modules/convert-source-map/package.json" + "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" }, { - "path": "node_modules/unpipe/package.json" + "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" }, { - "path": "node_modules/path-type/package.json" + "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" }, { - "path": "node_modules/unique-string/package.json" + "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" }, { - "path": "node_modules/package-json/package.json" + "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" }, { - "path": "node_modules/range-parser/package.json" + "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" }, { - "path": "node_modules/lodash.has/package.json" + "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" }, { - "path": "node_modules/concat-map/package.json" + "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" }, { - "path": "node_modules/yallist/package.json" + "path": ".git/objects/40/03ff8956cea9f87b71c708337472dee78b11f6" }, { - "path": "node_modules/etag/package.json" + "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" }, { - "path": "node_modules/is-buffer/package.json" + "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" }, { - "path": "node_modules/text-table/package.json" + "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" }, { - "path": "node_modules/retry-request/package.json" + "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" }, { - "path": "node_modules/yargs-parser/package.json" + "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" }, { - "path": "node_modules/minizlib/package.json" + "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" }, { - "path": "node_modules/minizlib/node_modules/yallist/package.json" + "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" }, { - "path": "node_modules/import-lazy/package.json" + "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" }, { - "path": "node_modules/resolve/package.json" + "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" }, { - "path": "node_modules/core-util-is/package.json" + "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" }, { - "path": "node_modules/tslib/package.json" + "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" }, { - "path": "node_modules/through2/package.json" + "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" }, { - "path": "node_modules/node-forge/package.json" + "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" }, { - "path": "node_modules/global-dirs/package.json" + "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" }, { - "path": "node_modules/flatted/package.json" + "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" }, { - "path": "node_modules/quick-lru/package.json" + "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" }, { - "path": "node_modules/npm-packlist/package.json" + "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" }, { - "path": "node_modules/has/package.json" + "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" }, { - "path": "node_modules/marked/package.json" + "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" }, { - "path": "node_modules/optionator/package.json" + "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" }, { - "path": "node_modules/jwa/package.json" + "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" }, { - "path": "node_modules/estraverse/package.json" + "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" }, { - "path": "node_modules/responselike/package.json" + "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" }, { - "path": "node_modules/neo-async/package.json" + "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" }, { - "path": "node_modules/css-select/package.json" + "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" }, { - "path": "node_modules/destroy/package.json" + "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" }, { - "path": "node_modules/event-target-shim/package.json" + "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" }, { - "path": "node_modules/get-func-name/package.json" + "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" }, { - "path": "node_modules/bluebird/package.json" + "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" }, { - "path": "node_modules/is-obj/package.json" + "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" }, { - "path": "node_modules/table/package.json" + "path": "system-test/.eslintrc.yml" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "system-test/system.js" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "system-test/install.ts" }, { - "path": "node_modules/is-promise/package.json" + "path": ".github/release-please.yml" }, { - "path": "node_modules/type-detect/package.json" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "node_modules/nice-try/package.json" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "node_modules/get-caller-file/package.json" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": ".kokoro/docs.sh" + "path": "samples/package.json" }, { - "path": ".kokoro/system-test.sh" + "path": "samples/.eslintrc.yml" }, { - "path": ".kokoro/common.cfg" + "path": "samples/README.md" }, { - "path": ".kokoro/publish.sh" + "path": "samples/listBuildTriggers.js" }, { - "path": ".kokoro/.gitattributes" + "path": "samples/quickstart.js" }, { - "path": ".kokoro/trampoline.sh" + "path": "samples/system-test/.eslintrc.yml" }, { - "path": ".kokoro/samples-test.sh" + "path": "samples/system-test/samples.js" }, { - "path": ".kokoro/lint.sh" + "path": ".kokoro/trampoline.sh" }, { "path": ".kokoro/test.bat" }, { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": ".kokoro/system-test.sh" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": ".kokoro/.gitattributes" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": ".kokoro/lint.sh" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": ".kokoro/publish.sh" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": ".kokoro/test.sh" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": ".kokoro/docs.sh" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": ".kokoro/samples-test.sh" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": ".kokoro/common.cfg" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": ".kokoro/release/publish.cfg" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": ".kokoro/release/docs.cfg" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": ".kokoro/release/docs.sh" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": ".kokoro/release/docs.sh" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": ".kokoro/release/docs.cfg" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": ".kokoro/release/publish.cfg" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "test/gapic-cloud_build-v1.ts" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "samples/.eslintrc.yml" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "samples/listBuildTriggers.js" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "samples/package.json" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "samples/README.md" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": "samples/quickstart.js" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "samples/system-test/samples.js" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "samples/system-test/.eslintrc.yml" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": ".github/release-please.yml" + "path": "src/index.ts" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "src/v1/cloud_build_client_config.json" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "src/v1/cloud_build_client.ts" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "src/v1/cloud_build_proto_list.json" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "src/v1/index.ts" }, { "path": "build/protos/protos.json" }, { - "path": "build/protos/protos.js" + "path": "build/protos/protos.d.ts" }, { - "path": "build/protos/protos.d.ts" + "path": "build/protos/protos.js" }, { "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" @@ -2339,68 +2360,44 @@ { "path": "build/test/gapic-cloud_build-v1.js" }, - { - "path": "build/system-test/install.js.map" - }, { "path": "build/system-test/install.d.ts" }, { - "path": "build/system-test/install.js" + "path": "build/system-test/install.js.map" }, { - "path": "build/src/index.js.map" + "path": "build/system-test/install.js" }, { "path": "build/src/index.js" }, { - "path": "build/src/index.d.ts" + "path": "build/src/index.js.map" }, { - "path": "build/src/v1/index.js.map" + "path": "build/src/index.d.ts" }, { "path": "build/src/v1/index.js" }, - { - "path": "build/src/v1/cloud_build_client.d.ts" - }, - { - "path": "build/src/v1/cloud_build_client.js" - }, - { - "path": "build/src/v1/index.d.ts" - }, - { - "path": "build/src/v1/cloud_build_client.js.map" - }, { "path": "build/src/v1/cloud_build_client_config.json" }, { - "path": "system-test/.eslintrc.yml" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/system.js" - }, - { - "path": "src/index.ts" + "path": "build/src/v1/cloud_build_client.js.map" }, { - "path": "src/v1/index.ts" + "path": "build/src/v1/cloud_build_client.js" }, { - "path": "src/v1/cloud_build_client.ts" + "path": "build/src/v1/index.js.map" }, { - "path": "src/v1/cloud_build_client_config.json" + "path": "build/src/v1/index.d.ts" }, { - "path": "src/v1/cloud_build_proto_list.json" + "path": "build/src/v1/cloud_build_client.d.ts" } ] } \ No newline at end of file From f7a36e4d17041c0239451de5d33d44d17d0d1f70 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 27 Dec 2019 19:29:13 +0200 Subject: [PATCH 026/223] chore(deps): update dependency eslint-plugin-node to v11 (#39) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 0e84dfed4527..e251f351d332 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -29,7 +29,7 @@ "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^10.0.0", + "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.1", "gts": "^1.1.0", "jsdoc": "^3.6.2", From 054ab4a934daaea091a634724834a70795e03c44 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 28 Dec 2019 19:14:04 +0200 Subject: [PATCH 027/223] chore(deps): update dependency c8 to v7 (#38) --- packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index e251f351d332..55f7e2c46c5a 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -25,7 +25,7 @@ ], "devDependencies": { "@types/mocha": "^5.2.5", - "c8": "^6.0.0", + "c8": "^7.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 0d7d653f5f10..5b6ff9321eee 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -18,7 +18,7 @@ "@google-cloud/cloudbuild": "^1.3.0" }, "devDependencies": { - "c8": "^6.0.1", + "c8": "^7.0.0", "chai": "^4.2.0", "mocha": "^6.0.0" } From 60588c4278aacffed618add1df8d90e30c15cf35 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 29 Dec 2019 14:07:36 -0800 Subject: [PATCH 028/223] chore: update license headers --- packages/google-devtools-cloudbuild/.jsdoc.js | 29 +- .../samples/README.md | 10 +- .../google-devtools-cloudbuild/synth.metadata | 1584 ++++++++--------- 3 files changed, 814 insertions(+), 809 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index c9bc4de76f52..1b1e92dee11e 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -1,18 +1,17 @@ -/*! - * Copyright 2018 Google LLC. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.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. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/README.md b/packages/google-devtools-cloudbuild/samples/README.md index 68549c48b1c0..3283b56839bc 100644 --- a/packages/google-devtools-cloudbuild/samples/README.md +++ b/packages/google-devtools-cloudbuild/samples/README.md @@ -20,6 +20,12 @@ Before running the samples, make sure you've followed the steps outlined in [Using the client library](https://github.com/googleapis/nodejs-cloudbuild#using-the-client-library). +`cd samples` + +`npm install` + +`cd ..` + ## Samples @@ -52,7 +58,7 @@ View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/mast __Usage:__ -`node quickstart.js` +`node samples/quickstart.js` @@ -61,4 +67,4 @@ __Usage:__ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/README.md -[product-docs]: https://cloud.google.com/cloud-build/docs/ \ No newline at end of file +[product-docs]: https://cloud.google.com/cloud-build/docs/ diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0fa322c89dd6..db884505ab3b 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-18T12:11:58.710605Z", + "updateTime": "2019-12-21T12:13:45.715436Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3352100a15ede383f5ab3c34599f7a10a3d066fe", - "internalRef": "286065440" + "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", + "internalRef": "286616241" } }, { @@ -29,2375 +29,2375 @@ } ], "newFiles": [ + { + "path": ".repo-metadata.json" + }, + { + "path": "README.md" + }, { "path": "package.json" }, { - "path": "webpack.config.js" + "path": "CHANGELOG.md" }, { - "path": "linkinator.config.json" + "path": ".gitignore" }, { - "path": ".eslintrc.yml" + "path": "CODE_OF_CONDUCT.md" }, { - "path": ".prettierrc" + "path": "webpack.config.js" }, { - "path": "codecov.yaml" + "path": "CONTRIBUTING.md" }, { - "path": ".gitignore" + "path": ".prettierrc" }, { "path": "package-lock.json" }, { - "path": "tslint.json" + "path": "cloudbuild.yaml" }, { "path": "proto.list" }, { - "path": "tsconfig.json" + "path": ".eslintignore" }, { - "path": ".nycrc" + "path": "linkinator.config.json" }, { - "path": "cloudbuild.yaml" + "path": ".eslintrc.yml" + }, + { + "path": "renovate.json" }, { "path": "synth.metadata" }, { - "path": "CONTRIBUTING.md" + "path": ".prettierignore" }, { - "path": "README.md" + "path": "synth.py" }, { - "path": ".repo-metadata.json" + "path": ".readme-partials.yml" }, { - "path": ".jsdoc.js" + "path": "codecov.yaml" }, { - "path": "renovate.json" + "path": "tslint.json" }, { - "path": "CODE_OF_CONDUCT.md" + "path": ".jsdoc.js" }, { "path": "LICENSE" }, { - "path": ".readme-partials.yml" + "path": ".nycrc" }, { - "path": ".eslintignore" + "path": "tsconfig.json" }, { - "path": ".prettierignore" + "path": "src/index.ts" }, { - "path": "CHANGELOG.md" + "path": "src/v1/cloud_build_client_config.json" }, { - "path": "synth.py" + "path": "src/v1/cloud_build_proto_list.json" }, { - "path": "protos/protos.json" + "path": "src/v1/index.ts" }, { - "path": "protos/protos.d.ts" + "path": "src/v1/cloud_build_client.ts" }, { - "path": "protos/protos.js" + "path": "build/src/index.d.ts" }, { - "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + "path": "build/src/index.js.map" }, { - "path": "node_modules/meow/package.json" + "path": "build/src/index.js" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "build/src/v1/index.d.ts" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "build/src/v1/cloud_build_client_config.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "build/src/v1/index.js.map" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "build/src/v1/index.js" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "build/src/v1/cloud_build_client.d.ts" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "build/src/v1/cloud_build_client.js" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "build/src/v1/cloud_build_client.js.map" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "build/protos/protos.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "build/protos/protos.js" }, { - "path": "node_modules/eslint/package.json" + "path": "build/protos/protos.d.ts" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "build/test/gapic-cloud_build-v1.d.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "build/test/gapic-cloud_build-v1.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "build/test/gapic-cloud_build-v1.js.map" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "build/system-test/install.js.map" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "build/system-test/install.d.ts" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "build/system-test/install.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "__pycache__/synth.cpython-36.pyc" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "samples/README.md" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "samples/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "samples/listBuildTriggers.js" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "samples/.eslintrc.yml" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "samples/quickstart.js" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "samples/system-test/.eslintrc.yml" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "samples/system-test/samples.js" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "node_modules/error-ex/package.json" + "path": ".github/release-please.yml" }, { - "path": "node_modules/safer-buffer/package.json" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": "node_modules/unique-string/package.json" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "node_modules/path-type/package.json" + "path": ".kokoro/test.sh" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": ".kokoro/docs.sh" }, { - "path": "node_modules/esquery/package.json" + "path": ".kokoro/samples-test.sh" }, { - "path": "node_modules/fresh/package.json" + "path": ".kokoro/.gitattributes" }, { - "path": "node_modules/parse5/package.json" + "path": ".kokoro/trampoline.sh" }, { - "path": "node_modules/restore-cursor/package.json" + "path": ".kokoro/lint.sh" }, { - "path": "node_modules/is-windows/package.json" + "path": ".kokoro/publish.sh" }, { - "path": "node_modules/flatted/package.json" + "path": ".kokoro/test.bat" }, { - "path": "node_modules/cliui/package.json" + "path": ".kokoro/common.cfg" }, { - "path": "node_modules/signal-exit/package.json" + "path": ".kokoro/system-test.sh" }, { - "path": "node_modules/resolve/package.json" + "path": ".kokoro/release/docs.cfg" }, { - "path": "node_modules/uc.micro/package.json" + "path": ".kokoro/release/docs.sh" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": ".kokoro/release/publish.cfg" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": ".kokoro/continuous/node10/lint.cfg" }, { - "path": "node_modules/spdx-correct/package.json" + "path": ".kokoro/continuous/node10/docs.cfg" }, { - "path": "node_modules/ms/package.json" + "path": ".kokoro/continuous/node10/test.cfg" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": ".kokoro/continuous/node10/system-test.cfg" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": ".kokoro/continuous/node10/samples-test.cfg" }, { - "path": "node_modules/entities/package.json" + "path": ".kokoro/continuous/node10/common.cfg" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": ".kokoro/continuous/node8/test.cfg" }, { - "path": "node_modules/write/package.json" + "path": ".kokoro/continuous/node8/common.cfg" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": ".kokoro/continuous/node12/test.cfg" }, { - "path": "node_modules/typescript/package.json" + "path": ".kokoro/continuous/node12/common.cfg" }, { - "path": "node_modules/statuses/package.json" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": "node_modules/natural-compare/package.json" + "path": ".kokoro/presubmit/node10/docs.cfg" }, { - "path": "node_modules/onetime/package.json" + "path": ".kokoro/presubmit/node10/test.cfg" }, { - "path": "node_modules/xmlcreate/package.json" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "node_modules/glob/package.json" + "path": ".kokoro/presubmit/node10/samples-test.cfg" }, { - "path": "node_modules/latest-version/package.json" + "path": ".kokoro/presubmit/node10/common.cfg" }, { - "path": "node_modules/y18n/package.json" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": "node_modules/responselike/package.json" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": "node_modules/nth-check/package.json" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": "node_modules/brace-expansion/package.json" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": "node_modules/figures/package.json" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": "node_modules/cli-boxes/package.json" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": "node_modules/normalize-url/package.json" + "path": "protos/protos.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "protos/protos.js" }, { - "path": "node_modules/widest-line/package.json" + "path": "protos/protos.d.ts" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": ".git/packed-refs" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": ".git/HEAD" }, { - "path": "node_modules/through/package.json" + "path": ".git/config" }, { - "path": "node_modules/domutils/package.json" + "path": ".git/index" }, { - "path": "node_modules/c8/package.json" + "path": ".git/shallow" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": ".git/logs/HEAD" }, { - "path": "node_modules/which/package.json" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": "node_modules/map-obj/package.json" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": "node_modules/function-bind/package.json" + "path": ".git/logs/refs/heads/master" }, { - "path": "node_modules/require-directory/package.json" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": "node_modules/npm-bundled/package.json" + "path": ".git/refs/heads/autosynth" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": ".git/refs/heads/master" }, { - "path": "node_modules/resolve-from/package.json" + "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" }, { - "path": "node_modules/mime/package.json" + "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" }, { - "path": "node_modules/npm-normalize-package-bin/package.json" + "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" }, { - "path": "node_modules/npm-packlist/package.json" + "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" }, { - "path": "node_modules/setprototypeof/package.json" + "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" }, { - "path": "node_modules/strip-indent/package.json" + "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" }, { - "path": "node_modules/ci-info/package.json" + "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" }, { - "path": "node_modules/ansi-styles/package.json" + "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" }, { - "path": "node_modules/is-promise/package.json" + "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" }, { - "path": "node_modules/server-destroy/package.json" + "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" }, { - "path": "node_modules/mkdirp/package.json" + "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" }, { - "path": "node_modules/yallist/package.json" + "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" }, { - "path": "node_modules/esutils/package.json" + "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" }, { - "path": "node_modules/through2/package.json" + "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" }, { - "path": "node_modules/es6-promisify/package.json" + "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" }, { - "path": "node_modules/lodash/package.json" + "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" }, { - "path": "node_modules/mimic-fn/package.json" + "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" }, { - "path": "node_modules/depd/package.json" + "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" }, { - "path": "node_modules/is-typedarray/package.json" + "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" }, { - "path": "node_modules/neo-async/package.json" + "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" }, { - "path": "node_modules/gts/package.json" + "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" }, { - "path": "node_modules/protobufjs/package.json" + "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" }, { - "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" + "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" }, { - "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" + "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" }, { - "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" + "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" }, { - "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" + "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" }, { - "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" + "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" }, { - "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" + "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" }, { - "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" + "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": ".git/objects/0f/a322c89dd6bfba2a279c827cca053c4aea1c95" }, { - "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" + "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" }, { - "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" + "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" }, { - "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" + "path": ".git/objects/b6/3393f1aa04ba47170016b27adf7284626b6565" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" }, { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" + "path": ".git/objects/97/57c0728ca161b2e2e391bdb4730e67736ea4bc" }, { - "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" + "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" }, { - "path": "node_modules/p-finally/package.json" + "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" }, { - "path": "node_modules/readable-stream/package.json" + "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" }, { - "path": "node_modules/define-properties/package.json" + "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" }, { - "path": "node_modules/p-limit/package.json" + "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" }, { - "path": "node_modules/wrappy/package.json" + "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" }, { - "path": "node_modules/pack-n-play/package.json" + "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" }, { - "path": "node_modules/ajv/package.json" + "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" }, { - "path": "node_modules/lodash.at/package.json" + "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" }, { - "path": "node_modules/find-up/package.json" + "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" }, { - "path": "node_modules/pify/package.json" + "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" }, { - "path": "node_modules/ansi-regex/package.json" + "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" }, { - "path": "node_modules/is-arrayish/package.json" + "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" }, { - "path": "node_modules/builtin-modules/package.json" + "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": ".git/objects/6c/d72689c2f1645a4642f7a91fdad127c3c4a5dc" }, { - "path": "node_modules/walkdir/package.json" + "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" }, { - "path": "node_modules/progress/package.json" + "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" }, { - "path": "node_modules/base64-js/package.json" + "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" }, { - "path": "node_modules/jwa/package.json" + "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" }, { - "path": "node_modules/chownr/package.json" + "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" }, { - "path": "node_modules/astral-regex/package.json" + "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": ".git/objects/b9/d7f1089bd3dc0f3d53f54015b12bd2bf036c62" }, { - "path": "node_modules/imurmurhash/package.json" + "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" }, { - "path": "node_modules/cli-cursor/package.json" + "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" }, { - "path": "node_modules/markdown-it/package.json" + "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" }, { - "path": "node_modules/esprima/package.json" + "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" }, { - "path": "node_modules/make-dir/package.json" + "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" }, { - "path": "node_modules/make-dir/node_modules/semver/package.json" + "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" }, { - "path": "node_modules/boolbase/package.json" + "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" }, { - "path": "node_modules/destroy/package.json" + "path": ".git/objects/8d/0e7c251ac67f20aad335e8ba1326df5f2fe99f" }, { - "path": "node_modules/diff/package.json" + "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" }, { - "path": "node_modules/camelcase/package.json" + "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" }, { - "path": "node_modules/pseudomap/package.json" + "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" }, { - "path": "node_modules/bluebird/package.json" + "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "test/gapic-cloud_build-v1.ts" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "system-test/.eslintrc.yml" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "system-test/install.ts" }, { - "path": "node_modules/taffydb/package.json" + "path": "system-test/system.js" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/gts/node_modules/has-flag/package.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "node_modules/gts/node_modules/color-name/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/gts/node_modules/color-convert/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/gts/node_modules/supports-color/package.json" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "node_modules/gts/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/update-notifier/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/p-queue/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/minipass/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/minipass/node_modules/yallist/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/type-detect/package.json" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "node_modules/keyv/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/configstore/node_modules/pify/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/configstore/node_modules/make-dir/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/deep-eql/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "node_modules/assertion-error/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/type-detect/package.json" + "path": "node_modules/defer-to-connect/package.json" }, { "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/eslint/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/global-dirs/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/chai/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": "node_modules/execa/node_modules/which/package.json" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": "node_modules/execa/node_modules/yallist/package.json" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": "node_modules/execa/node_modules/is-stream/package.json" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-command/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/execa/node_modules/lru-cache/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/estraverse/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/mdurl/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/resolve-from/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/lodash/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/configstore/node_modules/pify/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/configstore/node_modules/make-dir/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/dot-prop/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/npm-bundled/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/import-fresh/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/array-find-index/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/text-table/package.json" + "path": "node_modules/is-promise/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/semver-diff/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/progress/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/error-ex/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/test-exclude/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/deep-eql/package.json" }, { - "path": "node_modules/yargs-parser/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/wrappy/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/npm-run-path/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/destroy/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/npm-packlist/package.json" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/has/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/uglify-js/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/minipass/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/minipass/node_modules/yallist/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/optimist/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/is-ci/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/json-parse-better-errors/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/pathval/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/catharsis/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/rimraf/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/agent-base/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/ncp/package.json" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/color-name/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/inquirer/node_modules/string-width/package.json" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/isexe/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/color-convert/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/assertion-error/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "node_modules/chai/package.json" }, { "path": "node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/redent/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/pathval/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/depd/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/is-windows/package.json" }, { - "path": "node_modules/tar/package.json" + "path": "node_modules/diff/package.json" }, { - "path": "node_modules/tar/node_modules/yallist/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/linkinator/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/linkinator/node_modules/has-flag/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/linkinator/node_modules/color-name/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/linkinator/node_modules/color-convert/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/linkinator/node_modules/supports-color/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/semver/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/flat/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/domelementtype/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/lru-cache/package.json" }, { - "path": "node_modules/prettier/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/http-errors/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/jsdoc/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/npm-normalize-package-bin/package.json" }, { - "path": "node_modules/optionator/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/setprototypeof/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/load-json-file/node_modules/pify/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/minizlib/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/minizlib/node_modules/yallist/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/quick-lru/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/retry-request/package.json" }, { - "path": "node_modules/nice-try/package.json" + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { - "path": "node_modules/tslib/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/duplexify/package.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": "node_modules/long/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/callsites/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/unpipe/package.json" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/pack-n-play/package.json" }, { - "path": "node_modules/fs-minipass/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/es6-promise/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/doctrine/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/yargs/package.json" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "node_modules/path-type/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/path-type/node_modules/pify/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/fs-minipass/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/p-locate/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/esutils/package.json" }, { - "path": "node_modules/minimist-options/package.json" + "path": "node_modules/which-module/package.json" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/check-error/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/on-finished/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/y18n/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/flat/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/get-func-name/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/typescript/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/mkdirp/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/mkdirp/node_modules/minimist/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/through2/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/get-func-name/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/natural-compare/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "test/gapic-cloud_build-v1.ts" + "path": "node_modules/p-limit/package.json" }, { - "path": ".git/packed-refs" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": ".git/index" + "path": "node_modules/neo-async/package.json" }, { - "path": ".git/shallow" + "path": "node_modules/foreground-child/package.json" }, { - "path": ".git/config" + "path": "node_modules/he/package.json" }, { - "path": ".git/HEAD" + "path": "node_modules/tar/package.json" }, { - "path": ".git/refs/heads/autosynth" + "path": "node_modules/tar/node_modules/yallist/package.json" }, { - "path": ".git/refs/heads/master" + "path": "node_modules/meow/package.json" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": "node_modules/meow/node_modules/locate-path/package.json" }, { - "path": ".git/logs/HEAD" + "path": "node_modules/meow/node_modules/find-up/package.json" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": ".git/logs/refs/heads/master" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": "node_modules/meow/node_modules/path-exists/package.json" }, { - "path": ".git/objects/77/81f767c558e6ae3fdc91469c93db6ccad3ff73" + "path": "node_modules/meow/node_modules/p-locate/package.json" }, { - "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" + "path": "node_modules/meow/node_modules/p-limit/package.json" }, { - "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" + "path": "node_modules/meow/node_modules/p-try/package.json" }, { - "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" + "path": "node_modules/meow/node_modules/read-pkg-up/package.json" }, { - "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" + "path": "node_modules/chownr/package.json" }, { - "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" + "path": "node_modules/toidentifier/package.json" }, { - "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" + "path": "node_modules/execa/package.json" }, { - "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" + "path": "node_modules/execa/node_modules/cross-spawn/package.json" }, { - "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" + "path": "node_modules/execa/node_modules/lru-cache/package.json" }, { - "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" + "path": "node_modules/execa/node_modules/yallist/package.json" }, { - "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" + "path": "node_modules/execa/node_modules/which/package.json" }, { - "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" + "path": "node_modules/execa/node_modules/shebang-regex/package.json" }, { - "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" + "path": "node_modules/execa/node_modules/is-stream/package.json" }, { - "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" + "path": "node_modules/execa/node_modules/shebang-command/package.json" }, { - "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" + "path": "node_modules/levn/package.json" }, { - "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" + "path": "node_modules/unique-string/package.json" }, { - "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" + "path": "node_modules/gaxios/package.json" }, { - "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" + "path": "node_modules/browser-stdout/package.json" }, { - "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" + "path": "node_modules/run-async/package.json" }, { - "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" + "path": "node_modules/cheerio/package.json" }, { - "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" + "path": "node_modules/eslint-utils/package.json" }, { - "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" + "path": "node_modules/prepend-http/package.json" }, { - "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" + "path": "node_modules/define-properties/package.json" }, { - "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" + "path": "node_modules/p-timeout/package.json" }, { - "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" + "path": "node_modules/cli-cursor/package.json" }, { - "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" + "path": "node_modules/pump/package.json" }, { - "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" + "path": "node_modules/escape-html/package.json" }, { - "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" + "path": "node_modules/chardet/package.json" }, { - "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" + "path": "node_modules/js-tokens/package.json" }, { - "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" + "path": "node_modules/chalk/package.json" }, { - "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" + "path": "node_modules/is-regex/package.json" }, { - "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" + "path": "node_modules/ajv/package.json" }, { - "path": ".git/objects/5a/05312941dd36a88bf242f6b32d851430da5178" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": ".git/objects/5a/bf39660151dc875f5c11bef8eb15f9a2e9c0b5" + "path": "node_modules/cli-width/package.json" }, { - "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" + "path": "node_modules/ms/package.json" }, { - "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" + "path": "node_modules/base64-js/package.json" }, { - "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" + "path": "node_modules/encodeurl/package.json" }, { - "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" + "path": "node_modules/json-buffer/package.json" }, { - "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" + "path": "node_modules/gtoken/package.json" }, { - "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" + "path": "node_modules/klaw/package.json" }, { - "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" + "path": "node_modules/dom-serializer/package.json" }, { - "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" + "path": "node_modules/is-symbol/package.json" }, { - "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" + "path": "node_modules/@babel/parser/package.json" }, { - "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": ".git/objects/32/bf3c61122301bccb04e7944c003ef2684c7140" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" + "path": "node_modules/check-error/package.json" }, { - "path": ".git/objects/23/98e64e2f4bbe337a41b81bdb6ba4074947e596" + "path": "node_modules/type-check/package.json" }, { - "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" + "path": "node_modules/iconv-lite/package.json" }, { - "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" + "path": "node_modules/domutils/package.json" }, { - "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" + "path": "node_modules/p-queue/package.json" }, { - "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" + "path": "node_modules/eventemitter3/package.json" }, { - "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" + "path": "node_modules/parse5/package.json" }, { - "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" + "path": "node_modules/flatted/package.json" }, { - "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" + "path": "node_modules/once/package.json" }, { - "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" + "path": "node_modules/brace-expansion/package.json" }, { - "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": ".git/objects/40/03ff8956cea9f87b71c708337472dee78b11f6" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" + "path": "node_modules/restore-cursor/package.json" }, { - "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" + "path": "node_modules/lodash.at/package.json" }, { - "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" + "path": "node_modules/graceful-fs/package.json" }, { - "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" + "path": "node_modules/responselike/package.json" }, { - "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" + "path": "node_modules/pseudomap/package.json" }, { - "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" + "path": "node_modules/espree/package.json" }, { - "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" + "path": "node_modules/word-wrap/package.json" }, { - "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" + "path": "node_modules/normalize-url/package.json" }, { - "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" + "path": "node_modules/wordwrap/package.json" }, { - "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" + "path": "node_modules/ee-first/package.json" }, { - "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" + "path": "node_modules/table/package.json" }, { - "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" + "path": "node_modules/handlebars/package.json" }, { - "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" + "path": "node_modules/protobufjs/package.json" }, { - "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" + "path": "node_modules/protobufjs/cli/package.json" }, { - "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" + "path": "node_modules/protobufjs/cli/package-lock.json" }, { - "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" + "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" }, { - "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" + "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" }, { - "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" }, { - "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" }, { - "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" }, { - "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" + "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" }, { - "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" }, { - "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" + "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" }, { - "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" + "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" }, { - "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" + "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" }, { - "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" + "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" }, { - "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" + "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" }, { - "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" }, { - "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" + "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" }, { - "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" + "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" }, { - "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" + "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" }, { - "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" }, { - "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" }, { - "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "system-test/.eslintrc.yml" + "path": "node_modules/array-find-index/package.json" }, { - "path": "system-test/system.js" + "path": "node_modules/astral-regex/package.json" }, { - "path": "system-test/install.ts" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": ".github/release-please.yml" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "node_modules/test-exclude/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "node_modules/es6-promisify/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "node_modules/p-try/package.json" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "node_modules/optionator/package.json" }, { - "path": "samples/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "samples/.eslintrc.yml" + "path": "node_modules/c8/package.json" }, { - "path": "samples/README.md" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "samples/listBuildTriggers.js" + "path": "node_modules/statuses/package.json" }, { - "path": "samples/quickstart.js" + "path": "node_modules/semver-diff/package.json" }, { - "path": "samples/system-test/.eslintrc.yml" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "samples/system-test/samples.js" + "path": "node_modules/signal-exit/package.json" }, { - "path": ".kokoro/trampoline.sh" + "path": "node_modules/jsdoc/package.json" }, { - "path": ".kokoro/test.bat" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": ".kokoro/system-test.sh" + "path": "node_modules/duplexify/package.json" }, { - "path": ".kokoro/.gitattributes" + "path": "node_modules/tslib/package.json" }, { - "path": ".kokoro/lint.sh" + "path": "node_modules/extend/package.json" }, { - "path": ".kokoro/publish.sh" + "path": "node_modules/css-what/package.json" }, { - "path": ".kokoro/test.sh" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": ".kokoro/docs.sh" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": ".kokoro/samples-test.sh" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": ".kokoro/common.cfg" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": ".kokoro/release/publish.cfg" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": ".kokoro/release/docs.cfg" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": ".kokoro/release/docs.sh" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": "node_modules/markdown-it/package.json" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": "node_modules/minizlib/package.json" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": "node_modules/minizlib/node_modules/yallist/package.json" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": "node_modules/domelementtype/package.json" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": "node_modules/ci-info/package.json" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": "node_modules/@types/mocha/package.json" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": "node_modules/@types/color-name/package.json" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": "node_modules/@types/node/package.json" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": "node_modules/@types/long/package.json" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": "node_modules/serve-static/package.json" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": "node_modules/make-dir/package.json" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": "node_modules/make-dir/node_modules/semver/package.json" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": "node_modules/esquery/package.json" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": "node_modules/ncp/package.json" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": "node_modules/emoji-regex/package.json" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": "node_modules/read-pkg/package.json" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": "node_modules/fast-diff/package.json" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": "node_modules/resolve/package.json" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "src/index.ts" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "src/v1/cloud_build_client_config.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "src/v1/cloud_build_client.ts" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "src/v1/cloud_build_proto_list.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "src/v1/index.ts" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": "build/protos/protos.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "build/protos/protos.d.ts" + "path": "node_modules/p-cancelable/package.json" }, { - "path": "build/protos/protos.js" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + "path": "node_modules/long/package.json" }, { - "path": "build/test/gapic-cloud_build-v1.js.map" + "path": "node_modules/debug/package.json" }, { - "path": "build/test/gapic-cloud_build-v1.d.ts" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "build/test/gapic-cloud_build-v1.js" + "path": "node_modules/isexe/package.json" }, { - "path": "build/system-test/install.d.ts" + "path": "node_modules/uc.micro/package.json" }, { - "path": "build/system-test/install.js.map" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "build/system-test/install.js" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "build/src/index.js" + "path": "node_modules/yargs/package.json" }, { - "path": "build/src/index.js.map" + "path": "node_modules/yargs/node_modules/locate-path/package.json" }, { - "path": "build/src/index.d.ts" + "path": "node_modules/yargs/node_modules/find-up/package.json" }, { - "path": "build/src/v1/index.js" + "path": "node_modules/yargs/node_modules/path-exists/package.json" }, { - "path": "build/src/v1/cloud_build_client_config.json" + "path": "node_modules/yargs/node_modules/p-locate/package.json" }, { - "path": "build/src/v1/cloud_build_client.js.map" + "path": "node_modules/nice-try/package.json" }, { - "path": "build/src/v1/cloud_build_client.js" + "path": "node_modules/has/package.json" }, { - "path": "build/src/v1/index.js.map" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "build/src/v1/index.d.ts" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "build/src/v1/cloud_build_client.d.ts" + "path": "node_modules/jwa/package.json" } ] } \ No newline at end of file From db05338714f1b01bb130e5550ac3d2e7aad92161 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 30 Dec 2019 10:26:44 -0800 Subject: [PATCH 029/223] refactor: use explicit mocha imports (#40) --- packages/google-devtools-cloudbuild/system-test/.eslintrc.yml | 4 ---- packages/google-devtools-cloudbuild/system-test/system.js | 1 + .../google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/system-test/.eslintrc.yml diff --git a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml b/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml deleted file mode 100644 index dc5d9b0171ba..000000000000 --- a/packages/google-devtools-cloudbuild/system-test/.eslintrc.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -env: - mocha: true - diff --git a/packages/google-devtools-cloudbuild/system-test/system.js b/packages/google-devtools-cloudbuild/system-test/system.js index 911f6f78034f..26cd88c2a4cb 100644 --- a/packages/google-devtools-cloudbuild/system-test/system.js +++ b/packages/google-devtools-cloudbuild/system-test/system.js @@ -16,6 +16,7 @@ 'use strict'; const {assert} = require('chai'); +const {describe, it} = require('mocha'); const {CloudBuildClient} = require('../'); const PROJECT_ID = process.env.GCLOUD_PROJECT; const cb = new CloudBuildClient(); diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index 23a42a311494..9d6321b147fe 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -18,6 +18,7 @@ import * as protosTypes from '../protos/protos'; import * as assert from 'assert'; +import {describe, it} from 'mocha'; const cloudbuildModule = require('../src'); const FAKE_STATUS_CODE = 1; From eddbf814dd16d4dff45acac6af5eee1b49e8dec5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 3 Jan 2020 10:27:23 -0800 Subject: [PATCH 030/223] fix: wait for client before checking for terminate --- packages/google-devtools-cloudbuild/.nycrc | 1 + .../protos/protos.d.ts | 2 +- .../protos/protos.js | 2 +- .../src/v1/cloud_build_client.ts | 6 +- .../google-devtools-cloudbuild/synth.metadata | 1781 +++++++++-------- .../system-test/install.ts | 1 + 6 files changed, 1007 insertions(+), 786 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.nycrc b/packages/google-devtools-cloudbuild/.nycrc index 367688844ebf..b18d5472b62b 100644 --- a/packages/google-devtools-cloudbuild/.nycrc +++ b/packages/google-devtools-cloudbuild/.nycrc @@ -12,6 +12,7 @@ "**/scripts", "**/protos", "**/test", + "**/*.d.ts", ".jsdoc.js", "**/.jsdoc.js", "karma.conf.js", diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 9453dc00920e..d56fd7535522 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 5759daef7437..0d1e426854a2 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 3cf09acc2656..e1b31503c179 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -261,6 +261,9 @@ export class CloudBuildClient { for (const methodName of cloudBuildStubMethods) { const innerCallPromise = this.cloudBuildStub.then( stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } return stub[methodName].apply(stub, args); }, (err: Error | null | undefined) => () => { @@ -281,9 +284,6 @@ export class CloudBuildClient { callOptions?: CallOptions, callback?: APICallback ) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } return apiCall(argument, callOptions, callback); }; } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index db884505ab3b..4e624111bd9f 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,12 @@ { - "updateTime": "2019-12-21T12:13:45.715436Z", + "updateTime": "2020-01-03T12:10:13.123156Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "1a380ea21dea9b6ac6ad28c60ad96d9d73574e19", - "internalRef": "286616241" + "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", + "internalRef": "287908369" } }, { @@ -29,143 +29,212 @@ } ], "newFiles": [ + { + "path": "synth.metadata" + }, { "path": ".repo-metadata.json" }, { - "path": "README.md" + "path": "CONTRIBUTING.md" }, { - "path": "package.json" + "path": "linkinator.config.json" }, { - "path": "CHANGELOG.md" + "path": ".prettierignore" + }, + { + "path": "tsconfig.json" + }, + { + "path": ".jsdoc.js" }, { "path": ".gitignore" }, { - "path": "CODE_OF_CONDUCT.md" + "path": "synth.py" }, { - "path": "webpack.config.js" + "path": "CODE_OF_CONDUCT.md" }, { - "path": "CONTRIBUTING.md" + "path": "proto.list" }, { - "path": ".prettierrc" + "path": "README.md" }, { "path": "package-lock.json" }, + { + "path": ".prettierrc" + }, { "path": "cloudbuild.yaml" }, { - "path": "proto.list" + "path": ".readme-partials.yml" }, { - "path": ".eslintignore" + "path": "codecov.yaml" }, { - "path": "linkinator.config.json" + "path": ".nycrc" + }, + { + "path": "package.json" + }, + { + "path": "webpack.config.js" }, { "path": ".eslintrc.yml" }, + { + "path": "tslint.json" + }, { "path": "renovate.json" }, { - "path": "synth.metadata" + "path": "LICENSE" }, { - "path": ".prettierignore" + "path": "CHANGELOG.md" }, { - "path": "synth.py" + "path": ".eslintignore" }, { - "path": ".readme-partials.yml" + "path": ".github/PULL_REQUEST_TEMPLATE.md" }, { - "path": "codecov.yaml" + "path": ".github/release-please.yml" }, { - "path": "tslint.json" + "path": ".github/ISSUE_TEMPLATE/support_request.md" }, { - "path": ".jsdoc.js" + "path": ".github/ISSUE_TEMPLATE/bug_report.md" }, { - "path": "LICENSE" + "path": ".github/ISSUE_TEMPLATE/feature_request.md" }, { - "path": ".nycrc" + "path": ".kokoro/samples-test.sh" }, { - "path": "tsconfig.json" + "path": ".kokoro/system-test.sh" }, { - "path": "src/index.ts" + "path": ".kokoro/docs.sh" }, { - "path": "src/v1/cloud_build_client_config.json" + "path": ".kokoro/lint.sh" }, { - "path": "src/v1/cloud_build_proto_list.json" + "path": ".kokoro/.gitattributes" }, { - "path": "src/v1/index.ts" + "path": ".kokoro/publish.sh" }, { - "path": "src/v1/cloud_build_client.ts" + "path": ".kokoro/trampoline.sh" }, { - "path": "build/src/index.d.ts" + "path": ".kokoro/common.cfg" }, { - "path": "build/src/index.js.map" + "path": ".kokoro/test.bat" }, { - "path": "build/src/index.js" + "path": ".kokoro/test.sh" }, { - "path": "build/src/v1/index.d.ts" + "path": ".kokoro/release/docs.sh" }, { - "path": "build/src/v1/cloud_build_client_config.json" + "path": ".kokoro/release/docs.cfg" }, { - "path": "build/src/v1/index.js.map" + "path": ".kokoro/release/publish.cfg" }, { - "path": "build/src/v1/index.js" + "path": ".kokoro/presubmit/node12/test.cfg" }, { - "path": "build/src/v1/cloud_build_client.d.ts" + "path": ".kokoro/presubmit/node12/common.cfg" }, { - "path": "build/src/v1/cloud_build_client.js" + "path": ".kokoro/presubmit/node8/test.cfg" }, { - "path": "build/src/v1/cloud_build_client.js.map" + "path": ".kokoro/presubmit/node8/common.cfg" }, { - "path": "build/protos/protos.json" + "path": ".kokoro/presubmit/windows/test.cfg" }, { - "path": "build/protos/protos.js" + "path": ".kokoro/presubmit/windows/common.cfg" }, { - "path": "build/protos/protos.d.ts" + "path": ".kokoro/presubmit/node10/lint.cfg" }, { - "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + "path": ".kokoro/presubmit/node10/system-test.cfg" }, { - "path": "build/test/gapic-cloud_build-v1.d.ts" + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": "test/gapic-cloud_build-v1.ts" + }, + { + "path": "system-test/system.js" + }, + { + "path": "system-test/install.ts" }, { "path": "build/test/gapic-cloud_build-v1.js" @@ -174,7 +243,7 @@ "path": "build/test/gapic-cloud_build-v1.js.map" }, { - "path": "build/system-test/install.js.map" + "path": "build/test/gapic-cloud_build-v1.d.ts" }, { "path": "build/system-test/install.d.ts" @@ -183,2221 +252,2371 @@ "path": "build/system-test/install.js" }, { - "path": "__pycache__/synth.cpython-36.pyc" + "path": "build/system-test/install.js.map" }, { - "path": "samples/README.md" + "path": "build/protos/protos.d.ts" }, { - "path": "samples/package.json" + "path": "build/protos/protos.js" }, { - "path": "samples/listBuildTriggers.js" + "path": "build/protos/protos.json" }, { - "path": "samples/.eslintrc.yml" + "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" }, { - "path": "samples/quickstart.js" + "path": "build/src/index.js" }, { - "path": "samples/system-test/.eslintrc.yml" + "path": "build/src/index.js.map" }, { - "path": "samples/system-test/samples.js" + "path": "build/src/index.d.ts" }, { - "path": ".github/PULL_REQUEST_TEMPLATE.md" + "path": "build/src/v1/cloud_build_client.js.map" }, { - "path": ".github/release-please.yml" + "path": "build/src/v1/index.js" }, { - "path": ".github/ISSUE_TEMPLATE/support_request.md" + "path": "build/src/v1/cloud_build_client_config.json" }, { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" + "path": "build/src/v1/index.js.map" }, { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" + "path": "build/src/v1/cloud_build_client.d.ts" }, { - "path": ".kokoro/test.sh" + "path": "build/src/v1/cloud_build_client.js" + }, + { + "path": "build/src/v1/index.d.ts" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + }, + { + "path": ".git/shallow" + }, + { + "path": ".git/HEAD" + }, + { + "path": ".git/config" + }, + { + "path": ".git/packed-refs" + }, + { + "path": ".git/index" + }, + { + "path": ".git/description" + }, + { + "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" + }, + { + "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" + }, + { + "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" + }, + { + "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" + }, + { + "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" + }, + { + "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" + }, + { + "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" + }, + { + "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" + }, + { + "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" + }, + { + "path": ".git/objects/94/2bc9a0c64bdefa04424cb82244cb72e8958a15" + }, + { + "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" + }, + { + "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" + }, + { + "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" + }, + { + "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" + }, + { + "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" + }, + { + "path": ".git/objects/6c/d72689c2f1645a4642f7a91fdad127c3c4a5dc" + }, + { + "path": ".git/objects/6c/250493e42a5dfe5e4f740eed59fa70bc396444" + }, + { + "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" + }, + { + "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" + }, + { + "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" + }, + { + "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" + }, + { + "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" + }, + { + "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" + }, + { + "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" + }, + { + "path": ".git/objects/1b/1e92dee11ee5f63221e42df1912d3691db26af" + }, + { + "path": ".git/objects/af/db0f8a812538990d77cbc2d86c3f9838ef48de" + }, + { + "path": ".git/objects/26/cd88c2a4cbaf2b32a871dad9977659a85773be" + }, + { + "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" + }, + { + "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" + }, + { + "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" + }, + { + "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" + }, + { + "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" + }, + { + "path": ".git/objects/9d/6321b147fecd1ebc6fa8e695384abbcf4ff35e" + }, + { + "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" + }, + { + "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" + }, + { + "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" + }, + { + "path": ".git/objects/32/83b56839bc81510551c2e81098794229290e49" + }, + { + "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" }, { - "path": ".kokoro/docs.sh" + "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" }, { - "path": ".kokoro/samples-test.sh" + "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" }, { - "path": ".kokoro/.gitattributes" + "path": ".git/objects/8f/d1c8bb08d4fde11cec99e1a4f9cbab2ec2249b" }, { - "path": ".kokoro/trampoline.sh" + "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" }, { - "path": ".kokoro/lint.sh" + "path": ".git/objects/db/884505ab3bf6ce552aff66d43e86f2f16259cf" }, { - "path": ".kokoro/publish.sh" + "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" }, { - "path": ".kokoro/test.bat" + "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" }, { - "path": ".kokoro/common.cfg" + "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" }, { - "path": ".kokoro/system-test.sh" + "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" }, { - "path": ".kokoro/release/docs.cfg" + "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" }, { - "path": ".kokoro/release/docs.sh" + "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" }, { - "path": ".kokoro/release/publish.cfg" + "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" }, { - "path": ".kokoro/continuous/node10/lint.cfg" + "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" }, { - "path": ".kokoro/continuous/node10/docs.cfg" + "path": ".git/objects/b6/3393f1aa04ba47170016b27adf7284626b6565" }, { - "path": ".kokoro/continuous/node10/test.cfg" + "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" }, { - "path": ".kokoro/continuous/node10/system-test.cfg" + "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" }, { - "path": ".kokoro/continuous/node10/samples-test.cfg" + "path": ".git/objects/55/f7e2c46c5a2209bde7cc0583073fea122d4959" }, { - "path": ".kokoro/continuous/node10/common.cfg" + "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" }, { - "path": ".kokoro/continuous/node8/test.cfg" + "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" }, { - "path": ".kokoro/continuous/node8/common.cfg" + "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" }, { - "path": ".kokoro/continuous/node12/test.cfg" + "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" }, { - "path": ".kokoro/continuous/node12/common.cfg" + "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" }, { - "path": ".kokoro/presubmit/node10/lint.cfg" + "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" }, { - "path": ".kokoro/presubmit/node10/docs.cfg" + "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" }, { - "path": ".kokoro/presubmit/node10/test.cfg" + "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" }, { - "path": ".kokoro/presubmit/node10/system-test.cfg" + "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" }, { - "path": ".kokoro/presubmit/node10/samples-test.cfg" + "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" }, { - "path": ".kokoro/presubmit/node10/common.cfg" + "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" }, { - "path": ".kokoro/presubmit/node8/test.cfg" + "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" }, { - "path": ".kokoro/presubmit/node8/common.cfg" + "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" }, { - "path": ".kokoro/presubmit/node12/test.cfg" + "path": ".git/objects/8d/0e7c251ac67f20aad335e8ba1326df5f2fe99f" }, { - "path": ".kokoro/presubmit/node12/common.cfg" + "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" }, { - "path": ".kokoro/presubmit/windows/test.cfg" + "path": ".git/objects/0b/769229eb4ee05c5ae7233742aae4225a7a258c" }, { - "path": ".kokoro/presubmit/windows/common.cfg" + "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" }, { - "path": "protos/protos.json" + "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" }, { - "path": "protos/protos.js" + "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" }, { - "path": "protos/protos.d.ts" + "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" }, { - "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" }, { - "path": ".git/packed-refs" + "path": ".git/objects/f9/49bd9068f92e472625a5e147fba0ca87f5782d" }, { - "path": ".git/HEAD" + "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" }, { - "path": ".git/config" + "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" }, { - "path": ".git/index" + "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" }, { - "path": ".git/shallow" + "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" }, { - "path": ".git/logs/HEAD" + "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" }, { - "path": ".git/logs/refs/remotes/origin/HEAD" + "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" }, { - "path": ".git/logs/refs/heads/autosynth" + "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" }, { - "path": ".git/logs/refs/heads/master" + "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" }, { - "path": ".git/refs/remotes/origin/HEAD" + "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" }, { - "path": ".git/refs/heads/autosynth" + "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" }, { - "path": ".git/refs/heads/master" + "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" }, { - "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" + "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" }, { - "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" + "path": ".git/objects/b1/e44f8a750ffaee02a7aaad04c7ca89d36ec9af" }, { - "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" + "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" }, { - "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" + "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" }, { - "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" + "path": ".git/objects/5b/6ff9321eeec70e171dc471ba86922382577e0b" }, { - "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" + "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" }, { - "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" + "path": ".git/objects/14/3b4d59d43fb2b0e9868e3a64681436285a210b" }, { - "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" + "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" }, { - "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" + "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" }, { - "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" + "path": ".git/logs/HEAD" }, { - "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" + "path": ".git/logs/refs/heads/master" }, { - "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" + "path": ".git/logs/refs/heads/autosynth" }, { - "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" + "path": ".git/logs/refs/remotes/origin/HEAD" }, { - "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" + "path": ".git/hooks/update.sample" }, { - "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" + "path": ".git/hooks/pre-push.sample" }, { - "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" + "path": ".git/hooks/pre-rebase.sample" }, { - "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" + "path": ".git/hooks/pre-commit.sample" }, { - "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" + "path": ".git/hooks/applypatch-msg.sample" }, { - "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" + "path": ".git/hooks/post-update.sample" }, { - "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" + "path": ".git/hooks/pre-applypatch.sample" }, { - "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" + "path": ".git/hooks/prepare-commit-msg.sample" }, { - "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" + "path": ".git/hooks/commit-msg.sample" }, { - "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" + "path": ".git/hooks/pre-receive.sample" }, { - "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" + "path": ".git/hooks/fsmonitor-watchman.sample" }, { - "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" + "path": ".git/refs/heads/master" }, { - "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" + "path": ".git/refs/heads/autosynth" }, { - "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" + "path": ".git/refs/remotes/origin/HEAD" }, { - "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" + "path": ".git/info/exclude" }, { - "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" + "path": "src/index.ts" }, { - "path": ".git/objects/0d/7d653f5f106cbdeba7adda6c5c831f5efd9310" + "path": "src/v1/index.ts" }, { - "path": ".git/objects/23/a42a31149444c42df10aff364a5fa669338df6" + "path": "src/v1/cloud_build_client.ts" }, { - "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" + "path": "src/v1/cloud_build_client_config.json" }, { - "path": ".git/objects/0e/84dfed452705c183b314b506d4c010bdedf195" + "path": "src/v1/cloud_build_proto_list.json" }, { - "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" + "path": "node_modules/progress/package.json" }, { - "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" + "path": "node_modules/is-ci/package.json" }, { - "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" + "path": "node_modules/lru-cache/package.json" }, { - "path": ".git/objects/29/af919cd8ab4225aa154770b266e1e828f466f8" + "path": "node_modules/destroy/package.json" }, { - "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" + "path": "node_modules/fast-json-stable-stringify/package.json" }, { - "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" + "path": "node_modules/nice-try/package.json" }, { - "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" + "path": "node_modules/which-module/package.json" }, { - "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" + "path": "node_modules/catharsis/package.json" }, { - "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" + "path": "node_modules/is-promise/package.json" }, { - "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" + "path": "node_modules/v8-compile-cache/package.json" }, { - "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" + "path": "node_modules/doctrine/package.json" }, { - "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" + "path": "node_modules/callsites/package.json" }, { - "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" + "path": "node_modules/diff/package.json" }, { - "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" + "path": "node_modules/hosted-git-info/package.json" }, { - "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" + "path": "node_modules/color-name/package.json" }, { - "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" + "path": "node_modules/defer-to-connect/package.json" }, { - "path": ".git/objects/0f/a322c89dd6bfba2a279c827cca053c4aea1c95" + "path": "node_modules/unpipe/package.json" }, { - "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" + "path": "node_modules/emoji-regex/package.json" }, { - "path": ".git/objects/73/734d46c4effad17b8da9b3ffcc02d0b91d112c" + "path": "node_modules/http-errors/package.json" }, { - "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" + "path": "node_modules/eventemitter3/package.json" }, { - "path": ".git/objects/b6/3393f1aa04ba47170016b27adf7284626b6565" + "path": "node_modules/esutils/package.json" }, { - "path": ".git/objects/91/1f6f78034f6f27edce884e2d1778c45dfdc5a0" + "path": "node_modules/npm-run-path/package.json" }, { - "path": ".git/objects/97/57c0728ca161b2e2e391bdb4730e67736ea4bc" + "path": "node_modules/npm-run-path/node_modules/path-key/package.json" }, { - "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" + "path": "node_modules/he/package.json" }, { - "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" + "path": "node_modules/pack-n-play/package.json" }, { - "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" + "path": "node_modules/pack-n-play/node_modules/tmp/package.json" }, { - "path": ".git/objects/27/08f3c79bb585eeb1b65b3db8f81da5347cfb10" + "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" }, { - "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" + "path": "node_modules/on-finished/package.json" }, { - "path": ".git/objects/ec/fa7d5d0920a0957a10471b8835a3330234b5e2" + "path": "node_modules/linkinator/package.json" }, { - "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" + "path": "node_modules/linkinator/node_modules/update-notifier/package.json" }, { - "path": ".git/objects/dc/5d9b0171ba7334383ac3458b0e70fd15cf5348" + "path": "node_modules/linkinator/node_modules/dot-prop/package.json" }, { - "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" + "path": "node_modules/linkinator/node_modules/redent/package.json" }, { - "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" + "path": "node_modules/linkinator/node_modules/semver-diff/package.json" }, { - "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" + "path": "node_modules/linkinator/node_modules/map-obj/package.json" }, { - "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" + "path": "node_modules/linkinator/node_modules/meow/package.json" }, { - "path": ".git/objects/68/549c48b1c06637755850ff1cc486b5870d8ed1" + "path": "node_modules/linkinator/node_modules/term-size/package.json" }, { - "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" + "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" }, { - "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" + "path": "node_modules/linkinator/node_modules/indent-string/package.json" }, { - "path": ".git/objects/0a/f62311238241718b94492deacba9076ec30cc7" + "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" }, { - "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" + "path": "node_modules/linkinator/node_modules/is-obj/package.json" }, { - "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" + "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" }, { - "path": ".git/objects/c9/bc4de76f52d368104fc0bb593447944b767b36" + "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" }, { - "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" + "path": "node_modules/linkinator/node_modules/boxen/package.json" }, { - "path": ".git/objects/6c/d72689c2f1645a4642f7a91fdad127c3c4a5dc" + "path": "node_modules/linkinator/node_modules/chalk/package.json" }, { - "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" + "path": "node_modules/linkinator/node_modules/arrify/package.json" }, { - "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" + "path": "node_modules/linkinator/node_modules/widest-line/package.json" }, { - "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" + "path": "node_modules/linkinator/node_modules/global-dirs/package.json" }, { - "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" + "path": "node_modules/linkinator/node_modules/parse-json/package.json" }, { - "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" + "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" }, { - "path": ".git/objects/8f/9f31fd275950c502846c6efe7fa038662d6613" + "path": "node_modules/linkinator/node_modules/is-npm/package.json" }, { - "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" + "path": "node_modules/linkinator/node_modules/read-pkg/package.json" }, { - "path": ".git/objects/b9/d7f1089bd3dc0f3d53f54015b12bd2bf036c62" + "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" }, { - "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" + "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" }, { - "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" + "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" }, { - "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" + "path": "node_modules/linkinator/node_modules/semver/package.json" }, { - "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" + "path": "node_modules/linkinator/node_modules/unique-string/package.json" }, { - "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" + "path": "node_modules/linkinator/node_modules/strip-indent/package.json" }, { - "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" + "path": "node_modules/linkinator/node_modules/quick-lru/package.json" }, { - "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" + "path": "node_modules/linkinator/node_modules/minimist-options/package.json" }, { - "path": ".git/objects/8d/0e7c251ac67f20aad335e8ba1326df5f2fe99f" + "path": "node_modules/linkinator/node_modules/configstore/package.json" }, { - "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" + "path": "node_modules/update-notifier/package.json" }, { - "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" + "path": "node_modules/p-cancelable/package.json" }, { - "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" + "path": "node_modules/markdown-it/package.json" }, { - "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" + "path": "node_modules/dot-prop/package.json" }, { - "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" + "path": "node_modules/require-main-filename/package.json" }, { - "path": "test/gapic-cloud_build-v1.ts" + "path": "node_modules/fast-diff/package.json" }, { - "path": "system-test/.eslintrc.yml" + "path": "node_modules/lodash.camelcase/package.json" }, { - "path": "system-test/install.ts" + "path": "node_modules/redent/package.json" }, { - "path": "system-test/system.js" + "path": "node_modules/resolve/package.json" }, { - "path": "node_modules/strip-bom/package.json" + "path": "node_modules/globals/package.json" }, { - "path": "node_modules/string-width/package.json" + "path": "node_modules/range-parser/package.json" }, { - "path": "node_modules/is-callable/package.json" + "path": "node_modules/string.prototype.trimright/package.json" }, { - "path": "node_modules/util-deprecate/package.json" + "path": "node_modules/inflight/package.json" }, { - "path": "node_modules/gts/package.json" + "path": "node_modules/debug/package.json" }, { - "path": "node_modules/gts/node_modules/has-flag/package.json" + "path": "node_modules/htmlparser2/package.json" }, { - "path": "node_modules/gts/node_modules/color-name/package.json" + "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" }, { - "path": "node_modules/gts/node_modules/color-convert/package.json" + "path": "node_modules/semver-diff/package.json" }, { - "path": "node_modules/gts/node_modules/supports-color/package.json" + "path": "node_modules/semver-diff/node_modules/semver/package.json" }, { - "path": "node_modules/gts/node_modules/ansi-styles/package.json" + "path": "node_modules/tsutils/package.json" }, { - "path": "node_modules/gts/node_modules/chalk/package.json" + "path": "node_modules/ms/package.json" }, { - "path": "node_modules/require-directory/package.json" + "path": "node_modules/linkify-it/package.json" }, { - "path": "node_modules/update-notifier/package.json" + "path": "node_modules/through/package.json" }, { - "path": "node_modules/esprima/package.json" + "path": "node_modules/string-width/package.json" }, { - "path": "node_modules/string_decoder/package.json" + "path": "node_modules/html-escaper/package.json" }, { - "path": "node_modules/mocha/package.json" + "path": "node_modules/type-fest/package.json" }, { - "path": "node_modules/mocha/node_modules/locate-path/package.json" + "path": "node_modules/parseurl/package.json" }, { - "path": "node_modules/mocha/node_modules/find-up/package.json" + "path": "node_modules/google-p12-pem/package.json" }, { - "path": "node_modules/mocha/node_modules/diff/package.json" + "path": "node_modules/get-caller-file/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" + "path": "node_modules/klaw/package.json" }, { - "path": "node_modules/mocha/node_modules/supports-color/package.json" + "path": "node_modules/map-obj/package.json" }, { - "path": "node_modules/mocha/node_modules/which/package.json" + "path": "node_modules/node-fetch/package.json" }, { - "path": "node_modules/mocha/node_modules/path-exists/package.json" + "path": "node_modules/jsonexport/package.json" }, { - "path": "node_modules/mocha/node_modules/p-locate/package.json" + "path": "node_modules/isexe/package.json" }, { - "path": "node_modules/mocha/node_modules/glob/package.json" + "path": "node_modules/run-async/package.json" }, { - "path": "node_modules/mocha/node_modules/ms/package.json" + "path": "node_modules/validate-npm-package-license/package.json" }, { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" + "path": "node_modules/file-entry-cache/package.json" }, { - "path": "node_modules/mocha/node_modules/yargs/package.json" + "path": "node_modules/meow/package.json" }, { - "path": "node_modules/core-util-is/package.json" + "path": "node_modules/meow/node_modules/camelcase/package.json" }, { - "path": "node_modules/wrap-ansi/package.json" + "path": "node_modules/meow/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/minimist-options/package.json" + "path": "node_modules/concat-map/package.json" }, { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" + "path": "node_modules/term-size/package.json" }, { - "path": "node_modules/underscore/package.json" + "path": "node_modules/xmlcreate/package.json" }, { - "path": "node_modules/type-detect/package.json" + "path": "node_modules/ansi-regex/package.json" }, { - "path": "node_modules/keyv/package.json" + "path": "node_modules/yallist/package.json" }, { - "path": "node_modules/glob-parent/package.json" + "path": "node_modules/json-bigint/package.json" }, { - "path": "node_modules/walkdir/package.json" + "path": "node_modules/resolve-from/package.json" }, { - "path": "node_modules/@protobufjs/codegen/package.json" + "path": "node_modules/is-buffer/package.json" }, { - "path": "node_modules/@protobufjs/inquire/package.json" + "path": "node_modules/cliui/package.json" }, { - "path": "node_modules/@protobufjs/float/package.json" + "path": "node_modules/toidentifier/package.json" }, { - "path": "node_modules/@protobufjs/base64/package.json" + "path": "node_modules/balanced-match/package.json" }, { - "path": "node_modules/@protobufjs/aspromise/package.json" + "path": "node_modules/marked/package.json" }, { - "path": "node_modules/@protobufjs/eventemitter/package.json" + "path": "node_modules/wrappy/package.json" }, { - "path": "node_modules/@protobufjs/fetch/package.json" + "path": "node_modules/jsdoc-region-tag/package.json" }, { - "path": "node_modules/@protobufjs/utf8/package.json" + "path": "node_modules/json-stable-stringify-without-jsonify/package.json" }, { - "path": "node_modules/@protobufjs/path/package.json" + "path": "node_modules/glob-parent/package.json" }, { - "path": "node_modules/@protobufjs/pool/package.json" + "path": "node_modules/get-func-name/package.json" }, { - "path": "node_modules/global-dirs/package.json" + "path": "node_modules/set-blocking/package.json" }, { - "path": "node_modules/has-flag/package.json" + "path": "node_modules/istanbul-lib-report/package.json" }, { - "path": "node_modules/locate-path/package.json" + "path": "node_modules/load-json-file/package.json" }, { - "path": "node_modules/convert-source-map/package.json" + "path": "node_modules/ansi-align/package.json" }, { - "path": "node_modules/require-main-filename/package.json" + "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/bluebird/package.json" + "path": "node_modules/ansi-align/node_modules/string-width/package.json" }, { - "path": "node_modules/string.prototype.trimleft/package.json" + "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/range-parser/package.json" + "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/defer-to-connect/package.json" + "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" }, { "path": "node_modules/duplexer3/package.json" }, { - "path": "node_modules/indent-string/package.json" + "path": "node_modules/esprima/package.json" }, { - "path": "node_modules/eslint/package.json" + "path": "node_modules/is-stream-ended/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" + "path": "node_modules/minimatch/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" + "path": "node_modules/crypto-random-string/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" + "path": "node_modules/growl/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" + "path": "node_modules/string.prototype.trimleft/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" + "path": "node_modules/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" + "path": "node_modules/normalize-package-data/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" + "path": "node_modules/normalize-package-data/node_modules/semver/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" + "path": "node_modules/fast-text-encoding/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" + "path": "node_modules/tar/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" + "path": "node_modules/tar/node_modules/yallist/package.json" }, { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" + "path": "node_modules/server-destroy/package.json" }, { - "path": "node_modules/eslint/node_modules/path-key/package.json" + "path": "node_modules/prelude-ls/package.json" }, { - "path": "node_modules/eslint/node_modules/which/package.json" + "path": "node_modules/protobufjs/package.json" }, { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" + "path": "node_modules/protobufjs/cli/package-lock.json" }, { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" + "path": "node_modules/protobufjs/cli/package.json" }, { - "path": "node_modules/eslint/node_modules/debug/package.json" + "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" }, { - "path": "node_modules/got/package.json" + "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" }, { - "path": "node_modules/got/node_modules/get-stream/package.json" + "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" }, { - "path": "node_modules/estraverse/package.json" + "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" }, { - "path": "node_modules/mdurl/package.json" + "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" }, { - "path": "node_modules/eslint-plugin-node/package.json" + "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" }, { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" + "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" }, { - "path": "node_modules/resolve-from/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/lodash/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" }, { - "path": "node_modules/strip-ansi/package.json" + "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" }, { - "path": "node_modules/safe-buffer/package.json" + "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" }, { - "path": "node_modules/@szmarczak/http-timer/package.json" + "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" }, { - "path": "node_modules/parent-module/package.json" + "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/object-keys/package.json" + "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" }, { - "path": "node_modules/write/package.json" + "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" }, { - "path": "node_modules/configstore/package.json" + "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" }, { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" + "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" }, { - "path": "node_modules/configstore/node_modules/pify/package.json" + "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" }, { - "path": "node_modules/configstore/node_modules/make-dir/package.json" + "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" }, { - "path": "node_modules/v8-to-istanbul/package.json" + "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" }, { - "path": "node_modules/v8-to-istanbul/node_modules/source-map/package.json" + "path": "node_modules/domhandler/package.json" }, { - "path": "node_modules/dot-prop/package.json" + "path": "node_modules/ansi-escapes/package.json" }, { - "path": "node_modules/tsutils/package.json" + "path": "node_modules/boolbase/package.json" }, { - "path": "node_modules/npm-bundled/package.json" + "path": "node_modules/indent-string/package.json" }, { - "path": "node_modules/import-fresh/package.json" + "path": "node_modules/lodash/package.json" }, { - "path": "node_modules/mute-stream/package.json" + "path": "node_modules/taffydb/package.json" }, { - "path": "node_modules/wide-align/package.json" + "path": "node_modules/extend/package.json" }, { - "path": "node_modules/wide-align/node_modules/string-width/package.json" + "path": "node_modules/is-yarn-global/package.json" }, { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" + "path": "node_modules/dom-serializer/package.json" }, { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" + "path": "node_modules/assertion-error/package.json" }, { - "path": "node_modules/eslint-scope/package.json" + "path": "node_modules/end-of-stream/package.json" }, { - "path": "node_modules/is-promise/package.json" + "path": "node_modules/log-symbols/package.json" }, { - "path": "node_modules/p-finally/package.json" + "path": "node_modules/is-callable/package.json" }, { - "path": "node_modules/js2xmlparser/package.json" + "path": "node_modules/camelcase-keys/package.json" }, { - "path": "node_modules/istanbul-reports/package.json" + "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" }, { - "path": "node_modules/progress/package.json" + "path": "node_modules/decompress-response/package.json" }, { - "path": "node_modules/registry-url/package.json" + "path": "node_modules/js-yaml/package.json" }, { - "path": "node_modules/google-gax/package.json" + "path": "node_modules/cli-boxes/package.json" }, { - "path": "node_modules/mimic-response/package.json" + "path": "node_modules/is-obj/package.json" }, { - "path": "node_modules/figures/package.json" + "path": "node_modules/is-typedarray/package.json" }, { - "path": "node_modules/eslint-config-prettier/package.json" + "path": "node_modules/registry-auth-token/package.json" }, { - "path": "node_modules/argparse/package.json" + "path": "node_modules/read-pkg-up/package.json" }, { - "path": "node_modules/domhandler/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" }, { - "path": "node_modules/error-ex/package.json" + "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" }, { - "path": "node_modules/ansi-colors/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" }, { - "path": "node_modules/safer-buffer/package.json" + "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" }, { - "path": "node_modules/type-fest/package.json" + "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" }, { - "path": "node_modules/strip-indent/package.json" + "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" }, { - "path": "node_modules/boxen/package.json" + "path": "node_modules/buffer-equal-constant-time/package.json" }, { - "path": "node_modules/boxen/node_modules/type-fest/package.json" + "path": "node_modules/@bcoe/v8-coverage/package.json" }, { - "path": "node_modules/flat-cache/package.json" + "path": "node_modules/eslint-scope/package.json" }, { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" + "path": "node_modules/stream-shift/package.json" }, { - "path": "node_modules/has-symbols/package.json" + "path": "node_modules/is-extglob/package.json" }, { - "path": "node_modules/gcp-metadata/package.json" + "path": "node_modules/typedarray-to-buffer/index.js" }, { - "path": "node_modules/deep-eql/package.json" + "path": "node_modules/typedarray-to-buffer/README.md" }, { - "path": "node_modules/ansi-align/package.json" + "path": "node_modules/typedarray-to-buffer/.airtap.yml" }, { - "path": "node_modules/find-up/package.json" + "path": "node_modules/typedarray-to-buffer/.travis.yml" }, { - "path": "node_modules/log-symbols/package.json" + "path": "node_modules/typedarray-to-buffer/package.json" }, { - "path": "node_modules/is-extglob/package.json" + "path": "node_modules/typedarray-to-buffer/LICENSE" }, { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" + "path": "node_modules/typedarray-to-buffer/test/basic.js" }, { - "path": "node_modules/prettier/package.json" + "path": "node_modules/restore-cursor/package.json" }, { - "path": "node_modules/jsonexport/package.json" + "path": "node_modules/mimic-response/package.json" }, { - "path": "node_modules/wrappy/package.json" + "path": "node_modules/normalize-url/package.json" }, { - "path": "node_modules/npm-run-path/package.json" + "path": "node_modules/fresh/package.json" }, { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" + "path": "node_modules/imurmurhash/package.json" }, { - "path": "node_modules/map-obj/package.json" + "path": "node_modules/ajv/package.json" }, { - "path": "node_modules/term-size/package.json" + "path": "node_modules/is-path-inside/package.json" }, { - "path": "node_modules/destroy/package.json" + "path": "node_modules/import-lazy/package.json" }, { - "path": "node_modules/growl/package.json" + "path": "node_modules/json-schema-traverse/package.json" }, { - "path": "node_modules/json-schema-traverse/package.json" + "path": "node_modules/ncp/package.json" }, { - "path": "node_modules/npm-packlist/package.json" + "path": "node_modules/rxjs/package.json" }, { - "path": "node_modules/taffydb/package.json" + "path": "node_modules/p-locate/package.json" + }, + { + "path": "node_modules/figures/package.json" }, { - "path": "node_modules/cross-spawn/package.json" + "path": "node_modules/underscore/package.json" }, { - "path": "node_modules/loud-rejection/package.json" + "path": "node_modules/finalhandler/package.json" }, { - "path": "node_modules/is-glob/package.json" + "path": "node_modules/finalhandler/node_modules/debug/package.json" }, { - "path": "node_modules/get-stream/package.json" + "path": "node_modules/finalhandler/node_modules/ms/package.json" }, { - "path": "node_modules/uglify-js/package.json" + "path": "node_modules/ignore/package.json" }, { - "path": "node_modules/minipass/package.json" + "path": "node_modules/path-is-absolute/package.json" }, { - "path": "node_modules/minipass/node_modules/yallist/package.json" + "path": "node_modules/graceful-fs/package.json" }, { - "path": "node_modules/optimist/package.json" + "path": "node_modules/currently-unhandled/package.json" }, { - "path": "node_modules/cacheable-request/package.json" + "path": "node_modules/minizlib/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" + "path": "node_modules/minizlib/node_modules/yallist/package.json" }, { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" + "path": "node_modules/google-gax/package.json" }, { - "path": "node_modules/is-ci/package.json" + "path": "node_modules/onetime/package.json" }, { - "path": "node_modules/server-destroy/package.json" + "path": "node_modules/path-key/package.json" }, { - "path": "node_modules/json-parse-better-errors/package.json" + "path": "node_modules/core-util-is/package.json" }, { - "path": "node_modules/set-blocking/package.json" + "path": "node_modules/prepend-http/package.json" }, { - "path": "node_modules/pathval/package.json" + "path": "node_modules/write/package.json" }, { - "path": "node_modules/catharsis/package.json" + "path": "node_modules/duplexify/package.json" }, { - "path": "node_modules/rimraf/package.json" + "path": "node_modules/camelcase/package.json" }, { - "path": "node_modules/agent-base/package.json" + "path": "node_modules/error-ex/package.json" }, { - "path": "node_modules/json-bigint/package.json" + "path": "node_modules/boxen/package.json" }, { - "path": "node_modules/spdx-exceptions/package.json" + "path": "node_modules/boxen/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/color-name/package.json" + "path": "node_modules/boxen/node_modules/string-width/package.json" }, { - "path": "node_modules/through/package.json" + "path": "node_modules/boxen/node_modules/type-fest/package.json" }, { - "path": "node_modules/jws/package.json" + "path": "node_modules/boxen/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/inquirer/package.json" + "path": "node_modules/boxen/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/package.json" + "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/inquirer/node_modules/string-width/node_modules/strip-ansi/package.json" + "path": "node_modules/node-environment-flags/package.json" }, { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" + "path": "node_modules/node-environment-flags/node_modules/semver/package.json" }, { - "path": "node_modules/inquirer/node_modules/emoji-regex/package.json" + "path": "node_modules/c8/package.json" }, { - "path": "node_modules/inquirer/node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/gcp-metadata/package.json" }, { - "path": "node_modules/etag/package.json" + "path": "node_modules/json-buffer/package.json" }, { - "path": "node_modules/text-table/package.json" + "path": "node_modules/mkdirp/package.json" }, { - "path": "node_modules/color-convert/package.json" + "path": "node_modules/bluebird/package.json" }, { - "path": "node_modules/assertion-error/package.json" + "path": "node_modules/shebang-command/package.json" }, { - "path": "node_modules/ansi-regex/package.json" + "path": "node_modules/serve-static/package.json" }, { - "path": "node_modules/chai/package.json" + "path": "node_modules/path-parse/package.json" }, { - "path": "node_modules/is-installed-globally/package.json" + "path": "node_modules/mime/package.json" }, { - "path": "node_modules/redent/package.json" + "path": "node_modules/yargs-unparser/package.json" }, { - "path": "node_modules/is-buffer/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" }, { - "path": "node_modules/esrecurse/package.json" + "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/tslint/package.json" + "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" }, { - "path": "node_modules/tslint/node_modules/semver/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/decamelize/package.json" + "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" }, { - "path": "node_modules/parse-json/package.json" + "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" }, { - "path": "node_modules/mime/package.json" + "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" }, { - "path": "node_modules/google-auth-library/package.json" + "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/ignore/package.json" + "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/depd/package.json" + "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/camelcase-keys/package.json" + "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" }, { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" + "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/ansi-escapes/package.json" + "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" }, { - "path": "node_modules/decompress-response/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" }, { - "path": "node_modules/end-of-stream/package.json" + "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" }, { - "path": "node_modules/is-windows/package.json" + "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/diff/package.json" + "path": "node_modules/lines-and-columns/package.json" }, { - "path": "node_modules/tmp/package.json" + "path": "node_modules/chalk/package.json" }, { - "path": "node_modules/source-map/package.json" + "path": "node_modules/chalk/node_modules/color-name/package.json" }, { - "path": "node_modules/is-obj/package.json" + "path": "node_modules/chalk/node_modules/has-flag/package.json" }, { - "path": "node_modules/yargs-parser/package.json" + "path": "node_modules/chalk/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/escape-string-regexp/package.json" + "path": "node_modules/chalk/node_modules/supports-color/package.json" }, { - "path": "node_modules/es-abstract/package.json" + "path": "node_modules/chalk/node_modules/color-convert/package.json" }, { - "path": "node_modules/linkinator/package.json" + "path": "node_modules/locate-path/package.json" }, { - "path": "node_modules/linkinator/node_modules/has-flag/package.json" + "path": "node_modules/spdx-expression-parse/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-name/package.json" + "path": "node_modules/esquery/package.json" }, { - "path": "node_modules/linkinator/node_modules/color-convert/package.json" + "path": "node_modules/to-readable-stream/package.json" }, { - "path": "node_modules/linkinator/node_modules/supports-color/package.json" + "path": "node_modules/chai/package.json" }, { - "path": "node_modules/linkinator/node_modules/ansi-styles/package.json" + "path": "node_modules/jsdoc-fresh/package.json" }, { - "path": "node_modules/linkinator/node_modules/chalk/package.json" + "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" }, { - "path": "node_modules/import-lazy/package.json" + "path": "node_modules/strip-ansi/package.json" }, { - "path": "node_modules/inflight/package.json" + "path": "node_modules/is-arrayish/package.json" }, { - "path": "node_modules/concat-map/package.json" + "path": "node_modules/prettier-linter-helpers/package.json" }, { - "path": "node_modules/object.assign/package.json" + "path": "node_modules/chardet/package.json" }, { - "path": "node_modules/semver/package.json" + "path": "node_modules/http-cache-semantics/package.json" }, { - "path": "node_modules/jsdoc-fresh/package.json" + "path": "node_modules/has-flag/package.json" }, { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" + "path": "node_modules/cheerio/package.json" }, { - "path": "node_modules/is-typedarray/package.json" + "path": "node_modules/domelementtype/package.json" }, { - "path": "node_modules/htmlparser2/package.json" + "path": "node_modules/npm-normalize-package-bin/package.json" }, { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" + "path": "node_modules/@szmarczak/http-timer/package.json" }, { - "path": "node_modules/cli-boxes/package.json" + "path": "node_modules/tmp/package.json" }, { - "path": "node_modules/supports-color/package.json" + "path": "node_modules/entities/package.json" }, { - "path": "node_modules/path-key/package.json" + "path": "node_modules/execa/package.json" }, { - "path": "node_modules/lru-cache/package.json" + "path": "node_modules/execa/node_modules/lru-cache/package.json" }, { - "path": "node_modules/rc/package.json" + "path": "node_modules/execa/node_modules/yallist/package.json" }, { - "path": "node_modules/rc/node_modules/minimist/package.json" + "path": "node_modules/execa/node_modules/shebang-command/package.json" }, { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" + "path": "node_modules/execa/node_modules/is-stream/package.json" }, { - "path": "node_modules/yargs-unparser/package.json" + "path": "node_modules/execa/node_modules/which/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" + "path": "node_modules/execa/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" + "path": "node_modules/execa/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" + "path": "node_modules/strip-bom/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" + "path": "node_modules/argparse/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" + "path": "node_modules/has/package.json" }, { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" + "path": "node_modules/ee-first/package.json" }, { - "path": "node_modules/abort-controller/package.json" + "path": "node_modules/object-inspect/package.json" }, { - "path": "node_modules/http-errors/package.json" + "path": "node_modules/table/package.json" }, { - "path": "node_modules/marked/package.json" + "path": "node_modules/table/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/is-plain-obj/package.json" + "path": "node_modules/table/node_modules/string-width/package.json" }, { - "path": "node_modules/minimatch/package.json" + "path": "node_modules/table/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/send/package.json" + "path": "node_modules/table/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/send/node_modules/mime/package.json" + "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/send/node_modules/ms/package.json" + "path": "node_modules/spdx-correct/package.json" }, { - "path": "node_modules/send/node_modules/debug/package.json" + "path": "node_modules/get-stream/package.json" }, { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" + "path": "node_modules/chownr/package.json" }, { - "path": "node_modules/css-select/package.json" + "path": "node_modules/statuses/package.json" }, { - "path": "node_modules/uri-js/package.json" + "path": "node_modules/@istanbuljs/schema/package.json" }, { - "path": "node_modules/google-p12-pem/package.json" + "path": "node_modules/istanbul-reports/package.json" }, { - "path": "node_modules/npm-normalize-package-bin/package.json" + "path": "node_modules/@grpc/grpc-js/package.json" }, { - "path": "node_modules/spdx-license-ids/package.json" + "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" }, { - "path": "node_modules/yallist/package.json" + "path": "node_modules/@grpc/proto-loader/package.json" }, { - "path": "node_modules/setprototypeof/package.json" + "path": "node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/hosted-git-info/package.json" + "path": "node_modules/etag/package.json" }, { - "path": "node_modules/package-json/package.json" + "path": "node_modules/y18n/package.json" }, { - "path": "node_modules/write-file-atomic/package.json" + "path": "node_modules/eslint-plugin-node/package.json" }, { - "path": "node_modules/external-editor/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" }, { - "path": "node_modules/@sindresorhus/is/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/semver/package.json" }, { - "path": "node_modules/lodash.camelcase/package.json" + "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/arrify/package.json" + "path": "node_modules/natural-compare/package.json" }, { - "path": "node_modules/ansi-styles/package.json" + "path": "node_modules/event-target-shim/package.json" }, { - "path": "node_modules/parseurl/package.json" + "path": "node_modules/arrify/package.json" }, { - "path": "node_modules/boolbase/package.json" + "path": "node_modules/widest-line/package.json" }, { - "path": "node_modules/cliui/package.json" + "path": "node_modules/widest-line/node_modules/string-width/package.json" }, { - "path": "node_modules/balanced-match/package.json" + "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/acorn/package.json" + "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/load-json-file/package.json" + "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/load-json-file/node_modules/pify/package.json" + "path": "node_modules/ignore-walk/package.json" }, { - "path": "node_modules/builtin-modules/package.json" + "path": "node_modules/util-deprecate/package.json" }, { - "path": "node_modules/widest-line/package.json" + "path": "node_modules/function-bind/package.json" }, { - "path": "node_modules/widest-line/node_modules/string-width/package.json" + "path": "node_modules/@types/color-name/package.json" }, { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" + "path": "node_modules/@types/node/package.json" }, { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" + "path": "node_modules/@types/istanbul-lib-coverage/package.json" }, { - "path": "node_modules/which/package.json" + "path": "node_modules/@types/normalize-package-data/package.json" }, { - "path": "node_modules/@bcoe/v8-coverage/package.json" + "path": "node_modules/@types/is-windows/package.json" }, { - "path": "node_modules/prettier-linter-helpers/package.json" + "path": "node_modules/@types/mocha/package.json" }, { - "path": "node_modules/object-inspect/package.json" + "path": "node_modules/@types/minimist/package.json" }, { - "path": "node_modules/retry-request/package.json" + "path": "node_modules/@types/fs-extra/package.json" }, { - "path": "node_modules/retry-request/node_modules/debug/package.json" + "path": "node_modules/@types/long/package.json" }, { - "path": "node_modules/is-arrayish/package.json" + "path": "node_modules/is-windows/package.json" }, { - "path": "node_modules/shebang-regex/package.json" + "path": "node_modules/levn/package.json" }, { - "path": "node_modules/clone-response/package.json" + "path": "node_modules/pseudomap/package.json" }, { - "path": "node_modules/deep-is/package.json" + "path": "node_modules/global-dirs/package.json" }, { - "path": "node_modules/regexpp/package.json" + "path": "node_modules/is-stream/package.json" }, { - "path": "node_modules/node-forge/package.json" + "path": "node_modules/parse-json/package.json" }, { - "path": "node_modules/path-is-absolute/package.json" + "path": "node_modules/xdg-basedir/package.json" }, { - "path": "node_modules/ignore-walk/package.json" + "path": "node_modules/spdx-license-ids/package.json" }, { - "path": "node_modules/finalhandler/package.json" + "path": "node_modules/google-auth-library/package.json" }, { - "path": "node_modules/finalhandler/node_modules/ms/package.json" + "path": "node_modules/brace-expansion/package.json" }, { - "path": "node_modules/finalhandler/node_modules/debug/package.json" + "path": "node_modules/builtin-modules/package.json" }, { - "path": "node_modules/buffer-equal-constant-time/package.json" + "path": "node_modules/tslint/package.json" }, { - "path": "node_modules/path-parse/package.json" + "path": "node_modules/tslint/node_modules/semver/package.json" }, { - "path": "node_modules/decamelize-keys/package.json" + "path": "node_modules/define-properties/package.json" }, { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" + "path": "node_modules/jws/package.json" }, { - "path": "node_modules/os-tmpdir/package.json" + "path": "node_modules/minipass/package.json" }, { - "path": "node_modules/url-parse-lax/package.json" + "path": "node_modules/minipass/node_modules/yallist/package.json" }, { - "path": "node_modules/linkify-it/package.json" + "path": "node_modules/nth-check/package.json" }, { - "path": "node_modules/minimist/package.json" + "path": "node_modules/send/package.json" }, { - "path": "node_modules/fresh/package.json" + "path": "node_modules/send/node_modules/debug/package.json" }, { - "path": "node_modules/is-stream/package.json" + "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" }, { - "path": "node_modules/is-stream-ended/package.json" + "path": "node_modules/send/node_modules/ms/package.json" }, { - "path": "node_modules/slice-ansi/package.json" + "path": "node_modules/send/node_modules/mime/package.json" }, { - "path": "node_modules/onetime/package.json" + "path": "node_modules/require-directory/package.json" }, { - "path": "node_modules/spdx-correct/package.json" + "path": "node_modules/object.assign/package.json" }, { - "path": "node_modules/fast-deep-equal/package.json" + "path": "node_modules/is-npm/package.json" }, { - "path": "node_modules/readable-stream/package.json" + "path": "node_modules/fs-minipass/package.json" }, { - "path": "node_modules/xdg-basedir/package.json" + "path": "node_modules/min-indent/package.json" }, { - "path": "node_modules/v8-compile-cache/package.json" + "path": "node_modules/functional-red-black-tree/package.json" }, { - "path": "node_modules/callsites/package.json" + "path": "node_modules/read-pkg/package.json" }, { - "path": "node_modules/pify/package.json" + "path": "node_modules/registry-url/package.json" }, { - "path": "node_modules/stream-shift/package.json" + "path": "node_modules/is-regex/package.json" }, { - "path": "node_modules/crypto-random-string/package.json" + "path": "node_modules/es-abstract/package.json" }, { - "path": "node_modules/entities/package.json" + "path": "node_modules/parent-module/package.json" }, { - "path": "node_modules/object.getownpropertydescriptors/package.json" + "path": "node_modules/type-detect/package.json" }, { - "path": "node_modules/unpipe/package.json" + "path": "node_modules/signal-exit/package.json" }, { - "path": "node_modules/furi/package.json" + "path": "node_modules/import-fresh/package.json" }, { - "path": "node_modules/pack-n-play/package.json" + "path": "node_modules/keyv/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" + "path": "node_modules/estraverse/package.json" }, { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" + "path": "node_modules/fast-deep-equal/package.json" }, { - "path": "node_modules/strip-eof/package.json" + "path": "node_modules/mute-stream/package.json" }, { - "path": "node_modules/is-path-inside/package.json" + "path": "node_modules/rimraf/package.json" }, { - "path": "node_modules/ini/package.json" + "path": "node_modules/is-installed-globally/package.json" }, { - "path": "node_modules/currently-unhandled/package.json" + "path": "node_modules/get-stdin/package.json" }, { - "path": "node_modules/validate-npm-package-license/package.json" + "path": "node_modules/make-dir/package.json" }, { - "path": "node_modules/bignumber.js/package.json" + "path": "node_modules/make-dir/node_modules/semver/package.json" }, { - "path": "node_modules/is-yarn-global/package.json" + "path": "node_modules/es6-promise/package.json" }, { - "path": "node_modules/lodash.has/package.json" + "path": "node_modules/os-tmpdir/package.json" }, { - "path": "node_modules/camelcase/package.json" + "path": "node_modules/retry-request/package.json" }, { - "path": "node_modules/prelude-ls/package.json" + "path": "node_modules/retry-request/node_modules/debug/package.json" }, { - "path": "node_modules/es6-promise/package.json" + "path": "node_modules/cli-cursor/package.json" }, { - "path": "node_modules/doctrine/package.json" + "path": "node_modules/is-symbol/package.json" }, { - "path": "node_modules/path-exists/package.json" + "path": "node_modules/check-error/package.json" }, { - "path": "node_modules/deep-extend/package.json" + "path": "node_modules/css-what/package.json" }, { - "path": "node_modules/nth-check/package.json" + "path": "node_modules/punycode/package.json" }, { - "path": "node_modules/isarray/package.json" + "path": "node_modules/setprototypeof/package.json" }, { - "path": "node_modules/es-to-primitive/package.json" + "path": "node_modules/word-wrap/package.json" }, { - "path": "node_modules/https-proxy-agent/package.json" + "path": "node_modules/foreground-child/package.json" }, { - "path": "node_modules/eslint-plugin-es/package.json" + "path": "node_modules/package-json/package.json" }, { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" + "path": "node_modules/package-json/node_modules/semver/package.json" }, { - "path": "node_modules/path-type/package.json" + "path": "node_modules/css-select/package.json" }, { - "path": "node_modules/path-type/node_modules/pify/package.json" + "path": "node_modules/path-is-inside/package.json" }, { - "path": "node_modules/fs-minipass/package.json" + "path": "node_modules/eslint-plugin-prettier/package.json" }, { - "path": "node_modules/fast-json-stable-stringify/package.json" + "path": "node_modules/p-finally/package.json" }, { - "path": "node_modules/p-locate/package.json" + "path": "node_modules/inquirer/package.json" }, { - "path": "node_modules/node-fetch/package.json" + "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/registry-auth-token/package.json" + "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/esutils/package.json" + "path": "node_modules/acorn-jsx/package.json" }, { - "path": "node_modules/which-module/package.json" + "path": "node_modules/glob/package.json" }, { - "path": "node_modules/function-bind/package.json" + "path": "node_modules/pathval/package.json" }, { - "path": "node_modules/trim-newlines/package.json" + "path": "node_modules/mocha/package.json" }, { - "path": "node_modules/event-target-shim/package.json" + "path": "node_modules/mocha/node_modules/diff/package.json" }, { - "path": "node_modules/on-finished/package.json" + "path": "node_modules/mocha/node_modules/color-name/package.json" }, { - "path": "node_modules/y18n/package.json" + "path": "node_modules/mocha/node_modules/emoji-regex/package.json" }, { - "path": "node_modules/quick-lru/package.json" + "path": "node_modules/mocha/node_modules/ms/package.json" }, { - "path": "node_modules/js-yaml/package.json" + "path": "node_modules/mocha/node_modules/string-width/package.json" }, { - "path": "node_modules/flat/package.json" + "path": "node_modules/mocha/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/normalize-package-data/package.json" + "path": "node_modules/mocha/node_modules/cliui/package.json" }, { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" + "path": "node_modules/mocha/node_modules/p-locate/package.json" }, { - "path": "node_modules/get-func-name/package.json" + "path": "node_modules/mocha/node_modules/locate-path/package.json" }, { - "path": "node_modules/typescript/package.json" + "path": "node_modules/mocha/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/mkdirp/package.json" + "path": "node_modules/mocha/node_modules/has-flag/package.json" }, { - "path": "node_modules/mkdirp/node_modules/minimist/package.json" + "path": "node_modules/mocha/node_modules/glob/package.json" }, { - "path": "node_modules/fast-text-encoding/package.json" + "path": "node_modules/mocha/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/through2/package.json" + "path": "node_modules/mocha/node_modules/which/package.json" }, { - "path": "node_modules/eslint-visitor-keys/package.json" + "path": "node_modules/mocha/node_modules/supports-color/package.json" }, { - "path": "node_modules/glob/package.json" + "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/inherits/package.json" + "path": "node_modules/mocha/node_modules/find-up/package.json" }, { - "path": "node_modules/string.prototype.trimright/package.json" + "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/punycode/package.json" + "path": "node_modules/mocha/node_modules/path-exists/package.json" }, { - "path": "node_modules/is-date-object/package.json" + "path": "node_modules/mocha/node_modules/yargs/package.json" }, { - "path": "node_modules/sprintf-js/package.json" + "path": "node_modules/mocha/node_modules/color-convert/package.json" }, { - "path": "node_modules/is-npm/package.json" + "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/has-yarn/package.json" + "path": "node_modules/mocha/node_modules/yargs-parser/package.json" }, { - "path": "node_modules/get-stdin/package.json" + "path": "node_modules/loud-rejection/package.json" }, { - "path": "node_modules/shebang-command/package.json" + "path": "node_modules/@protobufjs/codegen/package.json" }, { - "path": "node_modules/imurmurhash/package.json" + "path": "node_modules/@protobufjs/base64/package.json" }, { - "path": "node_modules/globals/package.json" + "path": "node_modules/@protobufjs/utf8/package.json" }, { - "path": "node_modules/latest-version/package.json" + "path": "node_modules/@protobufjs/pool/package.json" }, { - "path": "node_modules/natural-compare/package.json" + "path": "node_modules/@protobufjs/float/package.json" }, { - "path": "node_modules/commander/package.json" + "path": "node_modules/@protobufjs/fetch/package.json" }, { - "path": "node_modules/path-is-inside/package.json" + "path": "node_modules/@protobufjs/path/package.json" }, { - "path": "node_modules/rxjs/package.json" + "path": "node_modules/@protobufjs/aspromise/package.json" }, { - "path": "node_modules/node-environment-flags/package.json" + "path": "node_modules/@protobufjs/inquire/package.json" }, { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" + "path": "node_modules/@protobufjs/eventemitter/package.json" }, { - "path": "node_modules/p-limit/package.json" + "path": "node_modules/node-forge/package.json" }, { - "path": "node_modules/istanbul-lib-coverage/package.json" + "path": "node_modules/lodash.has/package.json" }, { - "path": "node_modules/neo-async/package.json" + "path": "node_modules/has-symbols/package.json" }, { - "path": "node_modules/foreground-child/package.json" + "path": "node_modules/lodash.at/package.json" }, { - "path": "node_modules/he/package.json" + "path": "node_modules/ansi-styles/package.json" }, { - "path": "node_modules/tar/package.json" + "path": "node_modules/ansi-colors/package.json" }, { - "path": "node_modules/tar/node_modules/yallist/package.json" + "path": "node_modules/p-try/package.json" }, { - "path": "node_modules/meow/package.json" + "path": "node_modules/json-parse-better-errors/package.json" }, { - "path": "node_modules/meow/node_modules/locate-path/package.json" + "path": "node_modules/readable-stream/package.json" }, { - "path": "node_modules/meow/node_modules/find-up/package.json" + "path": "node_modules/abort-controller/package.json" }, { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" + "path": "node_modules/which/package.json" }, { - "path": "node_modules/meow/node_modules/camelcase/package.json" + "path": "node_modules/astral-regex/package.json" }, { - "path": "node_modules/meow/node_modules/path-exists/package.json" + "path": "node_modules/minimist/package.json" }, { - "path": "node_modules/meow/node_modules/p-locate/package.json" + "path": "node_modules/clone-response/package.json" }, { - "path": "node_modules/meow/node_modules/p-limit/package.json" + "path": "node_modules/ecdsa-sig-formatter/package.json" }, { - "path": "node_modules/meow/node_modules/p-try/package.json" + "path": "node_modules/requizzle/package.json" }, { - "path": "node_modules/meow/node_modules/read-pkg-up/package.json" + "path": "node_modules/base64-js/package.json" }, { - "path": "node_modules/chownr/package.json" + "path": "node_modules/pify/package.json" }, { - "path": "node_modules/toidentifier/package.json" + "path": "node_modules/object-keys/package.json" }, { - "path": "node_modules/execa/package.json" + "path": "node_modules/trim-newlines/package.json" }, { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" + "path": "node_modules/deep-is/package.json" }, { - "path": "node_modules/execa/node_modules/lru-cache/package.json" + "path": "node_modules/fast-levenshtein/package.json" }, { - "path": "node_modules/execa/node_modules/yallist/package.json" + "path": "node_modules/typescript/package.json" }, { - "path": "node_modules/execa/node_modules/which/package.json" + "path": "node_modules/shebang-regex/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" + "path": "node_modules/eslint-plugin-es/package.json" }, { - "path": "node_modules/execa/node_modules/is-stream/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" }, { - "path": "node_modules/execa/node_modules/shebang-command/package.json" + "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" }, { - "path": "node_modules/levn/package.json" + "path": "node_modules/semver/package.json" }, { "path": "node_modules/unique-string/package.json" }, { - "path": "node_modules/gaxios/package.json" + "path": "node_modules/decamelize/package.json" }, { - "path": "node_modules/browser-stdout/package.json" + "path": "node_modules/acorn/package.json" }, { - "path": "node_modules/run-async/package.json" + "path": "node_modules/wide-align/package.json" }, { - "path": "node_modules/cheerio/package.json" + "path": "node_modules/wide-align/node_modules/string-width/package.json" }, { - "path": "node_modules/eslint-utils/package.json" + "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/prepend-http/package.json" + "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/define-properties/package.json" + "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/p-timeout/package.json" + "path": "node_modules/got/package.json" }, { - "path": "node_modules/cli-cursor/package.json" + "path": "node_modules/got/node_modules/get-stream/package.json" }, { - "path": "node_modules/pump/package.json" + "path": "node_modules/sprintf-js/package.json" }, { - "path": "node_modules/escape-html/package.json" + "path": "node_modules/isarray/package.json" }, { - "path": "node_modules/http-cache-semantics/package.json" + "path": "node_modules/string_decoder/package.json" }, { - "path": "node_modules/to-readable-stream/package.json" + "path": "node_modules/strip-eof/package.json" }, { - "path": "node_modules/chardet/package.json" + "path": "node_modules/p-limit/package.json" }, { - "path": "node_modules/js-tokens/package.json" + "path": "node_modules/url-parse-lax/package.json" }, { - "path": "node_modules/chalk/package.json" + "path": "node_modules/gts/package.json" }, { - "path": "node_modules/chalk/node_modules/supports-color/package.json" + "path": "node_modules/gts/node_modules/chalk/package.json" }, { - "path": "node_modules/is-regex/package.json" + "path": "node_modules/commander/package.json" }, { - "path": "node_modules/ajv/package.json" + "path": "node_modules/mimic-fn/package.json" }, { - "path": "node_modules/spdx-expression-parse/package.json" + "path": "node_modules/https-proxy-agent/package.json" }, { - "path": "node_modules/cli-width/package.json" + "path": "node_modules/ini/package.json" }, { - "path": "node_modules/ms/package.json" + "path": "node_modules/js2xmlparser/package.json" }, { - "path": "node_modules/istanbul-lib-report/package.json" + "path": "node_modules/spdx-exceptions/package.json" }, { - "path": "node_modules/base64-js/package.json" + "path": "node_modules/external-editor/package.json" }, { - "path": "node_modules/encodeurl/package.json" + "path": "node_modules/eslint-utils/package.json" }, { - "path": "node_modules/json-buffer/package.json" + "path": "node_modules/text-table/package.json" }, { - "path": "node_modules/file-entry-cache/package.json" + "path": "node_modules/domutils/package.json" }, { - "path": "node_modules/gtoken/package.json" + "path": "node_modules/supports-color/package.json" }, { - "path": "node_modules/klaw/package.json" + "path": "node_modules/strip-indent/package.json" }, { - "path": "node_modules/functional-red-black-tree/package.json" + "path": "node_modules/fs.realpath/package.json" }, { - "path": "node_modules/dom-serializer/package.json" + "path": "node_modules/parse5/package.json" }, { - "path": "node_modules/is-symbol/package.json" + "path": "node_modules/decamelize-keys/package.json" }, { - "path": "node_modules/@babel/parser/package.json" + "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" }, { - "path": "node_modules/@babel/highlight/package.json" + "path": "node_modules/p-timeout/package.json" }, { - "path": "node_modules/@babel/code-frame/package.json" + "path": "node_modules/espree/package.json" }, { - "path": "node_modules/check-error/package.json" + "path": "node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/type-check/package.json" + "path": "node_modules/responselike/package.json" }, { - "path": "node_modules/iconv-lite/package.json" + "path": "node_modules/esrecurse/package.json" }, { - "path": "node_modules/domutils/package.json" + "path": "node_modules/bignumber.js/package.json" }, { - "path": "node_modules/p-queue/package.json" + "path": "node_modules/source-map/package.json" }, { - "path": "node_modules/eventemitter3/package.json" + "path": "node_modules/find-up/package.json" }, { - "path": "node_modules/parse5/package.json" + "path": "node_modules/es-to-primitive/package.json" }, { - "path": "node_modules/flatted/package.json" + "path": "node_modules/rc/package.json" }, { - "path": "node_modules/once/package.json" + "path": "node_modules/rc/node_modules/minimist/package.json" }, { - "path": "node_modules/brace-expansion/package.json" + "path": "node_modules/rc/node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/jsdoc-region-tag/package.json" + "path": "node_modules/safe-buffer/package.json" }, { - "path": "node_modules/markdown-it-anchor/package.json" + "path": "node_modules/uc.micro/package.json" }, { - "path": "node_modules/restore-cursor/package.json" + "path": "node_modules/flat-cache/package.json" }, { - "path": "node_modules/lodash.at/package.json" + "path": "node_modules/flat-cache/node_modules/rimraf/package.json" }, { - "path": "node_modules/graceful-fs/package.json" + "path": "node_modules/once/package.json" }, { - "path": "node_modules/responselike/package.json" + "path": "node_modules/gtoken/package.json" }, { - "path": "node_modules/pseudomap/package.json" + "path": "node_modules/convert-source-map/package.json" }, { - "path": "node_modules/espree/package.json" + "path": "node_modules/is-date-object/package.json" }, { - "path": "node_modules/word-wrap/package.json" + "path": "node_modules/tslint-config-prettier/package.json" }, { - "path": "node_modules/normalize-url/package.json" + "path": "node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/wordwrap/package.json" + "path": "node_modules/iconv-lite/package.json" }, { - "path": "node_modules/ee-first/package.json" + "path": "node_modules/is-glob/package.json" }, { - "path": "node_modules/table/package.json" + "path": "node_modules/furi/package.json" }, { - "path": "node_modules/handlebars/package.json" + "path": "node_modules/tslib/package.json" }, { - "path": "node_modules/protobufjs/package.json" + "path": "node_modules/markdown-it-anchor/package.json" }, { - "path": "node_modules/protobufjs/cli/package.json" + "path": "node_modules/browser-stdout/package.json" }, { - "path": "node_modules/protobufjs/cli/package-lock.json" + "path": "node_modules/deep-eql/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" + "path": "node_modules/path-type/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" + "path": "node_modules/npm-packlist/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" + "path": "node_modules/pump/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" + "path": "node_modules/process-nextick-args/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" + "path": "node_modules/deep-extend/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" + "path": "node_modules/type-check/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" + "path": "node_modules/jwa/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" + "path": "node_modules/walkdir/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" + "path": "node_modules/hard-rejection/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" + "path": "node_modules/cross-spawn/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" + "path": "node_modules/@sindresorhus/is/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" + "path": "node_modules/wrap-ansi/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" + "path": "node_modules/quick-lru/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" + "path": "node_modules/path-exists/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" + "path": "node_modules/jsdoc/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" + "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" + "path": "node_modules/cacheable-request/package.json" }, { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" + "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" }, { - "path": "node_modules/strip-json-comments/package.json" + "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" }, { - "path": "node_modules/process-nextick-args/package.json" + "path": "node_modules/escape-html/package.json" }, { - "path": "node_modules/array-find-index/package.json" + "path": "node_modules/minimist-options/package.json" }, { - "path": "node_modules/astral-regex/package.json" + "path": "node_modules/minimist-options/node_modules/arrify/package.json" }, { - "path": "node_modules/@grpc/proto-loader/package.json" + "path": "node_modules/latest-version/package.json" }, { - "path": "node_modules/@grpc/grpc-js/package.json" + "path": "node_modules/optionator/package.json" }, { - "path": "node_modules/test-exclude/package.json" + "path": "node_modules/slice-ansi/package.json" }, { - "path": "node_modules/es6-promisify/package.json" + "path": "node_modules/slice-ansi/node_modules/color-name/package.json" }, { - "path": "node_modules/p-try/package.json" + "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" }, { - "path": "node_modules/optionator/package.json" + "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" }, { - "path": "node_modules/requizzle/package.json" + "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" }, { - "path": "node_modules/c8/package.json" + "path": "node_modules/flatted/package.json" }, { - "path": "node_modules/fast-levenshtein/package.json" + "path": "node_modules/inherits/package.json" }, { - "path": "node_modules/statuses/package.json" + "path": "node_modules/depd/package.json" }, { - "path": "node_modules/semver-diff/package.json" + "path": "node_modules/es6-promisify/package.json" }, { - "path": "node_modules/semver-diff/node_modules/semver/package.json" + "path": "node_modules/long/package.json" }, { - "path": "node_modules/signal-exit/package.json" + "path": "node_modules/regexpp/package.json" }, { - "path": "node_modules/jsdoc/package.json" + "path": "node_modules/cli-width/package.json" }, { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" + "path": "node_modules/eslint/package.json" }, { - "path": "node_modules/duplexify/package.json" + "path": "node_modules/eslint/node_modules/debug/package.json" }, { - "path": "node_modules/tslib/package.json" + "path": "node_modules/eslint/node_modules/ansi-regex/package.json" }, { - "path": "node_modules/extend/package.json" + "path": "node_modules/eslint/node_modules/path-key/package.json" }, { - "path": "node_modules/css-what/package.json" + "path": "node_modules/eslint/node_modules/shebang-command/package.json" }, { - "path": "node_modules/ecdsa-sig-formatter/package.json" + "path": "node_modules/eslint/node_modules/strip-ansi/package.json" }, { - "path": "node_modules/typedarray-to-buffer/README.md" + "path": "node_modules/eslint/node_modules/which/package.json" }, { - "path": "node_modules/typedarray-to-buffer/package.json" + "path": "node_modules/eslint/node_modules/shebang-regex/package.json" }, { - "path": "node_modules/typedarray-to-buffer/.travis.yml" + "path": "node_modules/eslint/node_modules/semver/package.json" }, { - "path": "node_modules/typedarray-to-buffer/index.js" + "path": "node_modules/eslint/node_modules/cross-spawn/index.js" }, { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" + "path": "node_modules/eslint/node_modules/cross-spawn/README.md" }, { - "path": "node_modules/typedarray-to-buffer/LICENSE" + "path": "node_modules/eslint/node_modules/cross-spawn/package.json" }, { - "path": "node_modules/typedarray-to-buffer/test/basic.js" + "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" }, { - "path": "node_modules/markdown-it/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" }, { - "path": "node_modules/tslint-config-prettier/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" }, { - "path": "node_modules/minizlib/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" }, { - "path": "node_modules/minizlib/node_modules/yallist/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" }, { - "path": "node_modules/domelementtype/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" }, { - "path": "node_modules/ci-info/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" }, { - "path": "node_modules/@types/mocha/package.json" + "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" }, { - "path": "node_modules/@types/color-name/package.json" + "path": "node_modules/npm-bundled/package.json" }, { - "path": "node_modules/@types/is-windows/package.json" + "path": "node_modules/mdurl/package.json" }, { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" + "path": "node_modules/v8-to-istanbul/package.json" }, { - "path": "node_modules/@types/node/package.json" + "path": "node_modules/object.getownpropertydescriptors/package.json" }, { - "path": "node_modules/@types/long/package.json" + "path": "node_modules/array-find-index/package.json" }, { - "path": "node_modules/serve-static/package.json" + "path": "node_modules/yargs/package.json" }, { - "path": "node_modules/make-dir/package.json" + "path": "node_modules/ci-info/package.json" }, { - "path": "node_modules/make-dir/node_modules/semver/package.json" + "path": "node_modules/color-convert/package.json" }, { - "path": "node_modules/esquery/package.json" + "path": "node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/ncp/package.json" + "path": "node_modules/eslint-visitor-keys/package.json" }, { - "path": "node_modules/emoji-regex/package.json" + "path": "node_modules/agent-base/package.json" }, { - "path": "node_modules/read-pkg/package.json" + "path": "node_modules/flat/package.json" }, { - "path": "node_modules/fast-diff/package.json" + "path": "node_modules/through2/package.json" }, { - "path": "node_modules/resolve/package.json" + "path": "node_modules/gaxios/package.json" }, { - "path": "node_modules/lowercase-keys/package.json" + "path": "node_modules/p-queue/package.json" }, { - "path": "node_modules/is-fullwidth-code-point/package.json" + "path": "node_modules/encodeurl/package.json" }, { - "path": "node_modules/read-pkg-up/package.json" + "path": "node_modules/js-tokens/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" + "path": "node_modules/strip-json-comments/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" + "path": "node_modules/eslint-config-prettier/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" + "path": "node_modules/uri-js/package.json" }, { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" + "path": "node_modules/test-exclude/package.json" }, { - "path": "node_modules/p-cancelable/package.json" + "path": "node_modules/safer-buffer/package.json" }, { - "path": "node_modules/acorn-jsx/package.json" + "path": "node_modules/prettier/package.json" }, { - "path": "node_modules/long/package.json" + "path": "node_modules/yargs-parser/package.json" }, { - "path": "node_modules/debug/package.json" + "path": "node_modules/@babel/code-frame/package.json" }, { - "path": "node_modules/mimic-fn/package.json" + "path": "node_modules/@babel/highlight/package.json" }, { - "path": "node_modules/isexe/package.json" + "path": "node_modules/@babel/parser/package.json" }, { - "path": "node_modules/uc.micro/package.json" + "path": "node_modules/configstore/package.json" }, { - "path": "node_modules/fs.realpath/package.json" + "path": "node_modules/configstore/node_modules/make-dir/package.json" }, { - "path": "node_modules/eslint-plugin-prettier/package.json" + "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" }, { - "path": "node_modules/yargs/package.json" + "path": "node_modules/is-plain-obj/package.json" }, { - "path": "node_modules/yargs/node_modules/locate-path/package.json" + "path": "node_modules/has-yarn/package.json" }, { - "path": "node_modules/yargs/node_modules/find-up/package.json" + "path": "samples/listBuildTriggers.js" }, { - "path": "node_modules/yargs/node_modules/path-exists/package.json" + "path": "samples/README.md" }, { - "path": "node_modules/yargs/node_modules/p-locate/package.json" + "path": "samples/package.json" }, { - "path": "node_modules/nice-try/package.json" + "path": "samples/quickstart.js" }, { - "path": "node_modules/has/package.json" + "path": "samples/.eslintrc.yml" }, { - "path": "node_modules/xmlcreate/package.json" + "path": "samples/system-test/samples.js" }, { - "path": "node_modules/get-caller-file/package.json" + "path": "samples/system-test/.eslintrc.yml" }, { - "path": "node_modules/jwa/package.json" + "path": "__pycache__/synth.cpython-36.pyc" } ] } \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index 2736aee84f78..c9aa74ec2214 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -18,6 +18,7 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { it('should have correct type signature for typescript users', async function() { From 1b66eda290015434e4b84da59b9142eb61ace211 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 6 Jan 2020 18:50:01 +0200 Subject: [PATCH 031/223] chore(deps): update dependency mocha to v7 (#43) --- packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 55f7e2c46c5a..33a32738cd88 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -36,7 +36,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", "linkinator": "^1.4.0", - "mocha": "^6.1.4", + "mocha": "^7.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.17.0", "typescript": "3.6.4" diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 5b6ff9321eee..90f065a91c64 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -20,6 +20,6 @@ "devDependencies": { "c8": "^7.0.0", "chai": "^4.2.0", - "mocha": "^6.0.0" + "mocha": "^7.0.0" } } From 9f8cea7b1721695607b38642eb80ada66b053c90 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2020 10:46:54 -0800 Subject: [PATCH 032/223] chore: release 1.3.1 * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-devtools-cloudbuild/CHANGELOG.md | 8 ++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index d6a27e14bc28..31a939ffdd36 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.3.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.0...v1.3.1) (2020-01-06) + + +### Bug Fixes + +* increase timeout from 20s to 60s ([#35](https://www.github.com/googleapis/nodejs-cloudbuild/issues/35)) ([b9d7f10](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b9d7f1089bd3dc0f3d53f54015b12bd2bf036c62)) +* wait for client before checking for terminate ([35c1905](https://www.github.com/googleapis/nodejs-cloudbuild/commit/35c19050bd7594301df14ffa182fc6e6e73c1d64)) + ## [1.3.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.2.0...v1.3.0) (2019-12-11) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 33a32738cd88..32e559ddd934 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.3.0", + "version": "1.3.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 90f065a91c64..92be91d7466d 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.3.0" + "@google-cloud/cloudbuild": "^1.3.1" }, "devDependencies": { "c8": "^7.0.0", From f0895fded745dfdc135b06402b69709e28c69512 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 23 Jan 2020 16:24:23 -0800 Subject: [PATCH 033/223] chore: clear synth.metadata --- .../google-devtools-cloudbuild/synth.metadata | 2622 ----------------- 1 file changed, 2622 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/synth.metadata diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata deleted file mode 100644 index 4e624111bd9f..000000000000 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ /dev/null @@ -1,2622 +0,0 @@ -{ - "updateTime": "2020-01-03T12:10:13.123156Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4d45a6399e9444fbddaeb1c86aabfde210723714", - "internalRef": "287908369" - } - }, - { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2019.10.17" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "cloudbuild", - "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" - } - } - ], - "newFiles": [ - { - "path": "synth.metadata" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "linkinator.config.json" - }, - { - "path": ".prettierignore" - }, - { - "path": "tsconfig.json" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".gitignore" - }, - { - "path": "synth.py" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "proto.list" - }, - { - "path": "README.md" - }, - { - "path": "package-lock.json" - }, - { - "path": ".prettierrc" - }, - { - "path": "cloudbuild.yaml" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": "codecov.yaml" - }, - { - "path": ".nycrc" - }, - { - "path": "package.json" - }, - { - "path": "webpack.config.js" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": "tslint.json" - }, - { - "path": "renovate.json" - }, - { - "path": "LICENSE" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": ".eslintignore" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": "test/gapic-cloud_build-v1.ts" - }, - { - "path": "system-test/system.js" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "build/test/gapic-cloud_build-v1.js" - }, - { - "path": "build/test/gapic-cloud_build-v1.js.map" - }, - { - "path": "build/test/gapic-cloud_build-v1.d.ts" - }, - { - "path": "build/system-test/install.d.ts" - }, - { - "path": "build/system-test/install.js" - }, - { - "path": "build/system-test/install.js.map" - }, - { - "path": "build/protos/protos.d.ts" - }, - { - "path": "build/protos/protos.js" - }, - { - "path": "build/protos/protos.json" - }, - { - "path": "build/protos/google/devtools/cloudbuild/v1/cloudbuild.proto" - }, - { - "path": "build/src/index.js" - }, - { - "path": "build/src/index.js.map" - }, - { - "path": "build/src/index.d.ts" - }, - { - "path": "build/src/v1/cloud_build_client.js.map" - }, - { - "path": "build/src/v1/index.js" - }, - { - "path": "build/src/v1/cloud_build_client_config.json" - }, - { - "path": "build/src/v1/index.js.map" - }, - { - "path": "build/src/v1/cloud_build_client.d.ts" - }, - { - "path": "build/src/v1/cloud_build_client.js" - }, - { - "path": "build/src/v1/index.d.ts" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" - }, - { - "path": ".git/shallow" - }, - { - "path": ".git/HEAD" - }, - { - "path": ".git/config" - }, - { - "path": ".git/packed-refs" - }, - { - "path": ".git/index" - }, - { - "path": ".git/description" - }, - { - "path": ".git/objects/3a/6963d4116328f0d6ef02c263eee4f0e09126ec" - }, - { - "path": ".git/objects/d6/e25e0b1b8e1326666bff681406e3d470b4d626" - }, - { - "path": ".git/objects/d6/45695673349e3947e8e5ae42332d0ac3164cd7" - }, - { - "path": ".git/objects/d6/a27e14bc28438c9e4521f55fc186a1536af3ee" - }, - { - "path": ".git/objects/5c/575f4a8be7974b2e10eb325ca61cde677cdbda" - }, - { - "path": ".git/objects/de/1ed79676e4ad65edc3bbf99408e2e0f6bbc7d3" - }, - { - "path": ".git/objects/85/344b92c7f444698f87bdafba2dc85deae40f52" - }, - { - "path": ".git/objects/b5/23e7c7f620fec581bde35de020c9de47ba1204" - }, - { - "path": ".git/objects/bf/8250ac8bfec3959ddb59fd9cbf6434ff35956b" - }, - { - "path": ".git/objects/94/2bc9a0c64bdefa04424cb82244cb72e8958a15" - }, - { - "path": ".git/objects/94/a67ba9028ef1c05f8fd94681e89483f94467de" - }, - { - "path": ".git/objects/94/53dc00920ed286cb8674c8c045c65f6a18dd2c" - }, - { - "path": ".git/objects/3c/0b9963c1cb317f62b0e2c604bc76a474b369f0" - }, - { - "path": ".git/objects/3c/f09acc2656c7ba14677ea74beb8d08678cee32" - }, - { - "path": ".git/objects/83/f09828973f324d0d48e3e1080702a62e394ea2" - }, - { - "path": ".git/objects/6c/d72689c2f1645a4642f7a91fdad127c3c4a5dc" - }, - { - "path": ".git/objects/6c/250493e42a5dfe5e4f740eed59fa70bc396444" - }, - { - "path": ".git/objects/a8/44a633044f1f728bb1e4c41c0893b7d083eab0" - }, - { - "path": ".git/objects/99/5869032125fb2e0d6830a2898ea07e0c061499" - }, - { - "path": ".git/objects/31/0eac8991801f102ad13be7101e3d8be28f1d51" - }, - { - "path": ".git/objects/cf/d0283c699f47c85a2beeaeb33aa836c5d1388b" - }, - { - "path": ".git/objects/27/36aee84f7841ba8a330187a1398371a8ca199b" - }, - { - "path": ".git/objects/27/c830d36f88ccc1f92b6beb7b0e00f51a7e262c" - }, - { - "path": ".git/objects/fe/baf2b674f00479a071c1430d88094f84b0f649" - }, - { - "path": ".git/objects/1b/1e92dee11ee5f63221e42df1912d3691db26af" - }, - { - "path": ".git/objects/af/db0f8a812538990d77cbc2d86c3f9838ef48de" - }, - { - "path": ".git/objects/26/cd88c2a4cbaf2b32a871dad9977659a85773be" - }, - { - "path": ".git/objects/dc/acf321fbc1c41ff694956db35aae77d7890517" - }, - { - "path": ".git/objects/f7/dd862b279f18be62052016ee9eca624dc9038a" - }, - { - "path": ".git/objects/33/99c5b05c401f7ab610beae5b6bcee2cece5ba5" - }, - { - "path": ".git/objects/82/2129f604c63d5cd97a017f450c8536843f505d" - }, - { - "path": ".git/objects/21/b93f487118858fa8f2526ef144ce58045f403c" - }, - { - "path": ".git/objects/9d/6321b147fecd1ebc6fa8e695384abbcf4ff35e" - }, - { - "path": ".git/objects/9d/b11bb09d6937c11499d0a9026233ec18c78858" - }, - { - "path": ".git/objects/fa/27b3415abdb7a564de231407ab040c861badc5" - }, - { - "path": ".git/objects/fa/775cf036aa3a7f4e1ac5c3cbb3fae8fd8f2432" - }, - { - "path": ".git/objects/32/83b56839bc81510551c2e81098794229290e49" - }, - { - "path": ".git/objects/5f/578c552282f0b786ca5c102e7f1782097e3fe4" - }, - { - "path": ".git/objects/95/2403faedeef1cee177bba1e7fd72dfdb6d7a6e" - }, - { - "path": ".git/objects/95/18bf36fdc6ce82ad08aed4f8d8f8c97bf705e7" - }, - { - "path": ".git/objects/8f/d1c8bb08d4fde11cec99e1a4f9cbab2ec2249b" - }, - { - "path": ".git/objects/87/acd4f484eef3f4d1703deeee61eac213682058" - }, - { - "path": ".git/objects/db/884505ab3bf6ce552aff66d43e86f2f16259cf" - }, - { - "path": ".git/objects/46/b2a08ea6d1728faf0f111691adde837a0239a7" - }, - { - "path": ".git/objects/46/8b8c7197ae5d857234e9bb81b76be3e30dc7ff" - }, - { - "path": ".git/objects/a2/dbc6aa9d43525f448c2fc0e03b681ecf694c81" - }, - { - "path": ".git/objects/30/374c2a734bf58350a7789abe7efa672e872edf" - }, - { - "path": ".git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391" - }, - { - "path": ".git/objects/1c/f045394e33c436848211f164179f9ad2f5c5e4" - }, - { - "path": ".git/objects/ef/522572f3bc928b1c1ba8c668c04a7c616f0ef1" - }, - { - "path": ".git/objects/0f/7116521ae0d985dcbdbe5f22f1933088617713" - }, - { - "path": ".git/objects/b6/3393f1aa04ba47170016b27adf7284626b6565" - }, - { - "path": ".git/objects/fc/5824e6667aeeee5f833dae00a87539d360a1ac" - }, - { - "path": ".git/objects/df/6eac074460d9207249e4317071f9cb1726c228" - }, - { - "path": ".git/objects/55/f7e2c46c5a2209bde7cc0583073fea122d4959" - }, - { - "path": ".git/objects/20/e3241c9e9b2997cbe7065cfa14f2418efcfd63" - }, - { - "path": ".git/objects/61/a40c376a33428ecff32ec68969248fbcfaedc2" - }, - { - "path": ".git/objects/61/3d35597b5a36e0c293d6a0a0ae58b9793ad3a1" - }, - { - "path": ".git/objects/61/7dc975bae89aeee4632ded9ae02ccdf7eb3139" - }, - { - "path": ".git/objects/25/08c951757016bdb13bcff9ebe5f5dfe867a992" - }, - { - "path": ".git/objects/f0/095101bff1f48614cf870538ab352e38214b42" - }, - { - "path": ".git/objects/67/60e4ce984dbcf321e93ced7a9bd2d8f8e2d1df" - }, - { - "path": ".git/objects/5e/b32ed97154e2abf6f29d12034b9cc0e47be9bf" - }, - { - "path": ".git/objects/da/5a1357c305f2007cb6c6b3d23779d0457eafba" - }, - { - "path": ".git/objects/da/14df41bd996fcc5484e56ed60042b14a621e86" - }, - { - "path": ".git/objects/73/eeec27612d4e7fccfdbf97b7ce79b0b82e2525" - }, - { - "path": ".git/objects/f8/04a255e5c4085847e516ac35fa73161e08d71e" - }, - { - "path": ".git/objects/9b/d4905c4b591a45bb8905beb718f89fc1b35daf" - }, - { - "path": ".git/objects/8d/0e7c251ac67f20aad335e8ba1326df5f2fe99f" - }, - { - "path": ".git/objects/e9/06ac8349811332ab539953bcbf6ec893631fd8" - }, - { - "path": ".git/objects/0b/769229eb4ee05c5ae7233742aae4225a7a258c" - }, - { - "path": ".git/objects/4a/0465b4fd35472212f120c20614e04ac2d72ebd" - }, - { - "path": ".git/objects/c0/71600c336abba44c8cdb87003f12c6abd22633" - }, - { - "path": ".git/objects/e2/5f7f469835fefc883b872bf2490d660f4f8aa2" - }, - { - "path": ".git/objects/c9/dac9192f4dea3537586dc03a36879603e4abb8" - }, - { - "path": ".git/objects/f9/5068dcfe8fa064228fad9639c8061bc5214d00" - }, - { - "path": ".git/objects/f9/49bd9068f92e472625a5e147fba0ca87f5782d" - }, - { - "path": ".git/objects/4d/3a0868531a8d2a326c034645720d9a4456e860" - }, - { - "path": ".git/objects/e1/a76628b3075131f82ae445e103e4c930c10792" - }, - { - "path": ".git/objects/ab/abd08503598cd91f6464156e6f849034a6fb9a" - }, - { - "path": ".git/objects/09/b31fe735a0b8ec9e81db4225552b738fe21dbc" - }, - { - "path": ".git/objects/36/7688844ebf4b5ff213f4473663d231767953c1" - }, - { - "path": ".git/objects/f6/fac98b0a8e7c9a222d4dbfdc6efb7ffdb30061" - }, - { - "path": ".git/objects/f6/c4cf010e34c952b47ec9777a0649c8cbe71ef2" - }, - { - "path": ".git/objects/63/65857f33c6c4c98eb292cf87dcfa000b301fb9" - }, - { - "path": ".git/objects/63/6b6ce016bf37d8b047b55f01dee7dc4ea23501" - }, - { - "path": ".git/objects/fd/dff757050d447a37543f802e457374f5f14771" - }, - { - "path": ".git/objects/79/f6ff1b3aeb74bdd21e822fd0338ee0eaf6572f" - }, - { - "path": ".git/objects/b0/3cb0439a6e9c1992e40adf14626cc284a12158" - }, - { - "path": ".git/objects/b1/e44f8a750ffaee02a7aaad04c7ca89d36ec9af" - }, - { - "path": ".git/objects/57/24ea9478d717c05010eae9ac2dbd62fc0d8324" - }, - { - "path": ".git/objects/57/59daef74376da399987da53ccdc421bf800954" - }, - { - "path": ".git/objects/5b/6ff9321eeec70e171dc471ba86922382577e0b" - }, - { - "path": ".git/objects/37/d55158e17f256e620a7440d7155b56b2036fcd" - }, - { - "path": ".git/objects/14/3b4d59d43fb2b0e9868e3a64681436285a210b" - }, - { - "path": ".git/objects/d7/80d6bfff5a4893de8b6296807b380c50fa91bc" - }, - { - "path": ".git/objects/65/ec74ac4ce2c7f5b4fe92d3d8ae6a2875fbecdf" - }, - { - "path": ".git/logs/HEAD" - }, - { - "path": ".git/logs/refs/heads/master" - }, - { - "path": ".git/logs/refs/heads/autosynth" - }, - { - "path": ".git/logs/refs/remotes/origin/HEAD" - }, - { - "path": ".git/hooks/update.sample" - }, - { - "path": ".git/hooks/pre-push.sample" - }, - { - "path": ".git/hooks/pre-rebase.sample" - }, - { - "path": ".git/hooks/pre-commit.sample" - }, - { - "path": ".git/hooks/applypatch-msg.sample" - }, - { - "path": ".git/hooks/post-update.sample" - }, - { - "path": ".git/hooks/pre-applypatch.sample" - }, - { - "path": ".git/hooks/prepare-commit-msg.sample" - }, - { - "path": ".git/hooks/commit-msg.sample" - }, - { - "path": ".git/hooks/pre-receive.sample" - }, - { - "path": ".git/hooks/fsmonitor-watchman.sample" - }, - { - "path": ".git/refs/heads/master" - }, - { - "path": ".git/refs/heads/autosynth" - }, - { - "path": ".git/refs/remotes/origin/HEAD" - }, - { - "path": ".git/info/exclude" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "src/v1/cloud_build_client.ts" - }, - { - "path": "src/v1/cloud_build_client_config.json" - }, - { - "path": "src/v1/cloud_build_proto_list.json" - }, - { - "path": "node_modules/progress/package.json" - }, - { - "path": "node_modules/is-ci/package.json" - }, - { - "path": "node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/destroy/package.json" - }, - { - "path": "node_modules/fast-json-stable-stringify/package.json" - }, - { - "path": "node_modules/nice-try/package.json" - }, - { - "path": "node_modules/which-module/package.json" - }, - { - "path": "node_modules/catharsis/package.json" - }, - { - "path": "node_modules/is-promise/package.json" - }, - { - "path": "node_modules/v8-compile-cache/package.json" - }, - { - "path": "node_modules/doctrine/package.json" - }, - { - "path": "node_modules/callsites/package.json" - }, - { - "path": "node_modules/diff/package.json" - }, - { - "path": "node_modules/hosted-git-info/package.json" - }, - { - "path": "node_modules/color-name/package.json" - }, - { - "path": "node_modules/defer-to-connect/package.json" - }, - { - "path": "node_modules/unpipe/package.json" - }, - { - "path": "node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/http-errors/package.json" - }, - { - "path": "node_modules/eventemitter3/package.json" - }, - { - "path": "node_modules/esutils/package.json" - }, - { - "path": "node_modules/npm-run-path/package.json" - }, - { - "path": "node_modules/npm-run-path/node_modules/path-key/package.json" - }, - { - "path": "node_modules/he/package.json" - }, - { - "path": "node_modules/pack-n-play/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/package.json" - }, - { - "path": "node_modules/pack-n-play/node_modules/tmp/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/on-finished/package.json" - }, - { - "path": "node_modules/linkinator/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/redent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/meow/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/term-size/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/indent-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-obj/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/boxen/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/chalk/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/arrify/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/widest-line/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/parse-json/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-npm/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/read-pkg/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/semver/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/unique-string/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/linkinator/node_modules/configstore/package.json" - }, - { - "path": "node_modules/update-notifier/package.json" - }, - { - "path": "node_modules/p-cancelable/package.json" - }, - { - "path": "node_modules/markdown-it/package.json" - }, - { - "path": "node_modules/dot-prop/package.json" - }, - { - "path": "node_modules/require-main-filename/package.json" - }, - { - "path": "node_modules/fast-diff/package.json" - }, - { - "path": "node_modules/lodash.camelcase/package.json" - }, - { - "path": "node_modules/redent/package.json" - }, - { - "path": "node_modules/resolve/package.json" - }, - { - "path": "node_modules/globals/package.json" - }, - { - "path": "node_modules/range-parser/package.json" - }, - { - "path": "node_modules/string.prototype.trimright/package.json" - }, - { - "path": "node_modules/inflight/package.json" - }, - { - "path": "node_modules/debug/package.json" - }, - { - "path": "node_modules/htmlparser2/package.json" - }, - { - "path": "node_modules/htmlparser2/node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/semver-diff/package.json" - }, - { - "path": "node_modules/semver-diff/node_modules/semver/package.json" - }, - { - "path": "node_modules/tsutils/package.json" - }, - { - "path": "node_modules/ms/package.json" - }, - { - "path": "node_modules/linkify-it/package.json" - }, - { - "path": "node_modules/through/package.json" - }, - { - "path": "node_modules/string-width/package.json" - }, - { - "path": "node_modules/html-escaper/package.json" - }, - { - "path": "node_modules/type-fest/package.json" - }, - { - "path": "node_modules/parseurl/package.json" - }, - { - "path": "node_modules/google-p12-pem/package.json" - }, - { - "path": "node_modules/get-caller-file/package.json" - }, - { - "path": "node_modules/klaw/package.json" - }, - { - "path": "node_modules/map-obj/package.json" - }, - { - "path": "node_modules/node-fetch/package.json" - }, - { - "path": "node_modules/jsonexport/package.json" - }, - { - "path": "node_modules/isexe/package.json" - }, - { - "path": "node_modules/run-async/package.json" - }, - { - "path": "node_modules/validate-npm-package-license/package.json" - }, - { - "path": "node_modules/file-entry-cache/package.json" - }, - { - "path": "node_modules/meow/package.json" - }, - { - "path": "node_modules/meow/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/meow/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/concat-map/package.json" - }, - { - "path": "node_modules/term-size/package.json" - }, - { - "path": "node_modules/xmlcreate/package.json" - }, - { - "path": "node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yallist/package.json" - }, - { - "path": "node_modules/json-bigint/package.json" - }, - { - "path": "node_modules/resolve-from/package.json" - }, - { - "path": "node_modules/is-buffer/package.json" - }, - { - "path": "node_modules/cliui/package.json" - }, - { - "path": "node_modules/toidentifier/package.json" - }, - { - "path": "node_modules/balanced-match/package.json" - }, - { - "path": "node_modules/marked/package.json" - }, - { - "path": "node_modules/wrappy/package.json" - }, - { - "path": "node_modules/jsdoc-region-tag/package.json" - }, - { - "path": "node_modules/json-stable-stringify-without-jsonify/package.json" - }, - { - "path": "node_modules/glob-parent/package.json" - }, - { - "path": "node_modules/get-func-name/package.json" - }, - { - "path": "node_modules/set-blocking/package.json" - }, - { - "path": "node_modules/istanbul-lib-report/package.json" - }, - { - "path": "node_modules/load-json-file/package.json" - }, - { - "path": "node_modules/ansi-align/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/ansi-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/duplexer3/package.json" - }, - { - "path": "node_modules/esprima/package.json" - }, - { - "path": "node_modules/is-stream-ended/package.json" - }, - { - "path": "node_modules/minimatch/package.json" - }, - { - "path": "node_modules/crypto-random-string/package.json" - }, - { - "path": "node_modules/growl/package.json" - }, - { - "path": "node_modules/string.prototype.trimleft/package.json" - }, - { - "path": "node_modules/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/normalize-package-data/package.json" - }, - { - "path": "node_modules/normalize-package-data/node_modules/semver/package.json" - }, - { - "path": "node_modules/fast-text-encoding/package.json" - }, - { - "path": "node_modules/tar/package.json" - }, - { - "path": "node_modules/tar/node_modules/yallist/package.json" - }, - { - "path": "node_modules/server-destroy/package.json" - }, - { - "path": "node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/protobufjs/package.json" - }, - { - "path": "node_modules/protobufjs/cli/package-lock.json" - }, - { - "path": "node_modules/protobufjs/cli/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/uglify-js/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/esutils/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/esprima/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/prelude-ls/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/levn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/estraverse/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn-jsx/node_modules/acorn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/escodegen/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/minimist/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/deep-is/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/semver/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/acorn/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/commander/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/espree/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/source-map/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/type-check/package.json" - }, - { - "path": "node_modules/protobufjs/cli/node_modules/optionator/package.json" - }, - { - "path": "node_modules/domhandler/package.json" - }, - { - "path": "node_modules/ansi-escapes/package.json" - }, - { - "path": "node_modules/boolbase/package.json" - }, - { - "path": "node_modules/indent-string/package.json" - }, - { - "path": "node_modules/lodash/package.json" - }, - { - "path": "node_modules/taffydb/package.json" - }, - { - "path": "node_modules/extend/package.json" - }, - { - "path": "node_modules/is-yarn-global/package.json" - }, - { - "path": "node_modules/dom-serializer/package.json" - }, - { - "path": "node_modules/assertion-error/package.json" - }, - { - "path": "node_modules/end-of-stream/package.json" - }, - { - "path": "node_modules/log-symbols/package.json" - }, - { - "path": "node_modules/is-callable/package.json" - }, - { - "path": "node_modules/camelcase-keys/package.json" - }, - { - "path": "node_modules/camelcase-keys/node_modules/camelcase/package.json" - }, - { - "path": "node_modules/decompress-response/package.json" - }, - { - "path": "node_modules/js-yaml/package.json" - }, - { - "path": "node_modules/cli-boxes/package.json" - }, - { - "path": "node_modules/is-obj/package.json" - }, - { - "path": "node_modules/is-typedarray/package.json" - }, - { - "path": "node_modules/registry-auth-token/package.json" - }, - { - "path": "node_modules/read-pkg-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-try/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/p-limit/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/find-up/package.json" - }, - { - "path": "node_modules/read-pkg-up/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/buffer-equal-constant-time/package.json" - }, - { - "path": "node_modules/@bcoe/v8-coverage/package.json" - }, - { - "path": "node_modules/eslint-scope/package.json" - }, - { - "path": "node_modules/stream-shift/package.json" - }, - { - "path": "node_modules/is-extglob/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/index.js" - }, - { - "path": "node_modules/typedarray-to-buffer/README.md" - }, - { - "path": "node_modules/typedarray-to-buffer/.airtap.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/.travis.yml" - }, - { - "path": "node_modules/typedarray-to-buffer/package.json" - }, - { - "path": "node_modules/typedarray-to-buffer/LICENSE" - }, - { - "path": "node_modules/typedarray-to-buffer/test/basic.js" - }, - { - "path": "node_modules/restore-cursor/package.json" - }, - { - "path": "node_modules/mimic-response/package.json" - }, - { - "path": "node_modules/normalize-url/package.json" - }, - { - "path": "node_modules/fresh/package.json" - }, - { - "path": "node_modules/imurmurhash/package.json" - }, - { - "path": "node_modules/ajv/package.json" - }, - { - "path": "node_modules/is-path-inside/package.json" - }, - { - "path": "node_modules/import-lazy/package.json" - }, - { - "path": "node_modules/json-schema-traverse/package.json" - }, - { - "path": "node_modules/ncp/package.json" - }, - { - "path": "node_modules/rxjs/package.json" - }, - { - "path": "node_modules/p-locate/package.json" - }, - { - "path": "node_modules/figures/package.json" - }, - { - "path": "node_modules/underscore/package.json" - }, - { - "path": "node_modules/finalhandler/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/debug/package.json" - }, - { - "path": "node_modules/finalhandler/node_modules/ms/package.json" - }, - { - "path": "node_modules/ignore/package.json" - }, - { - "path": "node_modules/path-is-absolute/package.json" - }, - { - "path": "node_modules/graceful-fs/package.json" - }, - { - "path": "node_modules/currently-unhandled/package.json" - }, - { - "path": "node_modules/minizlib/package.json" - }, - { - "path": "node_modules/minizlib/node_modules/yallist/package.json" - }, - { - "path": "node_modules/google-gax/package.json" - }, - { - "path": "node_modules/onetime/package.json" - }, - { - "path": "node_modules/path-key/package.json" - }, - { - "path": "node_modules/core-util-is/package.json" - }, - { - "path": "node_modules/prepend-http/package.json" - }, - { - "path": "node_modules/write/package.json" - }, - { - "path": "node_modules/duplexify/package.json" - }, - { - "path": "node_modules/camelcase/package.json" - }, - { - "path": "node_modules/error-ex/package.json" - }, - { - "path": "node_modules/boxen/package.json" - }, - { - "path": "node_modules/boxen/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/string-width/package.json" - }, - { - "path": "node_modules/boxen/node_modules/type-fest/package.json" - }, - { - "path": "node_modules/boxen/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/boxen/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/boxen/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/node-environment-flags/package.json" - }, - { - "path": "node_modules/node-environment-flags/node_modules/semver/package.json" - }, - { - "path": "node_modules/c8/package.json" - }, - { - "path": "node_modules/gcp-metadata/package.json" - }, - { - "path": "node_modules/json-buffer/package.json" - }, - { - "path": "node_modules/mkdirp/package.json" - }, - { - "path": "node_modules/bluebird/package.json" - }, - { - "path": "node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/serve-static/package.json" - }, - { - "path": "node_modules/path-parse/package.json" - }, - { - "path": "node_modules/mime/package.json" - }, - { - "path": "node_modules/yargs-unparser/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-name/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/string-width/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/cliui/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/find-up/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/yargs-unparser/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/lines-and-columns/package.json" - }, - { - "path": "node_modules/chalk/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-name/package.json" - }, - { - "path": "node_modules/chalk/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/chalk/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/chalk/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/chalk/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/locate-path/package.json" - }, - { - "path": "node_modules/spdx-expression-parse/package.json" - }, - { - "path": "node_modules/esquery/package.json" - }, - { - "path": "node_modules/to-readable-stream/package.json" - }, - { - "path": "node_modules/chai/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/package.json" - }, - { - "path": "node_modules/jsdoc-fresh/node_modules/taffydb/package.json" - }, - { - "path": "node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/is-arrayish/package.json" - }, - { - "path": "node_modules/prettier-linter-helpers/package.json" - }, - { - "path": "node_modules/chardet/package.json" - }, - { - "path": "node_modules/http-cache-semantics/package.json" - }, - { - "path": "node_modules/has-flag/package.json" - }, - { - "path": "node_modules/cheerio/package.json" - }, - { - "path": "node_modules/domelementtype/package.json" - }, - { - "path": "node_modules/npm-normalize-package-bin/package.json" - }, - { - "path": "node_modules/@szmarczak/http-timer/package.json" - }, - { - "path": "node_modules/tmp/package.json" - }, - { - "path": "node_modules/entities/package.json" - }, - { - "path": "node_modules/execa/package.json" - }, - { - "path": "node_modules/execa/node_modules/lru-cache/package.json" - }, - { - "path": "node_modules/execa/node_modules/yallist/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/execa/node_modules/is-stream/package.json" - }, - { - "path": "node_modules/execa/node_modules/which/package.json" - }, - { - "path": "node_modules/execa/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/execa/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/strip-bom/package.json" - }, - { - "path": "node_modules/argparse/package.json" - }, - { - "path": "node_modules/has/package.json" - }, - { - "path": "node_modules/ee-first/package.json" - }, - { - "path": "node_modules/object-inspect/package.json" - }, - { - "path": "node_modules/table/package.json" - }, - { - "path": "node_modules/table/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/string-width/package.json" - }, - { - "path": "node_modules/table/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/table/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/table/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/spdx-correct/package.json" - }, - { - "path": "node_modules/get-stream/package.json" - }, - { - "path": "node_modules/chownr/package.json" - }, - { - "path": "node_modules/statuses/package.json" - }, - { - "path": "node_modules/@istanbuljs/schema/package.json" - }, - { - "path": "node_modules/istanbul-reports/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/package.json" - }, - { - "path": "node_modules/@grpc/grpc-js/node_modules/semver/package.json" - }, - { - "path": "node_modules/@grpc/proto-loader/package.json" - }, - { - "path": "node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/etag/package.json" - }, - { - "path": "node_modules/y18n/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/ignore/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint-plugin-node/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/natural-compare/package.json" - }, - { - "path": "node_modules/event-target-shim/package.json" - }, - { - "path": "node_modules/arrify/package.json" - }, - { - "path": "node_modules/widest-line/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/string-width/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/widest-line/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/ignore-walk/package.json" - }, - { - "path": "node_modules/util-deprecate/package.json" - }, - { - "path": "node_modules/function-bind/package.json" - }, - { - "path": "node_modules/@types/color-name/package.json" - }, - { - "path": "node_modules/@types/node/package.json" - }, - { - "path": "node_modules/@types/istanbul-lib-coverage/package.json" - }, - { - "path": "node_modules/@types/normalize-package-data/package.json" - }, - { - "path": "node_modules/@types/is-windows/package.json" - }, - { - "path": "node_modules/@types/mocha/package.json" - }, - { - "path": "node_modules/@types/minimist/package.json" - }, - { - "path": "node_modules/@types/fs-extra/package.json" - }, - { - "path": "node_modules/@types/long/package.json" - }, - { - "path": "node_modules/is-windows/package.json" - }, - { - "path": "node_modules/levn/package.json" - }, - { - "path": "node_modules/pseudomap/package.json" - }, - { - "path": "node_modules/global-dirs/package.json" - }, - { - "path": "node_modules/is-stream/package.json" - }, - { - "path": "node_modules/parse-json/package.json" - }, - { - "path": "node_modules/xdg-basedir/package.json" - }, - { - "path": "node_modules/spdx-license-ids/package.json" - }, - { - "path": "node_modules/google-auth-library/package.json" - }, - { - "path": "node_modules/brace-expansion/package.json" - }, - { - "path": "node_modules/builtin-modules/package.json" - }, - { - "path": "node_modules/tslint/package.json" - }, - { - "path": "node_modules/tslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/define-properties/package.json" - }, - { - "path": "node_modules/jws/package.json" - }, - { - "path": "node_modules/minipass/package.json" - }, - { - "path": "node_modules/minipass/node_modules/yallist/package.json" - }, - { - "path": "node_modules/nth-check/package.json" - }, - { - "path": "node_modules/send/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/package.json" - }, - { - "path": "node_modules/send/node_modules/debug/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/ms/package.json" - }, - { - "path": "node_modules/send/node_modules/mime/package.json" - }, - { - "path": "node_modules/require-directory/package.json" - }, - { - "path": "node_modules/object.assign/package.json" - }, - { - "path": "node_modules/is-npm/package.json" - }, - { - "path": "node_modules/fs-minipass/package.json" - }, - { - "path": "node_modules/min-indent/package.json" - }, - { - "path": "node_modules/functional-red-black-tree/package.json" - }, - { - "path": "node_modules/read-pkg/package.json" - }, - { - "path": "node_modules/registry-url/package.json" - }, - { - "path": "node_modules/is-regex/package.json" - }, - { - "path": "node_modules/es-abstract/package.json" - }, - { - "path": "node_modules/parent-module/package.json" - }, - { - "path": "node_modules/type-detect/package.json" - }, - { - "path": "node_modules/signal-exit/package.json" - }, - { - "path": "node_modules/import-fresh/package.json" - }, - { - "path": "node_modules/keyv/package.json" - }, - { - "path": "node_modules/estraverse/package.json" - }, - { - "path": "node_modules/fast-deep-equal/package.json" - }, - { - "path": "node_modules/mute-stream/package.json" - }, - { - "path": "node_modules/rimraf/package.json" - }, - { - "path": "node_modules/is-installed-globally/package.json" - }, - { - "path": "node_modules/get-stdin/package.json" - }, - { - "path": "node_modules/make-dir/package.json" - }, - { - "path": "node_modules/make-dir/node_modules/semver/package.json" - }, - { - "path": "node_modules/es6-promise/package.json" - }, - { - "path": "node_modules/os-tmpdir/package.json" - }, - { - "path": "node_modules/retry-request/package.json" - }, - { - "path": "node_modules/retry-request/node_modules/debug/package.json" - }, - { - "path": "node_modules/cli-cursor/package.json" - }, - { - "path": "node_modules/is-symbol/package.json" - }, - { - "path": "node_modules/check-error/package.json" - }, - { - "path": "node_modules/css-what/package.json" - }, - { - "path": "node_modules/punycode/package.json" - }, - { - "path": "node_modules/setprototypeof/package.json" - }, - { - "path": "node_modules/word-wrap/package.json" - }, - { - "path": "node_modules/foreground-child/package.json" - }, - { - "path": "node_modules/package-json/package.json" - }, - { - "path": "node_modules/package-json/node_modules/semver/package.json" - }, - { - "path": "node_modules/css-select/package.json" - }, - { - "path": "node_modules/path-is-inside/package.json" - }, - { - "path": "node_modules/eslint-plugin-prettier/package.json" - }, - { - "path": "node_modules/p-finally/package.json" - }, - { - "path": "node_modules/inquirer/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/inquirer/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/acorn-jsx/package.json" - }, - { - "path": "node_modules/glob/package.json" - }, - { - "path": "node_modules/pathval/package.json" - }, - { - "path": "node_modules/mocha/package.json" - }, - { - "path": "node_modules/mocha/node_modules/diff/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-name/package.json" - }, - { - "path": "node_modules/mocha/node_modules/emoji-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ms/package.json" - }, - { - "path": "node_modules/mocha/node_modules/string-width/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/mocha/node_modules/cliui/package.json" - }, - { - "path": "node_modules/mocha/node_modules/p-locate/package.json" - }, - { - "path": "node_modules/mocha/node_modules/locate-path/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/has-flag/package.json" - }, - { - "path": "node_modules/mocha/node_modules/glob/package.json" - }, - { - "path": "node_modules/mocha/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/mocha/node_modules/which/package.json" - }, - { - "path": "node_modules/mocha/node_modules/supports-color/package.json" - }, - { - "path": "node_modules/mocha/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/mocha/node_modules/find-up/package.json" - }, - { - "path": "node_modules/mocha/node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/mocha/node_modules/path-exists/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs/package.json" - }, - { - "path": "node_modules/mocha/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/mocha/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/mocha/node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/loud-rejection/package.json" - }, - { - "path": "node_modules/@protobufjs/codegen/package.json" - }, - { - "path": "node_modules/@protobufjs/base64/package.json" - }, - { - "path": "node_modules/@protobufjs/utf8/package.json" - }, - { - "path": "node_modules/@protobufjs/pool/package.json" - }, - { - "path": "node_modules/@protobufjs/float/package.json" - }, - { - "path": "node_modules/@protobufjs/fetch/package.json" - }, - { - "path": "node_modules/@protobufjs/path/package.json" - }, - { - "path": "node_modules/@protobufjs/aspromise/package.json" - }, - { - "path": "node_modules/@protobufjs/inquire/package.json" - }, - { - "path": "node_modules/@protobufjs/eventemitter/package.json" - }, - { - "path": "node_modules/node-forge/package.json" - }, - { - "path": "node_modules/lodash.has/package.json" - }, - { - "path": "node_modules/has-symbols/package.json" - }, - { - "path": "node_modules/lodash.at/package.json" - }, - { - "path": "node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/ansi-colors/package.json" - }, - { - "path": "node_modules/p-try/package.json" - }, - { - "path": "node_modules/json-parse-better-errors/package.json" - }, - { - "path": "node_modules/readable-stream/package.json" - }, - { - "path": "node_modules/abort-controller/package.json" - }, - { - "path": "node_modules/which/package.json" - }, - { - "path": "node_modules/astral-regex/package.json" - }, - { - "path": "node_modules/minimist/package.json" - }, - { - "path": "node_modules/clone-response/package.json" - }, - { - "path": "node_modules/ecdsa-sig-formatter/package.json" - }, - { - "path": "node_modules/requizzle/package.json" - }, - { - "path": "node_modules/base64-js/package.json" - }, - { - "path": "node_modules/pify/package.json" - }, - { - "path": "node_modules/object-keys/package.json" - }, - { - "path": "node_modules/trim-newlines/package.json" - }, - { - "path": "node_modules/deep-is/package.json" - }, - { - "path": "node_modules/fast-levenshtein/package.json" - }, - { - "path": "node_modules/typescript/package.json" - }, - { - "path": "node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/eslint-plugin-es/node_modules/regexpp/package.json" - }, - { - "path": "node_modules/semver/package.json" - }, - { - "path": "node_modules/unique-string/package.json" - }, - { - "path": "node_modules/decamelize/package.json" - }, - { - "path": "node_modules/acorn/package.json" - }, - { - "path": "node_modules/wide-align/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/string-width/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/wide-align/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/got/package.json" - }, - { - "path": "node_modules/got/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/sprintf-js/package.json" - }, - { - "path": "node_modules/isarray/package.json" - }, - { - "path": "node_modules/string_decoder/package.json" - }, - { - "path": "node_modules/strip-eof/package.json" - }, - { - "path": "node_modules/p-limit/package.json" - }, - { - "path": "node_modules/url-parse-lax/package.json" - }, - { - "path": "node_modules/gts/package.json" - }, - { - "path": "node_modules/gts/node_modules/chalk/package.json" - }, - { - "path": "node_modules/commander/package.json" - }, - { - "path": "node_modules/mimic-fn/package.json" - }, - { - "path": "node_modules/https-proxy-agent/package.json" - }, - { - "path": "node_modules/ini/package.json" - }, - { - "path": "node_modules/js2xmlparser/package.json" - }, - { - "path": "node_modules/spdx-exceptions/package.json" - }, - { - "path": "node_modules/external-editor/package.json" - }, - { - "path": "node_modules/eslint-utils/package.json" - }, - { - "path": "node_modules/text-table/package.json" - }, - { - "path": "node_modules/domutils/package.json" - }, - { - "path": "node_modules/supports-color/package.json" - }, - { - "path": "node_modules/strip-indent/package.json" - }, - { - "path": "node_modules/fs.realpath/package.json" - }, - { - "path": "node_modules/parse5/package.json" - }, - { - "path": "node_modules/decamelize-keys/package.json" - }, - { - "path": "node_modules/decamelize-keys/node_modules/map-obj/package.json" - }, - { - "path": "node_modules/p-timeout/package.json" - }, - { - "path": "node_modules/espree/package.json" - }, - { - "path": "node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/responselike/package.json" - }, - { - "path": "node_modules/esrecurse/package.json" - }, - { - "path": "node_modules/bignumber.js/package.json" - }, - { - "path": "node_modules/source-map/package.json" - }, - { - "path": "node_modules/find-up/package.json" - }, - { - "path": "node_modules/es-to-primitive/package.json" - }, - { - "path": "node_modules/rc/package.json" - }, - { - "path": "node_modules/rc/node_modules/minimist/package.json" - }, - { - "path": "node_modules/rc/node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/safe-buffer/package.json" - }, - { - "path": "node_modules/uc.micro/package.json" - }, - { - "path": "node_modules/flat-cache/package.json" - }, - { - "path": "node_modules/flat-cache/node_modules/rimraf/package.json" - }, - { - "path": "node_modules/once/package.json" - }, - { - "path": "node_modules/gtoken/package.json" - }, - { - "path": "node_modules/convert-source-map/package.json" - }, - { - "path": "node_modules/is-date-object/package.json" - }, - { - "path": "node_modules/tslint-config-prettier/package.json" - }, - { - "path": "node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/iconv-lite/package.json" - }, - { - "path": "node_modules/is-glob/package.json" - }, - { - "path": "node_modules/furi/package.json" - }, - { - "path": "node_modules/tslib/package.json" - }, - { - "path": "node_modules/markdown-it-anchor/package.json" - }, - { - "path": "node_modules/browser-stdout/package.json" - }, - { - "path": "node_modules/deep-eql/package.json" - }, - { - "path": "node_modules/path-type/package.json" - }, - { - "path": "node_modules/npm-packlist/package.json" - }, - { - "path": "node_modules/pump/package.json" - }, - { - "path": "node_modules/process-nextick-args/package.json" - }, - { - "path": "node_modules/deep-extend/package.json" - }, - { - "path": "node_modules/type-check/package.json" - }, - { - "path": "node_modules/jwa/package.json" - }, - { - "path": "node_modules/walkdir/package.json" - }, - { - "path": "node_modules/hard-rejection/package.json" - }, - { - "path": "node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/@sindresorhus/is/package.json" - }, - { - "path": "node_modules/wrap-ansi/package.json" - }, - { - "path": "node_modules/quick-lru/package.json" - }, - { - "path": "node_modules/path-exists/package.json" - }, - { - "path": "node_modules/jsdoc/package.json" - }, - { - "path": "node_modules/jsdoc/node_modules/escape-string-regexp/package.json" - }, - { - "path": "node_modules/cacheable-request/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/get-stream/package.json" - }, - { - "path": "node_modules/cacheable-request/node_modules/lowercase-keys/package.json" - }, - { - "path": "node_modules/escape-html/package.json" - }, - { - "path": "node_modules/minimist-options/package.json" - }, - { - "path": "node_modules/minimist-options/node_modules/arrify/package.json" - }, - { - "path": "node_modules/latest-version/package.json" - }, - { - "path": "node_modules/optionator/package.json" - }, - { - "path": "node_modules/slice-ansi/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-name/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/ansi-styles/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/is-fullwidth-code-point/package.json" - }, - { - "path": "node_modules/slice-ansi/node_modules/color-convert/package.json" - }, - { - "path": "node_modules/flatted/package.json" - }, - { - "path": "node_modules/inherits/package.json" - }, - { - "path": "node_modules/depd/package.json" - }, - { - "path": "node_modules/es6-promisify/package.json" - }, - { - "path": "node_modules/long/package.json" - }, - { - "path": "node_modules/regexpp/package.json" - }, - { - "path": "node_modules/cli-width/package.json" - }, - { - "path": "node_modules/eslint/package.json" - }, - { - "path": "node_modules/eslint/node_modules/debug/package.json" - }, - { - "path": "node_modules/eslint/node_modules/ansi-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/path-key/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-command/package.json" - }, - { - "path": "node_modules/eslint/node_modules/strip-ansi/package.json" - }, - { - "path": "node_modules/eslint/node_modules/which/package.json" - }, - { - "path": "node_modules/eslint/node_modules/shebang-regex/package.json" - }, - { - "path": "node_modules/eslint/node_modules/semver/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/index.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/README.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/package.json" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/LICENSE" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/CHANGELOG.md" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/parse.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/enoent.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/escape.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/resolveCommand.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/lib/util/readShebang.js" - }, - { - "path": "node_modules/eslint/node_modules/cross-spawn/node_modules/semver/package.json" - }, - { - "path": "node_modules/npm-bundled/package.json" - }, - { - "path": "node_modules/mdurl/package.json" - }, - { - "path": "node_modules/v8-to-istanbul/package.json" - }, - { - "path": "node_modules/object.getownpropertydescriptors/package.json" - }, - { - "path": "node_modules/array-find-index/package.json" - }, - { - "path": "node_modules/yargs/package.json" - }, - { - "path": "node_modules/ci-info/package.json" - }, - { - "path": "node_modules/color-convert/package.json" - }, - { - "path": "node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/eslint-visitor-keys/package.json" - }, - { - "path": "node_modules/agent-base/package.json" - }, - { - "path": "node_modules/flat/package.json" - }, - { - "path": "node_modules/through2/package.json" - }, - { - "path": "node_modules/gaxios/package.json" - }, - { - "path": "node_modules/p-queue/package.json" - }, - { - "path": "node_modules/encodeurl/package.json" - }, - { - "path": "node_modules/js-tokens/package.json" - }, - { - "path": "node_modules/strip-json-comments/package.json" - }, - { - "path": "node_modules/eslint-config-prettier/package.json" - }, - { - "path": "node_modules/uri-js/package.json" - }, - { - "path": "node_modules/test-exclude/package.json" - }, - { - "path": "node_modules/safer-buffer/package.json" - }, - { - "path": "node_modules/prettier/package.json" - }, - { - "path": "node_modules/yargs-parser/package.json" - }, - { - "path": "node_modules/@babel/code-frame/package.json" - }, - { - "path": "node_modules/@babel/highlight/package.json" - }, - { - "path": "node_modules/@babel/parser/package.json" - }, - { - "path": "node_modules/configstore/package.json" - }, - { - "path": "node_modules/configstore/node_modules/make-dir/package.json" - }, - { - "path": "node_modules/configstore/node_modules/write-file-atomic/package.json" - }, - { - "path": "node_modules/is-plain-obj/package.json" - }, - { - "path": "node_modules/has-yarn/package.json" - }, - { - "path": "samples/listBuildTriggers.js" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/system-test/samples.js" - }, - { - "path": "samples/system-test/.eslintrc.yml" - }, - { - "path": "__pycache__/synth.cpython-36.pyc" - } - ] -} \ No newline at end of file From b5f99af142d9fb907a0eb98bf1de4904a3768750 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 27 Jan 2020 16:20:16 -0800 Subject: [PATCH 034/223] chore: regenerate synth.metadata (#47) --- .../google-devtools-cloudbuild/synth.metadata | 282 ++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 packages/google-devtools-cloudbuild/synth.metadata diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata new file mode 100644 index 000000000000..b574653613b9 --- /dev/null +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -0,0 +1,282 @@ +{ + "updateTime": "2020-01-24T12:14:00.488781Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", + "internalRef": "291240093" + } + }, + { + "template": { + "name": "node_library", + "origin": "synthtool.gcp", + "version": "2019.10.17" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "cloudbuild", + "apiVersion": "v1", + "language": "typescript", + "generator": "gapic-generator-typescript" + } + } + ], + "newFiles": [ + { + "path": ".eslintignore" + }, + { + "path": ".eslintrc.yml" + }, + { + "path": ".github/ISSUE_TEMPLATE/bug_report.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/feature_request.md" + }, + { + "path": ".github/ISSUE_TEMPLATE/support_request.md" + }, + { + "path": ".github/PULL_REQUEST_TEMPLATE.md" + }, + { + "path": ".github/release-please.yml" + }, + { + "path": ".gitignore" + }, + { + "path": ".jsdoc.js" + }, + { + "path": ".kokoro/.gitattributes" + }, + { + "path": ".kokoro/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/common.cfg" + }, + { + "path": ".kokoro/continuous/node10/docs.cfg" + }, + { + "path": ".kokoro/continuous/node10/lint.cfg" + }, + { + "path": ".kokoro/continuous/node10/samples-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/system-test.cfg" + }, + { + "path": ".kokoro/continuous/node10/test.cfg" + }, + { + "path": ".kokoro/continuous/node12/common.cfg" + }, + { + "path": ".kokoro/continuous/node12/test.cfg" + }, + { + "path": ".kokoro/continuous/node8/common.cfg" + }, + { + "path": ".kokoro/continuous/node8/test.cfg" + }, + { + "path": ".kokoro/docs.sh" + }, + { + "path": ".kokoro/lint.sh" + }, + { + "path": ".kokoro/presubmit/node10/common.cfg" + }, + { + "path": ".kokoro/presubmit/node10/docs.cfg" + }, + { + "path": ".kokoro/presubmit/node10/lint.cfg" + }, + { + "path": ".kokoro/presubmit/node10/samples-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/system-test.cfg" + }, + { + "path": ".kokoro/presubmit/node10/test.cfg" + }, + { + "path": ".kokoro/presubmit/node12/common.cfg" + }, + { + "path": ".kokoro/presubmit/node12/test.cfg" + }, + { + "path": ".kokoro/presubmit/node8/common.cfg" + }, + { + "path": ".kokoro/presubmit/node8/test.cfg" + }, + { + "path": ".kokoro/presubmit/windows/common.cfg" + }, + { + "path": ".kokoro/presubmit/windows/test.cfg" + }, + { + "path": ".kokoro/publish.sh" + }, + { + "path": ".kokoro/release/docs.cfg" + }, + { + "path": ".kokoro/release/docs.sh" + }, + { + "path": ".kokoro/release/publish.cfg" + }, + { + "path": ".kokoro/samples-test.sh" + }, + { + "path": ".kokoro/system-test.sh" + }, + { + "path": ".kokoro/test.bat" + }, + { + "path": ".kokoro/test.sh" + }, + { + "path": ".kokoro/trampoline.sh" + }, + { + "path": ".nycrc" + }, + { + "path": ".prettierignore" + }, + { + "path": ".prettierrc" + }, + { + "path": ".readme-partials.yml" + }, + { + "path": ".repo-metadata.json" + }, + { + "path": "CHANGELOG.md" + }, + { + "path": "CODE_OF_CONDUCT.md" + }, + { + "path": "CONTRIBUTING.md" + }, + { + "path": "LICENSE" + }, + { + "path": "README.md" + }, + { + "path": "cloudbuild.yaml" + }, + { + "path": "codecov.yaml" + }, + { + "path": "linkinator.config.json" + }, + { + "path": "package.json" + }, + { + "path": "proto.list" + }, + { + "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" + }, + { + "path": "protos/protos.d.ts" + }, + { + "path": "protos/protos.js" + }, + { + "path": "protos/protos.json" + }, + { + "path": "renovate.json" + }, + { + "path": "samples/.eslintrc.yml" + }, + { + "path": "samples/README.md" + }, + { + "path": "samples/listBuildTriggers.js" + }, + { + "path": "samples/package.json" + }, + { + "path": "samples/quickstart.js" + }, + { + "path": "samples/system-test/.eslintrc.yml" + }, + { + "path": "samples/system-test/samples.js" + }, + { + "path": "src/index.ts" + }, + { + "path": "src/v1/cloud_build_client.ts" + }, + { + "path": "src/v1/cloud_build_client_config.json" + }, + { + "path": "src/v1/cloud_build_proto_list.json" + }, + { + "path": "src/v1/index.ts" + }, + { + "path": "synth.py" + }, + { + "path": "system-test/install.ts" + }, + { + "path": "system-test/system.js" + }, + { + "path": "test/gapic-cloud_build-v1.ts" + }, + { + "path": "tsconfig.json" + }, + { + "path": "tslint.json" + }, + { + "path": "webpack.config.js" + } + ] +} \ No newline at end of file From b2c86ea46c6b95f41bf650497d084b85b33660e5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 28 Jan 2020 12:08:57 -0800 Subject: [PATCH 035/223] fix: enum, bytes, and Long types now accept strings --- .../protos/protos.d.ts | 116 +++++++++--------- .../google-devtools-cloudbuild/synth.metadata | 10 +- 2 files changed, 65 insertions(+), 61 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index d56fd7535522..127c499f59f4 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -594,7 +594,7 @@ export namespace google { object?: (string|null); /** StorageSource generation */ - generation?: (number|Long|null); + generation?: (number|Long|string|null); } /** Represents a StorageSource. */ @@ -613,7 +613,7 @@ export namespace google { public object: string; /** StorageSource generation. */ - public generation: (number|Long); + public generation: (number|Long|string); /** * Creates a new StorageSource instance using the specified properties. @@ -1050,7 +1050,7 @@ export namespace google { timeout?: (google.protobuf.IDuration|null); /** BuildStep status */ - status?: (google.devtools.cloudbuild.v1.Build.Status|null); + status?: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status|null); } /** Represents a BuildStep. */ @@ -1099,7 +1099,7 @@ export namespace google { public timeout?: (google.protobuf.IDuration|null); /** BuildStep status. */ - public status: google.devtools.cloudbuild.v1.Build.Status; + public status: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status); /** * Creates a new BuildStep instance using the specified properties. @@ -1281,7 +1281,7 @@ export namespace google { artifactManifest?: (string|null); /** Results numArtifacts */ - numArtifacts?: (number|Long|null); + numArtifacts?: (number|Long|string|null); /** Results buildStepOutputs */ buildStepOutputs?: (Uint8Array[]|null); @@ -1309,7 +1309,7 @@ export namespace google { public artifactManifest: string; /** Results numArtifacts. */ - public numArtifacts: (number|Long); + public numArtifacts: (number|Long|string); /** Results buildStepOutputs. */ public buildStepOutputs: Uint8Array[]; @@ -1494,7 +1494,7 @@ export namespace google { projectId?: (string|null); /** Build status */ - status?: (google.devtools.cloudbuild.v1.Build.Status|null); + status?: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status|null); /** Build statusDetail */ statusDetail?: (string|null); @@ -1570,7 +1570,7 @@ export namespace google { public projectId: string; /** Build status. */ - public status: google.devtools.cloudbuild.v1.Build.Status; + public status: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status); /** Build statusDetail. */ public statusDetail: string; @@ -2298,10 +2298,10 @@ export namespace google { interface IHash { /** Hash type */ - type?: (google.devtools.cloudbuild.v1.Hash.HashType|null); + type?: (google.devtools.cloudbuild.v1.Hash.HashType|keyof typeof google.devtools.cloudbuild.v1.Hash.HashType|null); /** Hash value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents a Hash. */ @@ -2314,10 +2314,10 @@ export namespace google { constructor(properties?: google.devtools.cloudbuild.v1.IHash); /** Hash type. */ - public type: google.devtools.cloudbuild.v1.Hash.HashType; + public type: (google.devtools.cloudbuild.v1.Hash.HashType|keyof typeof google.devtools.cloudbuild.v1.Hash.HashType); /** Hash value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new Hash instance using the specified properties. @@ -3157,7 +3157,7 @@ export namespace google { interface IGitHubEventsConfig { /** GitHubEventsConfig installationId */ - installationId?: (number|Long|null); + installationId?: (number|Long|string|null); /** GitHubEventsConfig owner */ owner?: (string|null); @@ -3182,7 +3182,7 @@ export namespace google { constructor(properties?: google.devtools.cloudbuild.v1.IGitHubEventsConfig); /** GitHubEventsConfig installationId. */ - public installationId: (number|Long); + public installationId: (number|Long|string); /** GitHubEventsConfig owner. */ public owner: string; @@ -3277,7 +3277,7 @@ export namespace google { branch?: (string|null); /** PullRequestFilter commentControl */ - commentControl?: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null); + commentControl?: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|keyof typeof google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null); } /** Represents a PullRequestFilter. */ @@ -3293,7 +3293,7 @@ export namespace google { public branch: string; /** PullRequestFilter commentControl. */ - public commentControl: google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl; + public commentControl: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|keyof typeof google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl); /** PullRequestFilter gitRef. */ public gitRef?: "branch"; @@ -4072,25 +4072,25 @@ export namespace google { sourceProvenanceHash?: (google.devtools.cloudbuild.v1.Hash.HashType[]|null); /** BuildOptions requestedVerifyOption */ - requestedVerifyOption?: (google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null); + requestedVerifyOption?: (google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null); /** BuildOptions machineType */ - machineType?: (google.devtools.cloudbuild.v1.BuildOptions.MachineType|null); + machineType?: (google.devtools.cloudbuild.v1.BuildOptions.MachineType|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.MachineType|null); /** BuildOptions diskSizeGb */ - diskSizeGb?: (number|Long|null); + diskSizeGb?: (number|Long|string|null); /** BuildOptions substitutionOption */ - substitutionOption?: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null); + substitutionOption?: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null); /** BuildOptions logStreamingOption */ - logStreamingOption?: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null); + logStreamingOption?: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null); /** BuildOptions workerPool */ workerPool?: (string|null); /** BuildOptions logging */ - logging?: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null); + logging?: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null); /** BuildOptions env */ env?: (string[]|null); @@ -4115,25 +4115,25 @@ export namespace google { public sourceProvenanceHash: google.devtools.cloudbuild.v1.Hash.HashType[]; /** BuildOptions requestedVerifyOption. */ - public requestedVerifyOption: google.devtools.cloudbuild.v1.BuildOptions.VerifyOption; + public requestedVerifyOption: (google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.VerifyOption); /** BuildOptions machineType. */ - public machineType: google.devtools.cloudbuild.v1.BuildOptions.MachineType; + public machineType: (google.devtools.cloudbuild.v1.BuildOptions.MachineType|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.MachineType); /** BuildOptions diskSizeGb. */ - public diskSizeGb: (number|Long); + public diskSizeGb: (number|Long|string); /** BuildOptions substitutionOption. */ - public substitutionOption: google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption; + public substitutionOption: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption); /** BuildOptions logStreamingOption. */ - public logStreamingOption: google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption; + public logStreamingOption: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption); /** BuildOptions workerPool. */ public workerPool: string; /** BuildOptions logging. */ - public logging: google.devtools.cloudbuild.v1.BuildOptions.LoggingMode; + public logging: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LoggingMode); /** BuildOptions env. */ public env: string[]; @@ -4264,7 +4264,7 @@ export namespace google { serviceAccountEmail?: (string|null); /** WorkerPool workerCount */ - workerCount?: (number|Long|null); + workerCount?: (number|Long|string|null); /** WorkerPool workerConfig */ workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); @@ -4282,7 +4282,7 @@ export namespace google { deleteTime?: (google.protobuf.ITimestamp|null); /** WorkerPool status */ - status?: (google.devtools.cloudbuild.v1.WorkerPool.Status|null); + status?: (google.devtools.cloudbuild.v1.WorkerPool.Status|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.Status|null); } /** Represents a WorkerPool. */ @@ -4304,7 +4304,7 @@ export namespace google { public serviceAccountEmail: string; /** WorkerPool workerCount. */ - public workerCount: (number|Long); + public workerCount: (number|Long|string); /** WorkerPool workerConfig. */ public workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); @@ -4322,7 +4322,7 @@ export namespace google { public deleteTime?: (google.protobuf.ITimestamp|null); /** WorkerPool status. */ - public status: google.devtools.cloudbuild.v1.WorkerPool.Status; + public status: (google.devtools.cloudbuild.v1.WorkerPool.Status|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.Status); /** * Creates a new WorkerPool instance using the specified properties. @@ -4423,7 +4423,7 @@ export namespace google { machineType?: (string|null); /** WorkerConfig diskSizeGb */ - diskSizeGb?: (number|Long|null); + diskSizeGb?: (number|Long|string|null); /** WorkerConfig network */ network?: (google.devtools.cloudbuild.v1.INetwork|null); @@ -4445,7 +4445,7 @@ export namespace google { public machineType: string; /** WorkerConfig diskSizeGb. */ - public diskSizeGb: (number|Long); + public diskSizeGb: (number|Long|string); /** WorkerConfig network. */ public network?: (google.devtools.cloudbuild.v1.INetwork|null); @@ -6228,10 +6228,10 @@ export namespace google { number?: (number|null); /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); /** FieldDescriptorProto typeName */ typeName?: (string|null); @@ -6268,10 +6268,10 @@ export namespace google { public number: number; /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); /** FieldDescriptorProto typeName. */ public typeName: string; @@ -7046,7 +7046,7 @@ export namespace google { javaStringCheckUtf8?: (boolean|null); /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); /** FileOptions goPackage */ goPackage?: (string|null); @@ -7119,7 +7119,7 @@ export namespace google { public javaStringCheckUtf8: boolean; /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); /** FileOptions goPackage. */ public goPackage: string; @@ -7365,13 +7365,13 @@ export namespace google { interface IFieldOptions { /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); /** FieldOptions packed */ packed?: (boolean|null); /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); /** FieldOptions lazy */ lazy?: (boolean|null); @@ -7399,13 +7399,13 @@ export namespace google { constructor(properties?: google.protobuf.IFieldOptions); /** FieldOptions ctype. */ - public ctype: google.protobuf.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; + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); /** FieldOptions lazy. */ public lazy: boolean; @@ -7904,7 +7904,7 @@ export namespace google { deprecated?: (boolean|null); /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); /** MethodOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -7932,7 +7932,7 @@ export namespace google { public deprecated: boolean; /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); /** MethodOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -8028,16 +8028,16 @@ export namespace google { identifierValue?: (string|null); /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); + positiveIntValue?: (number|Long|string|null); /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); + negativeIntValue?: (number|Long|string|null); /** UninterpretedOption doubleValue */ doubleValue?: (number|null); /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + stringValue?: (Uint8Array|string|null); /** UninterpretedOption aggregateValue */ aggregateValue?: (string|null); @@ -8059,16 +8059,16 @@ export namespace google { public identifierValue: string; /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); + public positiveIntValue: (number|Long|string); /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); + public negativeIntValue: (number|Long|string); /** UninterpretedOption doubleValue. */ public doubleValue: number; /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + public stringValue: (Uint8Array|string); /** UninterpretedOption aggregateValue. */ public aggregateValue: string; @@ -8658,7 +8658,7 @@ export namespace google { type_url?: (string|null); /** Any value */ - value?: (Uint8Array|null); + value?: (Uint8Array|string|null); } /** Represents an Any. */ @@ -8674,7 +8674,7 @@ export namespace google { public type_url: string; /** Any value. */ - public value: Uint8Array; + public value: (Uint8Array|string); /** * Creates a new Any instance using the specified properties. @@ -8751,7 +8751,7 @@ export namespace google { interface IDuration { /** Duration seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Duration nanos */ nanos?: (number|null); @@ -8767,7 +8767,7 @@ export namespace google { constructor(properties?: google.protobuf.IDuration); /** Duration seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Duration nanos. */ public nanos: number; @@ -8931,7 +8931,7 @@ export namespace google { interface ITimestamp { /** Timestamp seconds */ - seconds?: (number|Long|null); + seconds?: (number|Long|string|null); /** Timestamp nanos */ nanos?: (number|null); @@ -8947,7 +8947,7 @@ export namespace google { constructor(properties?: google.protobuf.ITimestamp); /** Timestamp seconds. */ - public seconds: (number|Long); + public seconds: (number|Long|string); /** Timestamp nanos. */ public nanos: number; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index b574653613b9..3ef5201e81b9 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-01-24T12:14:00.488781Z", + "updateTime": "2020-01-28T12:14:34.842603Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e26cab8afd19d396b929039dac5d874cf0b5336c", - "internalRef": "291240093" + "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", + "internalRef": "291821782", + "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\n" } }, { @@ -257,6 +258,9 @@ { "path": "src/v1/index.ts" }, + { + "path": "synth.metadata" + }, { "path": "synth.py" }, From f6c6665e611829e562acf178922860b109ebb703 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 29 Jan 2020 20:59:20 -0800 Subject: [PATCH 036/223] chore: release 1.3.2 (#49) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip] --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 31a939ffdd36..ca4323836f56 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.3.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.1...v1.3.2) (2020-01-28) + + +### Bug Fixes + +* enum, bytes, and Long types now accept strings ([64538fe](https://www.github.com/googleapis/nodejs-cloudbuild/commit/64538fe21aae6430f8f3e1ec6604b286bd890535)) + ### [1.3.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.0...v1.3.1) (2020-01-06) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 32e559ddd934..8efcc11f0a3e 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.3.1", + "version": "1.3.2", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 92be91d7466d..7b96d6961d54 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.3.1" + "@google-cloud/cloudbuild": "^1.3.2" }, "devDependencies": { "c8": "^7.0.0", From e3ed79bae0e0b80e86488c8f8654056bbb521c7f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 30 Jan 2020 16:34:15 +0100 Subject: [PATCH 037/223] chore(deps): update dependency @types/mocha to v7 --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 8efcc11f0a3e..ba9c498e67f1 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -24,7 +24,7 @@ "Cloud Build API" ], "devDependencies": { - "@types/mocha": "^5.2.5", + "@types/mocha": "^7.0.0", "c8": "^7.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", From aea168bccf01ac79303a5702e0eb64b006e61504 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 17:22:42 -0800 Subject: [PATCH 038/223] chore: skip img.shields.io in docs test --- packages/google-devtools-cloudbuild/linkinator.config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/linkinator.config.json b/packages/google-devtools-cloudbuild/linkinator.config.json index d780d6bfff5a..b555215ca020 100644 --- a/packages/google-devtools-cloudbuild/linkinator.config.json +++ b/packages/google-devtools-cloudbuild/linkinator.config.json @@ -2,6 +2,7 @@ "recurse": true, "skip": [ "https://codecov.io/gh/googleapis/", - "www.googleapis.com" + "www.googleapis.com", + "img.shields.io" ] } From 63f0762f6b177deccb1feadfda9bc9f152b49542 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 31 Jan 2020 20:54:54 -0800 Subject: [PATCH 039/223] test: modernize mocha config (#52) --- packages/google-devtools-cloudbuild/.mocharc.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/google-devtools-cloudbuild/.mocharc.json diff --git a/packages/google-devtools-cloudbuild/.mocharc.json b/packages/google-devtools-cloudbuild/.mocharc.json new file mode 100644 index 000000000000..670c5e2c24b7 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} From e531ccc2535e47101d9b04c0fbf79fb5e895d5e0 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 7 Feb 2020 10:26:43 -0800 Subject: [PATCH 040/223] fix: pass x-goog-request-params header for streaming calls --- .../google-devtools-cloudbuild/.gitignore | 1 - .../src/v1/cloud_build_client.ts | 6 +- .../google-devtools-cloudbuild/synth.metadata | 264 +----------------- .../test/gapic-cloud_build-v1.ts | 8 +- 4 files changed, 13 insertions(+), 266 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.gitignore b/packages/google-devtools-cloudbuild/.gitignore index e1a76628b307..5d32b23782f3 100644 --- a/packages/google-devtools-cloudbuild/.gitignore +++ b/packages/google-devtools-cloudbuild/.gitignore @@ -12,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ - diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index e1b31503c179..b160b0f8ef0d 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1560,9 +1560,10 @@ export class CloudBuildClient { */ listBuildsStream( request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; const callSettings = new gax.CallSettings(options); return this._descriptors.page.listBuilds.createStream( this._innerApiCalls.listBuilds as gax.GaxCall, @@ -1681,9 +1682,10 @@ export class CloudBuildClient { */ listBuildTriggersStream( request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions | {} + options?: gax.CallOptions ): Transform { request = request || {}; + options = options || {}; const callSettings = new gax.CallSettings(options); return this._descriptors.page.listBuildTriggers.createStream( this._innerApiCalls.listBuildTriggers as gax.GaxCall, diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 3ef5201e81b9..3d59def41ad0 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-01-28T12:14:34.842603Z", + "updateTime": "2020-02-07T12:15:01.486292Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea", - "internalRef": "291821782", - "log": "8e981acfd9b97ea2f312f11bbaa7b6c16e412dea\nBeta launch for PersonDetection and FaceDetection features.\n\nPiperOrigin-RevId: 291821782\n\n994e067fae3b21e195f7da932b08fff806d70b5d\nasset: add annotations to v1p2beta1\n\nPiperOrigin-RevId: 291815259\n\n244e1d2c89346ca2e0701b39e65552330d68545a\nAdd Playable Locations service\n\nPiperOrigin-RevId: 291806349\n\n909f8f67963daf45dd88d020877fb9029b76788d\nasset: add annotations to v1beta2\n\nPiperOrigin-RevId: 291805301\n\n3c39a1d6e23c1ef63c7fba4019c25e76c40dfe19\nKMS: add file-level message for CryptoKeyPath, it is defined in gapic yaml but not\nin proto files.\n\nPiperOrigin-RevId: 291420695\n\nc6f3f350b8387f8d1b85ed4506f30187ebaaddc3\ncontaineranalysis: update v1beta1 and bazel build with annotations\n\nPiperOrigin-RevId: 291401900\n\n92887d74b44e4e636252b7b8477d0d2570cd82db\nfix: fix the location of grpc config file.\n\nPiperOrigin-RevId: 291396015\n\n" + "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", + "internalRef": "293710856", + "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" } }, { "template": { "name": "node_library", "origin": "synthtool.gcp", - "version": "2019.10.17" + "version": "2020.2.4" } } ], @@ -28,259 +28,5 @@ "generator": "gapic-generator-typescript" } } - ], - "newFiles": [ - { - "path": ".eslintignore" - }, - { - "path": ".eslintrc.yml" - }, - { - "path": ".github/ISSUE_TEMPLATE/bug_report.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/feature_request.md" - }, - { - "path": ".github/ISSUE_TEMPLATE/support_request.md" - }, - { - "path": ".github/PULL_REQUEST_TEMPLATE.md" - }, - { - "path": ".github/release-please.yml" - }, - { - "path": ".gitignore" - }, - { - "path": ".jsdoc.js" - }, - { - "path": ".kokoro/.gitattributes" - }, - { - "path": ".kokoro/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/common.cfg" - }, - { - "path": ".kokoro/continuous/node10/docs.cfg" - }, - { - "path": ".kokoro/continuous/node10/lint.cfg" - }, - { - "path": ".kokoro/continuous/node10/samples-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/system-test.cfg" - }, - { - "path": ".kokoro/continuous/node10/test.cfg" - }, - { - "path": ".kokoro/continuous/node12/common.cfg" - }, - { - "path": ".kokoro/continuous/node12/test.cfg" - }, - { - "path": ".kokoro/continuous/node8/common.cfg" - }, - { - "path": ".kokoro/continuous/node8/test.cfg" - }, - { - "path": ".kokoro/docs.sh" - }, - { - "path": ".kokoro/lint.sh" - }, - { - "path": ".kokoro/presubmit/node10/common.cfg" - }, - { - "path": ".kokoro/presubmit/node10/docs.cfg" - }, - { - "path": ".kokoro/presubmit/node10/lint.cfg" - }, - { - "path": ".kokoro/presubmit/node10/samples-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/system-test.cfg" - }, - { - "path": ".kokoro/presubmit/node10/test.cfg" - }, - { - "path": ".kokoro/presubmit/node12/common.cfg" - }, - { - "path": ".kokoro/presubmit/node12/test.cfg" - }, - { - "path": ".kokoro/presubmit/node8/common.cfg" - }, - { - "path": ".kokoro/presubmit/node8/test.cfg" - }, - { - "path": ".kokoro/presubmit/windows/common.cfg" - }, - { - "path": ".kokoro/presubmit/windows/test.cfg" - }, - { - "path": ".kokoro/publish.sh" - }, - { - "path": ".kokoro/release/docs.cfg" - }, - { - "path": ".kokoro/release/docs.sh" - }, - { - "path": ".kokoro/release/publish.cfg" - }, - { - "path": ".kokoro/samples-test.sh" - }, - { - "path": ".kokoro/system-test.sh" - }, - { - "path": ".kokoro/test.bat" - }, - { - "path": ".kokoro/test.sh" - }, - { - "path": ".kokoro/trampoline.sh" - }, - { - "path": ".nycrc" - }, - { - "path": ".prettierignore" - }, - { - "path": ".prettierrc" - }, - { - "path": ".readme-partials.yml" - }, - { - "path": ".repo-metadata.json" - }, - { - "path": "CHANGELOG.md" - }, - { - "path": "CODE_OF_CONDUCT.md" - }, - { - "path": "CONTRIBUTING.md" - }, - { - "path": "LICENSE" - }, - { - "path": "README.md" - }, - { - "path": "cloudbuild.yaml" - }, - { - "path": "codecov.yaml" - }, - { - "path": "linkinator.config.json" - }, - { - "path": "package.json" - }, - { - "path": "proto.list" - }, - { - "path": "protos/google/devtools/cloudbuild/v1/cloudbuild.proto" - }, - { - "path": "protos/protos.d.ts" - }, - { - "path": "protos/protos.js" - }, - { - "path": "protos/protos.json" - }, - { - "path": "renovate.json" - }, - { - "path": "samples/.eslintrc.yml" - }, - { - "path": "samples/README.md" - }, - { - "path": "samples/listBuildTriggers.js" - }, - { - "path": "samples/package.json" - }, - { - "path": "samples/quickstart.js" - }, - { - "path": "samples/system-test/.eslintrc.yml" - }, - { - "path": "samples/system-test/samples.js" - }, - { - "path": "src/index.ts" - }, - { - "path": "src/v1/cloud_build_client.ts" - }, - { - "path": "src/v1/cloud_build_client_config.json" - }, - { - "path": "src/v1/cloud_build_proto_list.json" - }, - { - "path": "src/v1/index.ts" - }, - { - "path": "synth.metadata" - }, - { - "path": "synth.py" - }, - { - "path": "system-test/install.ts" - }, - { - "path": "system-test/system.js" - }, - { - "path": "test/gapic-cloud_build-v1.ts" - }, - { - "path": "tsconfig.json" - }, - { - "path": "tslint.json" - }, - { - "path": "webpack.config.js" - } ] } \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index 9d6321b147fe..eb1c2bbbc83d 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -826,7 +826,7 @@ describe('v1.CloudBuildClient', () => { // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.listBuilds = ( actualRequest: {}, @@ -845,7 +845,7 @@ describe('v1.CloudBuildClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); describe('listBuildTriggers', () => { @@ -883,7 +883,7 @@ describe('v1.CloudBuildClient', () => { // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; // Mock response - const expectedResponse = {}; + const expectedResponse = {response: 'data'}; // Mock Grpc layer client._innerApiCalls.listBuildTriggers = ( actualRequest: {}, @@ -902,7 +902,7 @@ describe('v1.CloudBuildClient', () => { .on('error', (err: FakeError) => { done(err); }); - stream.write(request); + stream.write(expectedResponse); }); }); }); From c7d98eb03ba6fbb96fc98d16be60d29df9a0ff7e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 10 Feb 2020 18:04:55 +0100 Subject: [PATCH 041/223] chore(deps): update dependency linkinator to v2 --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ba9c498e67f1..3abbd62a0b8c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", - "linkinator": "^1.4.0", + "linkinator": "^2.0.0", "mocha": "^7.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.17.0", From b1b19924931a8f8b456d12ae391d0be02b7c1650 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2020 10:59:18 -0800 Subject: [PATCH 042/223] chore: release 1.3.3 (#59) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index ca4323836f56..5757ebdf5933 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.3.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.2...v1.3.3) (2020-02-10) + + +### Bug Fixes + +* pass x-goog-request-params header for streaming calls ([365842b](https://www.github.com/googleapis/nodejs-cloudbuild/commit/365842beb7e0ceee9f5861d4172f5de076335902)) + ### [1.3.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.1...v1.3.2) (2020-01-28) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 3abbd62a0b8c..55991377db25 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.3.2", + "version": "1.3.3", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 7b96d6961d54..9decf4fb48a3 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.3.2" + "@google-cloud/cloudbuild": "^1.3.3" }, "devDependencies": { "c8": "^7.0.0", From 79271b9d066b7ad325b6bcab8540732c5161d583 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 12 Feb 2020 20:36:43 -0800 Subject: [PATCH 043/223] build: add GitHub actions config for unit tests (#61) * build: add GitHub actions config for unit tests * chore: link root directory before linting * chore: also need to npm i --- packages/google-devtools-cloudbuild/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 55991377db25..59b40839b04c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -55,7 +55,8 @@ "system-test": "c8 mocha --timeout=15000 system-test/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", - "docs-test": "linkinator docs" + "docs-test": "linkinator docs", + "prelint": "cd samples; npm link ../; npm i" }, "license": "Apache-2.0", "engines": { From 9d231acbf95eb98d898ce7db5c5916913d33b0f9 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 12 Feb 2020 21:26:53 -0800 Subject: [PATCH 044/223] feat: bump release level to GA (#62) --- .../google-devtools-cloudbuild/.repo-metadata.json | 2 +- packages/google-devtools-cloudbuild/README.md | 11 ++++++----- packages/google-devtools-cloudbuild/synth.metadata | 14 ++++++++++---- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index 83f09828973f..77698d2f3d40 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/cloud-build/docs/", "client_documentation": "https://googleapis.dev/nodejs/cloudbuild/latest/index.html", "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", - "release_level": "beta", + "release_level": "ga", "language": "nodejs", "repo": "googleapis/nodejs-cloudbuild", "distribution_name": "@google-cloud/cloudbuild", diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index c071600c336a..c11c124c5abe 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -4,7 +4,7 @@ # [Cloud Build: Node.js Client](https://github.com/googleapis/nodejs-cloudbuild) -[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/cloudbuild.svg)](https://www.npmjs.org/package/@google-cloud/cloudbuild) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloudbuild/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloudbuild) @@ -122,11 +122,12 @@ also contains samples. This library follows [Semantic Versioning](http://semver.org/). +This library is considered to be **General Availability (GA)**. This means it +is stable; the code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **GA** libraries +are addressed with the highest priority. -This library is considered to be in **beta**. This means it is expected to be -mostly stable while we work toward a general availability release; however, -complete stability is not guaranteed. We will address issues and requests -against beta libraries with a high priority. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 3d59def41ad0..0e629b1de418 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,13 +1,19 @@ { - "updateTime": "2020-02-07T12:15:01.486292Z", + "updateTime": "2020-02-13T04:36:50.444597Z", "sources": [ + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", + "sha": "7efa0aeeb4ee354fda57b14807f8a3d0f4bab194" + } + }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585", - "internalRef": "293710856", - "log": "e46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n69d9945330a5721cd679f17331a78850e2618226\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080182\n\nf6a1a6b417f39694275ca286110bc3c1ca4db0dc\nAdd file-level `Session` resource definition\n\nPiperOrigin-RevId: 293080178\n\n29d40b78e3dc1579b0b209463fbcb76e5767f72a\nExpose managedidentities/v1beta1/ API for client library usage.\n\nPiperOrigin-RevId: 292979741\n\na22129a1fb6e18056d576dfb7717aef74b63734a\nExpose managedidentities/v1/ API for client library usage.\n\nPiperOrigin-RevId: 292968186\n\nb5cbe4a4ba64ab19e6627573ff52057a1657773d\nSecurityCenter v1p1beta1: move file-level option on top to workaround protobuf.js bug.\n\nPiperOrigin-RevId: 292647187\n\nb224b317bf20c6a4fbc5030b4a969c3147f27ad3\nAdds API definitions for bigqueryreservation v1beta1.\n\nPiperOrigin-RevId: 292634722\n\nc1468702f9b17e20dd59007c0804a089b83197d2\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 292626173\n\nffdfa4f55ab2f0afc11d0eb68f125ccbd5e404bd\nvision: v1p3beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605599\n\n78f61482cd028fc1d9892aa5d89d768666a954cd\nvision: v1p1beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292605125\n\n60bb5a294a604fd1778c7ec87b265d13a7106171\nvision: v1p2beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604980\n\n3bcf7aa79d45eb9ec29ab9036e9359ea325a7fc3\nvision: v1p4beta1 publish annotations and retry config\n\nPiperOrigin-RevId: 292604656\n\n2717b8a1c762b26911b45ecc2e4ee01d98401b28\nFix dataproc artman client library generation.\n\nPiperOrigin-RevId: 292555664\n\n7ac66d9be8a7d7de4f13566d8663978c9ee9dcd7\nAdd Dataproc Autoscaling API to V1.\n\nPiperOrigin-RevId: 292450564\n\n5d932b2c1be3a6ef487d094e3cf5c0673d0241dd\n- Improve documentation\n- Add a client_id field to StreamingPullRequest\n\nPiperOrigin-RevId: 292434036\n\neaff9fa8edec3e914995ce832b087039c5417ea7\nmonitoring: v3 publish annotations and client retry config\n\nPiperOrigin-RevId: 292425288\n\n70958bab8c5353870d31a23fb2c40305b050d3fe\nBigQuery Storage Read API v1 clients.\n\nPiperOrigin-RevId: 292407644\n\n7a15e7fe78ff4b6d5c9606a3264559e5bde341d1\nUpdate backend proto for Google Cloud Endpoints\n\nPiperOrigin-RevId: 292391607\n\n3ca2c014e24eb5111c8e7248b1e1eb833977c83d\nbazel: Add --flaky_test_attempts=3 argument to prevent CI failures caused by flaky tests\n\nPiperOrigin-RevId: 292382559\n\n9933347c1f677e81e19a844c2ef95bfceaf694fe\nbazel:Integrate latest protoc-java-resource-names-plugin changes (fix for PyYAML dependency in bazel rules)\n\nPiperOrigin-RevId: 292376626\n\nb835ab9d2f62c88561392aa26074c0b849fb0bd3\nasset: v1p2beta1 add client config annotations\n\n* remove unintentionally exposed RPCs\n* remove messages relevant to removed RPCs\n\nPiperOrigin-RevId: 292369593\n\nc1246a29e22b0f98e800a536b5b0da2d933a55f2\nUpdating v1 protos with the latest inline documentation (in comments) and config options. Also adding a per-service .yaml file.\n\nPiperOrigin-RevId: 292310790\n\nb491d07cadaae7cde5608321f913e5ca1459b32d\nRevert accidental local_repository change\n\nPiperOrigin-RevId: 292245373\n\naf3400a8cb6110025198b59a0f7d018ae3cda700\nUpdate gapic-generator dependency (prebuilt PHP binary support).\n\nPiperOrigin-RevId: 292243997\n\n341fd5690fae36f36cf626ef048fbcf4bbe7cee6\ngrafeas: v1 add resource_definition for the grafeas.io/Project and change references for Project.\n\nPiperOrigin-RevId: 292221998\n\n42e915ec2ece1cd37a590fbcd10aa2c0fb0e5b06\nUpdate the gapic-generator, protoc-java-resource-name-plugin and protoc-docs-plugin to the latest commit.\n\nPiperOrigin-RevId: 292182368\n\nf035f47250675d31492a09f4a7586cfa395520a7\nFix grafeas build and update build.sh script to include gerafeas.\n\nPiperOrigin-RevId: 292168753\n\n26ccb214b7bc4a716032a6266bcb0a9ca55d6dbb\nasset: v1p1beta1 add client config annotations and retry config\n\nPiperOrigin-RevId: 292154210\n\n974ee5c0b5d03e81a50dafcedf41e0efebb5b749\nasset: v1beta1 add client config annotations\n\nPiperOrigin-RevId: 292152573\n\ncf3b61102ed5f36b827bc82ec39be09525f018c8\n Fix to protos for v1p1beta1 release of Cloud Security Command Center\n\nPiperOrigin-RevId: 292034635\n\n4e1cfaa7c0fede9e65d64213ca3da1b1255816c0\nUpdate the public proto to support UTF-8 encoded id for CatalogService API, increase the ListCatalogItems deadline to 300s and some minor documentation change\n\nPiperOrigin-RevId: 292030970\n\n9c483584f8fd5a1b862ae07973f4cc7bb3e46648\nasset: add annotations to v1p1beta1\n\nPiperOrigin-RevId: 292009868\n\ne19209fac29731d0baf6d9ac23da1164f7bdca24\nAdd the google.rpc.context.AttributeContext message to the open source\ndirectories.\n\nPiperOrigin-RevId: 291999930\n\nae5662960573f279502bf98a108a35ba1175e782\noslogin API: move file level option on top of the file to avoid protobuf.js bug.\n\nPiperOrigin-RevId: 291990506\n\neba3897fff7c49ed85d3c47fc96fe96e47f6f684\nAdd cc_proto_library and cc_grpc_library targets for Spanner and IAM protos.\n\nPiperOrigin-RevId: 291988651\n\n" + "sha": "0646bc775203077226c2c34d3e4d50cc4ec53660", + "internalRef": "294809380" } }, { From 7640953fb4b76cc99391adb38e68dd3111ad2f14 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2020 12:14:37 -0800 Subject: [PATCH 045/223] chore: release 1.4.0 (#63) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 5757ebdf5933..2c570d18e01b 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.4.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.3...v1.4.0) (2020-02-13) + + +### Features + +* bump release level to GA ([#62](https://www.github.com/googleapis/nodejs-cloudbuild/issues/62)) ([114756d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/114756d12007d1978fc3e4bb71b72e543bcc6945)) + ### [1.3.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.2...v1.3.3) (2020-02-10) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 59b40839b04c..93b7cc74df79 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.3.3", + "version": "1.4.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 9decf4fb48a3..8481326b785e 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.3.3" + "@google-cloud/cloudbuild": "^1.4.0" }, "devDependencies": { "c8": "^7.0.0", From bf38b341a92d3e130687f0bfe866d620de04a311 Mon Sep 17 00:00:00 2001 From: Xiaozhen Liu Date: Wed, 26 Feb 2020 15:07:29 -0800 Subject: [PATCH 046/223] feat: export protos in src/index.ts --- packages/google-devtools-cloudbuild/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index fa27b3415abd..76d862c077cb 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -22,3 +22,5 @@ export {v1, CloudBuildClient}; // For compatibility with JavaScript libraries we need to provide this default export: // tslint:disable-next-line no-default-export export default {v1, CloudBuildClient}; +import * as protos from '../protos/protos'; +export {protos}; From 07c699e92bdcf0b5dc3c0eeab183ea83971fbbd7 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 11:52:53 -0800 Subject: [PATCH 047/223] chore: update jsdoc.js (#70) --- packages/google-devtools-cloudbuild/.jsdoc.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 1b1e92dee11e..e840c5095434 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -36,11 +36,14 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2018 Google, LLC.', + copyright: 'Copyright 2019 Google, LLC.', includeDate: false, sourceFiles: false, systemName: '@google-cloud/cloudbuild', - theme: 'lumen' + theme: 'lumen', + default: { + "outputSourceFiles": false + } }, markdown: { idInHeadings: true From 26b66284d6442cb8e15beff8952bb0e208ac124d Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Thu, 27 Feb 2020 15:38:45 -0800 Subject: [PATCH 048/223] chore: update .jsdoc.js by add protos and remove double quotes (#71) --- packages/google-devtools-cloudbuild/.jsdoc.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index e840c5095434..7179e2a5385b 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -31,7 +31,8 @@ module.exports = { source: { excludePattern: '(^|\\/|\\\\)[._]', include: [ - 'build/src' + 'build/src', + 'protos' ], includePattern: '\\.js$' }, @@ -42,7 +43,7 @@ module.exports = { systemName: '@google-cloud/cloudbuild', theme: 'lumen', default: { - "outputSourceFiles": false + outputSourceFiles: false } }, markdown: { From b0c3759551bbca9b10a5d96300ea829d0901bcc9 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Fri, 28 Feb 2020 16:36:30 -0800 Subject: [PATCH 049/223] chore: update jsdoc with macro license (#73) --- packages/google-devtools-cloudbuild/.jsdoc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 7179e2a5385b..882b3291bb9a 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. // +// ** 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'; From 6ca9763af3c4bfa07a568d20e2fe1a20506d0210 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 29 Feb 2020 11:24:02 -0800 Subject: [PATCH 050/223] chore: update synth.py, .jsdoc.js (#74) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/af76c96f-8456-41b7-acc1-7873b0b543d8/targets --- .../google-devtools-cloudbuild/package.json | 4 +-- .../google-devtools-cloudbuild/synth.metadata | 13 +++------- packages/google-devtools-cloudbuild/synth.py | 25 ++---------------- .../system-test/fixtures/sample/src/index.js | 26 +++++++++++++++++++ .../system-test/fixtures/sample/src/index.ts | 25 ++++++++++++++++++ 5 files changed, 58 insertions(+), 35 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 93b7cc74df79..c449b88805b4 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -52,7 +52,7 @@ "prepare": "npm run compile-protos && npm run compile", "pretest": "npm run compile", "test": "c8 mocha build/test", - "system-test": "c8 mocha --timeout=15000 system-test/*.js", + "system-test": "c8 mocha --timeout=15000 system-test/*.js build/system-test/*.js", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", "docs-test": "linkinator docs", @@ -63,6 +63,6 @@ "node": ">=8.10.0" }, "dependencies": { - "google-gax": "^1.7.5" + "google-gax": "^1.14.2" } } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0e629b1de418..87b89ec0807f 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,19 +1,12 @@ { - "updateTime": "2020-02-13T04:36:50.444597Z", + "updateTime": "2020-02-29T19:14:13.934361Z", "sources": [ - { - "git": { - "name": ".", - "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", - "sha": "7efa0aeeb4ee354fda57b14807f8a3d0f4bab194" - } - }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0646bc775203077226c2c34d3e4d50cc4ec53660", - "internalRef": "294809380" + "sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080", + "internalRef": "297918498" } }, { diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index f7dd862b279f..4dcce43e56f7 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -27,7 +27,8 @@ library = gapic.typescript_library( 'cloudbuild', generator_args={ - "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json" + "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json", + "package-name": "@google-cloud/cloudbuild" }, proto_path='/google/devtools/cloudbuild/v1', version=version) @@ -39,27 +40,5 @@ s.copy(templates, excludes=[]) # Node.js specific cleanup -subprocess.run(['rm', '-rf', './system-test/fixtures']) subprocess.run(['npm', 'install']) subprocess.run(['npm', 'run', 'fix']) - -# Add missing jsdoc annotations: -s.replace("src/index.js", -r"""\/\*\* - \* @namespace google - \*/""", -r"""/** - * @namespace google - */ -/** - * @namespace google.rpc - */ -/** - * @namespace google.protobuf - */ -/** - * @namespace google.longrunning - */""") -s.replace("src/index.js", -r"namespace google.cloud.cloudbuild", -r"namespace google.devtools.cloudbuild") diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..5fa8fdb4709f --- /dev/null +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 cloudbuild = require('@google-cloud/cloudbuild'); + +function main() { + const cloudBuildClient = new cloudbuild.CloudBuildClient(); +} + +main(); diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..4ab3ab35685c --- /dev/null +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {CloudBuildClient} from '@google-cloud/cloudbuild'; + +function main() { + const cloudBuildClient = new CloudBuildClient(); +} + +main(); From 1f2a22e956483959dcfdb53fce9de14da4e52ca8 Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 00:14:18 +0000 Subject: [PATCH 051/223] feat: deferred client initialization (#75) This PR includes changes from https://github.com/googleapis/gapic-generator-typescript/pull/317 that will move the asynchronous initialization and authentication from the client constructor to an `initialize()` method. This method will be automatically called when the first RPC call is performed. The client library usage has not changed, there is no need to update any code. If you want to make sure the client is authenticated _before_ the first RPC call, you can do ```js await client.initialize(); ``` manually before calling any client method. --- .../src/v1/cloud_build_client.ts | 103 +++++++++++++----- .../google-devtools-cloudbuild/synth.metadata | 7 +- .../test/gapic-cloud_build-v1.ts | 80 ++++++++++++++ 3 files changed, 159 insertions(+), 31 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index b160b0f8ef0d..d49f0754f02f 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -51,9 +51,14 @@ export class CloudBuildClient { private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; + private _opts: ClientOptions; + 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; operationsClient: gax.OperationsClient; - cloudBuildStub: Promise<{[name: string]: Function}>; + cloudBuildStub?: Promise<{[name: string]: Function}>; /** * Construct an instance of CloudBuildClient. @@ -77,8 +82,6 @@ export class CloudBuildClient { * 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 {function} [options.promise] - Custom promise module to use instead - * of native Promises. * @param {string} [options.apiEndpoint] - The domain name of the * API remote host. */ @@ -108,25 +111,28 @@ export class CloudBuildClient { // If we are in browser, we are already using fallback because of the // "browser" field in package.json. // But if we were explicitly requested to use fallback, let's do it now. - const gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. opts.scopes = (this.constructor as typeof CloudBuildClient).scopes; - const gaxGrpc = new gaxModule.GrpcClient(opts); + 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 = gaxGrpc.auth as gax.GoogleAuth; + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; // Determine the client header string. - const clientHeader = [`gax/${gaxModule.version}`, `gapic/${version}`]; + 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/${gaxModule.version}`); + clientHeader.push(`gl-web/${this._gaxModule.version}`); } if (!opts.fallback) { - clientHeader.push(`grpc/${gaxGrpc.grpcVersion}`); + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); } if (opts.libName && opts.libVersion) { clientHeader.push(`${opts.libName}/${opts.libVersion}`); @@ -142,7 +148,7 @@ export class CloudBuildClient { 'protos', 'protos.json' ); - const protos = gaxGrpc.loadProto( + this._protos = this._gaxGrpc.loadProto( opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath ); @@ -150,12 +156,12 @@ export class CloudBuildClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this._descriptors.page = { - listBuilds: new gaxModule.PageDescriptor( + listBuilds: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'builds' ), - listBuildTriggers: new gaxModule.PageDescriptor( + listBuildTriggers: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', 'triggers' @@ -166,13 +172,15 @@ export class CloudBuildClient { // an Operation object that allows for tracking of the operation, // rather than holding a request open. const protoFilesRoot = opts.fallback - ? gaxModule.protobuf.Root.fromJSON(require('../../protos/protos.json')) - : gaxModule.protobuf.loadSync(nodejsProtoPath); + ? this._gaxModule.protobuf.Root.fromJSON( + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); - this.operationsClient = gaxModule + this.operationsClient = this._gaxModule .lro({ auth: this.auth, - grpc: 'grpc' in gaxGrpc ? gaxGrpc.grpc : undefined, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, }) .operationsClient(opts); const createBuildResponse = protoFilesRoot.lookup( @@ -195,17 +203,17 @@ export class CloudBuildClient { ) as gax.protobuf.Type; this._descriptors.longrunning = { - createBuild: new gaxModule.LongrunningDescriptor( + createBuild: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createBuildResponse.decode.bind(createBuildResponse), createBuildMetadata.decode.bind(createBuildMetadata) ), - retryBuild: new gaxModule.LongrunningDescriptor( + retryBuild: new this._gaxModule.LongrunningDescriptor( this.operationsClient, retryBuildResponse.decode.bind(retryBuildResponse), retryBuildMetadata.decode.bind(retryBuildMetadata) ), - runBuildTrigger: new gaxModule.LongrunningDescriptor( + runBuildTrigger: new this._gaxModule.LongrunningDescriptor( this.operationsClient, runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata) @@ -213,7 +221,7 @@ export class CloudBuildClient { }; // Put together the default options sent with requests. - const defaults = gaxGrpc.constructSettings( + this._defaults = this._gaxGrpc.constructSettings( 'google.devtools.cloudbuild.v1.CloudBuild', gapicConfig as gax.ClientConfig, opts.clientConfig || {}, @@ -224,17 +232,35 @@ export class CloudBuildClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this._innerApiCalls = {}; + } + + /** + * 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.cloudBuildStub) { + return this.cloudBuildStub; + } // Put together the "service stub" for // google.devtools.cloudbuild.v1.CloudBuild. - this.cloudBuildStub = gaxGrpc.createStub( - opts.fallback - ? (protos as protobuf.Root).lookupService( + this.cloudBuildStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( 'google.devtools.cloudbuild.v1.CloudBuild' ) : // tslint:disable-next-line no-any - (protos as any).google.devtools.cloudbuild.v1.CloudBuild, - opts + (this._protos as any).google.devtools.cloudbuild.v1.CloudBuild, + this._opts ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -271,9 +297,9 @@ export class CloudBuildClient { } ); - const apiCall = gaxModule.createApiCall( + const apiCall = this._gaxModule.createApiCall( innerCallPromise, - defaults[methodName], + this._defaults[methodName], this._descriptors.page[methodName] || this._descriptors.stream[methodName] || this._descriptors.longrunning[methodName] @@ -287,6 +313,8 @@ export class CloudBuildClient { return apiCall(argument, callOptions, callback); }; } + + return this.cloudBuildStub; } /** @@ -407,6 +435,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.getBuild(request, options, callback); } cancelBuild( @@ -474,6 +503,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.cancelBuild(request, options, callback); } createBuildTrigger( @@ -551,6 +581,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.createBuildTrigger(request, options, callback); } getBuildTrigger( @@ -628,6 +659,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.getBuildTrigger(request, options, callback); } deleteBuildTrigger( @@ -705,6 +737,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.deleteBuildTrigger(request, options, callback); } updateBuildTrigger( @@ -784,6 +817,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.updateBuildTrigger(request, options, callback); } createWorkerPool( @@ -861,6 +895,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.createWorkerPool(request, options, callback); } getWorkerPool( @@ -937,6 +972,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.getWorkerPool(request, options, callback); } deleteWorkerPool( @@ -1013,6 +1049,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.deleteWorkerPool(request, options, callback); } updateWorkerPool( @@ -1091,6 +1128,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.updateWorkerPool(request, options, callback); } listWorkerPools( @@ -1166,6 +1204,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.listWorkerPools(request, options, callback); } @@ -1252,6 +1291,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.createBuild(request, options, callback); } retryBuild( @@ -1359,6 +1399,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.retryBuild(request, options, callback); } runBuildTrigger( @@ -1442,6 +1483,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.runBuildTrigger(request, options, callback); } listBuilds( @@ -1527,6 +1569,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.listBuilds(request, options, callback); } @@ -1565,6 +1608,7 @@ export class CloudBuildClient { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listBuilds.createStream( this._innerApiCalls.listBuilds as gax.GaxCall, request, @@ -1651,6 +1695,7 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + this.initialize(); return this._innerApiCalls.listBuildTriggers(request, options, callback); } @@ -1687,6 +1732,7 @@ export class CloudBuildClient { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); + this.initialize(); return this._descriptors.page.listBuildTriggers.createStream( this._innerApiCalls.listBuildTriggers as gax.GaxCall, request, @@ -1700,8 +1746,9 @@ export class CloudBuildClient { * The client will no longer be usable and all future behavior is undefined. */ close(): Promise { + this.initialize(); if (!this._terminated) { - return this.cloudBuildStub.then(stub => { + return this.cloudBuildStub!.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 87b89ec0807f..59f89b39e30c 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,13 @@ { - "updateTime": "2020-02-29T19:14:13.934361Z", + "updateTime": "2020-03-05T23:03:38.966192Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "83c6f84035ee0f80eaa44d8b688a010461cc4080", - "internalRef": "297918498" + "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", + "internalRef": "299181282", + "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index eb1c2bbbc83d..3327bf1ac756 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -102,12 +102,30 @@ describe('v1.CloudBuildClient', () => { }); assert(client); }); + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudBuildStub, undefined); + await client.initialize(); + assert(client.cloudBuildStub); + }); + it('has close method', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); describe('getBuild', () => { it('invokes getBuild without error', done => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; // Mock response @@ -130,6 +148,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; // Mock response @@ -154,6 +174,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; // Mock response @@ -176,6 +198,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; // Mock response @@ -200,6 +224,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; // Mock response @@ -222,6 +248,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; // Mock response @@ -246,6 +274,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; // Mock response @@ -268,6 +298,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; // Mock response @@ -292,6 +324,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; // Mock response @@ -314,6 +348,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; // Mock response @@ -338,6 +374,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; // Mock response @@ -360,6 +398,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; // Mock response @@ -384,6 +424,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; // Mock response @@ -406,6 +448,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; // Mock response @@ -430,6 +474,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; // Mock response @@ -452,6 +498,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; // Mock response @@ -476,6 +524,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; // Mock response @@ -498,6 +548,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; // Mock response @@ -522,6 +574,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; // Mock response @@ -544,6 +598,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; // Mock response @@ -568,6 +624,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; // Mock response @@ -590,6 +648,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; // Mock response @@ -614,6 +674,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; // Mock response @@ -643,6 +705,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; // Mock response @@ -675,6 +739,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; // Mock response @@ -704,6 +770,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; // Mock response @@ -736,6 +804,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; // Mock response @@ -765,6 +835,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; // Mock response @@ -797,6 +869,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; // Mock response @@ -823,6 +897,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; // Mock response @@ -854,6 +930,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; // Mock response @@ -880,6 +958,8 @@ describe('v1.CloudBuildClient', () => { credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); + // Initialize client before mocking + client.initialize(); // Mock request const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; // Mock response From 57b143622b764afb07cf3c2a49eb728f507eb531 Mon Sep 17 00:00:00 2001 From: "gcf-merge-on-green[bot]" <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2020 01:23:17 +0000 Subject: [PATCH 052/223] build: update linkinator config (#76) --- packages/google-devtools-cloudbuild/linkinator.config.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/linkinator.config.json b/packages/google-devtools-cloudbuild/linkinator.config.json index b555215ca020..29a223b6db64 100644 --- a/packages/google-devtools-cloudbuild/linkinator.config.json +++ b/packages/google-devtools-cloudbuild/linkinator.config.json @@ -4,5 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io" - ] + ], + "silent": true, + "concurrency": 10 } From 5744c8f00f7d11c3fc2c36e5d4b01af6cbe91dbc Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 6 Mar 2020 14:57:02 -0800 Subject: [PATCH 053/223] build(tests): fix coveralls and enable build cop (#77) --- .../google-devtools-cloudbuild/.mocharc.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 packages/google-devtools-cloudbuild/.mocharc.js diff --git a/packages/google-devtools-cloudbuild/.mocharc.js b/packages/google-devtools-cloudbuild/.mocharc.js new file mode 100644 index 000000000000..ff7b34fa5d18 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.mocharc.js @@ -0,0 +1,28 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +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 From 641bae872ba3f120a1031c23f41f509d2c59a4a3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 9 Mar 2020 16:22:05 -0700 Subject: [PATCH 054/223] feat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields. (#79) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d38ead4b-834e-4df6-8d70-237b6acdf43b/targets --- .../devtools/cloudbuild/v1/cloudbuild.proto | 75 ++++++---- .../protos/protos.d.ts | 27 +++- .../protos/protos.js | 128 +++++++++++++++++- .../protos/protos.json | 85 ++++++++++-- .../src/v1/cloud_build_client.ts | 2 +- .../google-devtools-cloudbuild/synth.metadata | 8 +- 6 files changed, 279 insertions(+), 46 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 1cf045394e33..cce87526e64a 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -11,7 +11,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// syntax = "proto3"; @@ -271,8 +270,7 @@ message RepoSource { // project ID requesting the build is assumed. string project_id = 1; - // Name of the Cloud Source Repository. If omitted, the name "default" is - // assumed. + // Required. Name of the Cloud Source Repository. string repo_name = 2; // A revision within the Cloud Source Repository must be specified in @@ -299,6 +297,14 @@ message RepoSource { // This must be a relative path. If a step's `dir` is specified and is an // absolute path, this value is ignored for that step's execution. string dir = 7; + + // Only trigger a build if the revision regex does NOT match the revision + // regex. + bool invert_regex = 8; + + // Substitutions to use in a triggered build. + // Should only be used with RunBuildTrigger + map substitutions = 9; } // Location of the source in a supported storage service. @@ -324,7 +330,7 @@ message BuiltImage { string digest = 3; // Output only. Stores timing information for pushing the specified image. - TimeSpan push_timing = 4; + TimeSpan push_timing = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A step in the build pipeline. @@ -405,7 +411,7 @@ message BuildStep { repeated Volume volumes = 9; // Output only. Stores timing information for executing this build step. - TimeSpan timing = 10; + TimeSpan timing = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Stores timing information for pulling this build step's // builder image only. @@ -520,13 +526,16 @@ message Build { // Build or step was canceled by a user. CANCELLED = 7; + + // Build was enqueued for longer than the value of `queue_ttl`. + EXPIRED = 9; } // Output only. Unique identifier of the build. - string id = 1; + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. ID of the project. - string project_id = 16; + string project_id = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Status of the build. Status status = 2; @@ -541,19 +550,22 @@ message Build { repeated BuildStep steps = 11; // Output only. Results of the build. - Results results = 10; + Results results = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which the request to create the build was received. - google.protobuf.Timestamp create_time = 6; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which execution of the build was started. - google.protobuf.Timestamp start_time = 7; + google.protobuf.Timestamp start_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which execution of the build was finished. // // The difference between finish_time and start_time is the duration of the // build's execution. - google.protobuf.Timestamp finish_time = 8; + google.protobuf.Timestamp finish_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Amount of time that this build should be allowed to run, to second // granularity. If this amount of time elapses, work on the build will cease @@ -595,7 +607,7 @@ message Build { BuildOptions options = 23; // Output only. URL to logs for this build in Google Cloud Console. - string log_url = 25; + string log_url = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; // Substitutions data for `Build` resource. map substitutions = 29; @@ -615,7 +627,7 @@ message Build { // // If the build does not specify source or images, // these keys will not be included. - map timing = 33; + map timing = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Artifacts produced by a build that should be uploaded upon @@ -700,7 +712,8 @@ message SourceProvenance { // // If the build source came in a single package such as a gzipped tarfile // (`.tar.gz`), the `FileHash` will be for the single path to that file. - map file_hashes = 4; + map file_hashes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Container message for hashes of byte content of files, used in @@ -801,12 +814,17 @@ message CancelBuildRequest { // changes. message BuildTrigger { // Output only. Unique identifier of the trigger. - string id = 1; + string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Human-readable description of this trigger. string description = 10; - // User assigned name of the trigger. Must be unique within the project. + // User-assigned name of the trigger. Must be unique within the project. + // Trigger names must meet the following requirements: + // + // + They must contain only alphanumeric characters and dashes. + // + They can be 1-64 characters long. + // + They must begin and end with an alphanumeric character. string name = 21; // Tags for annotation of a `BuildTrigger` @@ -838,7 +856,8 @@ message BuildTrigger { } // Output only. Time when the trigger was created. - google.protobuf.Timestamp create_time = 5; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // If true, the trigger will never result in a build. bool disabled = 9; @@ -847,7 +866,7 @@ message BuildTrigger { map substitutions = 11; // ignored_files and included_files are file glob matches using - // http://godoc/pkg/path/filepath#Match extended with support for "**". + // https://golang.org/pkg/path/filepath/#Match extended with support for "**". // // If ignored_files and changed files are both empty, then they are // not used to determine whether or not to trigger a build. @@ -919,9 +938,12 @@ message PullRequestFilter { string branch = 2; } - // Whether to block builds on a "/gcbrun" comment from a repository owner or + // Whether to block builds on a "/gcbrun" comment from a repository admin or // collaborator. CommentControl comment_control = 5; + + // If true, branches that do NOT match the git_ref will trigger a build. + bool invert_regex = 6; } // Push contains filter properties for matching GitHub git pushes. @@ -941,6 +963,10 @@ message PushFilter { // RE2 and described at https://github.com/google/re2/wiki/Syntax string tag = 3; } + + // When true, only trigger a build if the revision regex does NOT match the + // git_ref regex. + bool invert_regex = 4; } // Request to create a new `BuildTrigger`. @@ -957,7 +983,7 @@ message GetBuildTriggerRequest { // Required. ID of the project that owns the trigger. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. ID of the `BuildTrigger` to get. + // Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -1087,9 +1113,10 @@ message BuildOptions { // Storage. LogStreamingOption log_streaming_option = 5; - // Option to specify a `WorkerPool` for the build. User specifies the pool - // with the format "[WORKERPOOL_PROJECT_ID]/[WORKERPOOL_NAME]". - // This is an experimental field. + // Option to specify a `WorkerPool` for the build. + // Format: projects/{project}/workerPools/{workerPool} + // + // This field is experimental. string worker_pool = 7; // Option to specify the logging mode, which determines where the logs are diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 127c499f59f4..fe028a9e12e0 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -706,6 +706,12 @@ export namespace google { /** RepoSource dir */ dir?: (string|null); + + /** RepoSource invertRegex */ + invertRegex?: (boolean|null); + + /** RepoSource substitutions */ + substitutions?: ({ [k: string]: string }|null); } /** Represents a RepoSource. */ @@ -735,6 +741,12 @@ export namespace google { /** RepoSource dir. */ public dir: string; + /** RepoSource invertRegex. */ + public invertRegex: boolean; + + /** RepoSource substitutions. */ + public substitutions: { [k: string]: string }; + /** RepoSource revision. */ public revision?: ("branchName"|"tagName"|"commitSha"); @@ -1711,7 +1723,8 @@ export namespace google { FAILURE = 4, INTERNAL_ERROR = 5, TIMEOUT = 6, - CANCELLED = 7 + CANCELLED = 7, + EXPIRED = 9 } } @@ -3278,6 +3291,9 @@ export namespace google { /** PullRequestFilter commentControl */ commentControl?: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|keyof typeof google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null); + + /** PullRequestFilter invertRegex */ + invertRegex?: (boolean|null); } /** Represents a PullRequestFilter. */ @@ -3295,6 +3311,9 @@ export namespace google { /** PullRequestFilter commentControl. */ public commentControl: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|keyof typeof google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl); + /** PullRequestFilter invertRegex. */ + public invertRegex: boolean; + /** PullRequestFilter gitRef. */ public gitRef?: "branch"; @@ -3386,6 +3405,9 @@ export namespace google { /** PushFilter tag */ tag?: (string|null); + + /** PushFilter invertRegex */ + invertRegex?: (boolean|null); } /** Represents a PushFilter. */ @@ -3403,6 +3425,9 @@ export namespace google { /** PushFilter tag. */ public tag: string; + /** PushFilter invertRegex. */ + public invertRegex: boolean; + /** PushFilter gitRef. */ public gitRef?: ("branch"|"tag"); diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 0d1e426854a2..8d2a8507cb8c 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1334,6 +1334,8 @@ * @property {string|null} [tagName] RepoSource tagName * @property {string|null} [commitSha] RepoSource commitSha * @property {string|null} [dir] RepoSource dir + * @property {boolean|null} [invertRegex] RepoSource invertRegex + * @property {Object.|null} [substitutions] RepoSource substitutions */ /** @@ -1345,6 +1347,7 @@ * @param {google.devtools.cloudbuild.v1.IRepoSource=} [properties] Properties to set */ function RepoSource(properties) { + this.substitutions = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1399,6 +1402,22 @@ */ RepoSource.prototype.dir = ""; + /** + * RepoSource invertRegex. + * @member {boolean} invertRegex + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.invertRegex = false; + + /** + * RepoSource substitutions. + * @member {Object.} substitutions + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @instance + */ + RepoSource.prototype.substitutions = $util.emptyObject; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1449,6 +1468,11 @@ writer.uint32(/* id 5, wireType 2 =*/42).string(message.commitSha); if (message.dir != null && message.hasOwnProperty("dir")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.dir); + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.invertRegex); + if (message.substitutions != null && message.hasOwnProperty("substitutions")) + for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); return writer; }; @@ -1479,7 +1503,7 @@ RepoSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RepoSource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RepoSource(), key; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1501,6 +1525,17 @@ case 7: message.dir = reader.string(); break; + case 8: + message.invertRegex = reader.bool(); + break; + case 9: + reader.skip().pos++; + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + key = reader.string(); + reader.pos++; + message.substitutions[key] = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -1565,6 +1600,17 @@ if (message.dir != null && message.hasOwnProperty("dir")) if (!$util.isString(message.dir)) return "dir: string expected"; + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (typeof message.invertRegex !== "boolean") + return "invertRegex: boolean expected"; + if (message.substitutions != null && message.hasOwnProperty("substitutions")) { + if (!$util.isObject(message.substitutions)) + return "substitutions: object expected"; + var key = Object.keys(message.substitutions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.substitutions[key[i]])) + return "substitutions: string{k:string} expected"; + } return null; }; @@ -1592,6 +1638,15 @@ message.commitSha = String(object.commitSha); if (object.dir != null) message.dir = String(object.dir); + if (object.invertRegex != null) + message.invertRegex = Boolean(object.invertRegex); + if (object.substitutions) { + if (typeof object.substitutions !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.RepoSource.substitutions: object expected"); + message.substitutions = {}; + for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) + message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); + } return message; }; @@ -1608,10 +1663,13 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.substitutions = {}; if (options.defaults) { object.projectId = ""; object.repoName = ""; object.dir = ""; + object.invertRegex = false; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; @@ -1634,6 +1692,14 @@ } if (message.dir != null && message.hasOwnProperty("dir")) object.dir = message.dir; + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + object.invertRegex = message.invertRegex; + var keys2; + if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { + object.substitutions = {}; + for (var j = 0; j < keys2.length; ++j) + object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; + } return object; }; @@ -2527,6 +2593,7 @@ case 5: case 6: case 7: + case 9: break; } return null; @@ -2638,6 +2705,10 @@ case 7: message.status = 7; break; + case "EXPIRED": + case 9: + message.status = 9; + break; } return message; }; @@ -4020,6 +4091,7 @@ case 5: case 6: case 7: + case 9: break; } if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) @@ -4181,6 +4253,10 @@ case 7: message.status = 7; break; + case "EXPIRED": + case 9: + message.status = 9; + break; } if (object.statusDetail != null) message.statusDetail = String(object.statusDetail); @@ -4419,6 +4495,7 @@ * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value * @property {number} TIMEOUT=6 TIMEOUT value * @property {number} CANCELLED=7 CANCELLED value + * @property {number} EXPIRED=9 EXPIRED value */ Build.Status = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -4430,6 +4507,7 @@ values[valuesById[5] = "INTERNAL_ERROR"] = 5; values[valuesById[6] = "TIMEOUT"] = 6; values[valuesById[7] = "CANCELLED"] = 7; + values[valuesById[9] = "EXPIRED"] = 9; return values; })(); @@ -8324,6 +8402,7 @@ * @interface IPullRequestFilter * @property {string|null} [branch] PullRequestFilter branch * @property {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null} [commentControl] PullRequestFilter commentControl + * @property {boolean|null} [invertRegex] PullRequestFilter invertRegex */ /** @@ -8357,6 +8436,14 @@ */ PullRequestFilter.prototype.commentControl = 0; + /** + * PullRequestFilter invertRegex. + * @member {boolean} invertRegex + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + PullRequestFilter.prototype.invertRegex = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -8399,6 +8486,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); if (message.commentControl != null && message.hasOwnProperty("commentControl")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.commentControl); + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.invertRegex); return writer; }; @@ -8439,6 +8528,9 @@ case 5: message.commentControl = reader.int32(); break; + case 6: + message.invertRegex = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -8488,6 +8580,9 @@ case 1: break; } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (typeof message.invertRegex !== "boolean") + return "invertRegex: boolean expected"; return null; }; @@ -8515,6 +8610,8 @@ message.commentControl = 1; break; } + if (object.invertRegex != null) + message.invertRegex = Boolean(object.invertRegex); return message; }; @@ -8531,8 +8628,10 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.commentControl = options.enums === String ? "COMMENTS_DISABLED" : 0; + object.invertRegex = false; + } if (message.branch != null && message.hasOwnProperty("branch")) { object.branch = message.branch; if (options.oneofs) @@ -8540,6 +8639,8 @@ } if (message.commentControl != null && message.hasOwnProperty("commentControl")) object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + object.invertRegex = message.invertRegex; return object; }; @@ -8579,6 +8680,7 @@ * @interface IPushFilter * @property {string|null} [branch] PushFilter branch * @property {string|null} [tag] PushFilter tag + * @property {boolean|null} [invertRegex] PushFilter invertRegex */ /** @@ -8612,6 +8714,14 @@ */ PushFilter.prototype.tag = ""; + /** + * PushFilter invertRegex. + * @member {boolean} invertRegex + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + */ + PushFilter.prototype.invertRegex = false; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -8654,6 +8764,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); if (message.tag != null && message.hasOwnProperty("tag")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.invertRegex); return writer; }; @@ -8694,6 +8806,9 @@ case 3: message.tag = reader.string(); break; + case 4: + message.invertRegex = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -8742,6 +8857,9 @@ if (!$util.isString(message.tag)) return "tag: string expected"; } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (typeof message.invertRegex !== "boolean") + return "invertRegex: boolean expected"; return null; }; @@ -8761,6 +8879,8 @@ message.branch = String(object.branch); if (object.tag != null) message.tag = String(object.tag); + if (object.invertRegex != null) + message.invertRegex = Boolean(object.invertRegex); return message; }; @@ -8777,6 +8897,8 @@ if (!options) options = {}; var object = {}; + if (options.defaults) + object.invertRegex = false; if (message.branch != null && message.hasOwnProperty("branch")) { object.branch = message.branch; if (options.oneofs) @@ -8787,6 +8909,8 @@ if (options.oneofs) object.gitRef = "tag"; } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + object.invertRegex = message.invertRegex; return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index da14df41bd99..ce36bf07ef8f 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -235,6 +235,15 @@ "dir": { "type": "string", "id": 7 + }, + "invertRegex": { + "type": "bool", + "id": 8 + }, + "substitutions": { + "keyType": "string", + "type": "string", + "id": 9 } } }, @@ -270,7 +279,10 @@ }, "pushTiming": { "type": "TimeSpan", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -319,7 +331,10 @@ }, "timing": { "type": "TimeSpan", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "pullTiming": { "type": "TimeSpan", @@ -395,11 +410,17 @@ "fields": { "id": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "projectId": { "type": "string", - "id": 16 + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "status": { "type": "Status", @@ -420,19 +441,31 @@ }, "results": { "type": "Results", - "id": 10 + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "startTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "finishTime": { "type": "google.protobuf.Timestamp", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "timeout": { "type": "google.protobuf.Duration", @@ -465,7 +498,10 @@ }, "logUrl": { "type": "string", - "id": 25 + "id": 25, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "substitutions": { "keyType": "string", @@ -485,7 +521,10 @@ "timing": { "keyType": "string", "type": "TimeSpan", - "id": 33 + "id": 33, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -498,7 +537,8 @@ "FAILURE": 4, "INTERNAL_ERROR": 5, "TIMEOUT": 6, - "CANCELLED": 7 + "CANCELLED": 7, + "EXPIRED": 9 } } } @@ -568,7 +608,10 @@ "fileHashes": { "keyType": "string", "type": "FileHashes", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -717,7 +760,10 @@ "fields": { "id": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "description": { "type": "string", @@ -750,7 +796,10 @@ }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "disabled": { "type": "bool", @@ -824,6 +873,10 @@ "commentControl": { "type": "CommentControl", "id": 5 + }, + "invertRegex": { + "type": "bool", + "id": 6 } }, "nested": { @@ -852,6 +905,10 @@ "tag": { "type": "string", "id": 3 + }, + "invertRegex": { + "type": "bool", + "id": 4 } } }, diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index d49f0754f02f..81ca99704b9e 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -617,7 +617,7 @@ export class CloudBuildClient { * @param {string} request.projectId * Required. ID of the project that owns the trigger. * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to get. + * Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 59f89b39e30c..4ffd12c68086 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,13 +1,13 @@ { - "updateTime": "2020-03-05T23:03:38.966192Z", + "updateTime": "2020-03-08T11:18:19.716646Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "f0b581b5bdf803e45201ecdb3688b60e381628a8", - "internalRef": "299181282", - "log": "f0b581b5bdf803e45201ecdb3688b60e381628a8\nfix: recommendationengine/v1beta1 update some comments\n\nPiperOrigin-RevId: 299181282\n\n10e9a0a833dc85ff8f05b2c67ebe5ac785fe04ff\nbuild: add generated BUILD file for Routes Preferred API\n\nPiperOrigin-RevId: 299164808\n\n86738c956a8238d7c77f729be78b0ed887a6c913\npublish v1p1beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299152383\n\n73d9f2ad4591de45c2e1f352bc99d70cbd2a6d95\npublish v1: update with absolute address in comments\n\nPiperOrigin-RevId: 299147194\n\nd2158f24cb77b0b0ccfe68af784c6a628705e3c6\npublish v1beta2: update with absolute address in comments\n\nPiperOrigin-RevId: 299147086\n\n7fca61292c11b4cd5b352cee1a50bf88819dd63b\npublish v1p2beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146903\n\n583b7321624736e2c490e328f4b1957335779295\npublish v1p3beta1: update with absolute address in comments\n\nPiperOrigin-RevId: 299146674\n\n638253bf86d1ce1c314108a089b7351440c2f0bf\nfix: add java_multiple_files option for automl text_sentiment.proto\n\nPiperOrigin-RevId: 298971070\n\n373d655703bf914fb8b0b1cc4071d772bac0e0d1\nUpdate Recs AI Beta public bazel file\n\nPiperOrigin-RevId: 298961623\n\ndcc5d00fc8a8d8b56f16194d7c682027b2c66a3b\nfix: add java_multiple_files option for automl classification.proto\n\nPiperOrigin-RevId: 298953301\n\na3f791827266f3496a6a5201d58adc4bb265c2a3\nchore: automl/v1 publish annotations and retry config\n\nPiperOrigin-RevId: 298942178\n\n01c681586d8d6dbd60155289b587aee678530bd9\nMark return_immediately in PullRequest deprecated.\n\nPiperOrigin-RevId: 298893281\n\nc9f5e9c4bfed54bbd09227e990e7bded5f90f31c\nRemove out of date documentation for predicate support on the Storage API\n\nPiperOrigin-RevId: 298883309\n\nfd5b3b8238d783b04692a113ffe07c0363f5de0f\ngenerate webrisk v1 proto\n\nPiperOrigin-RevId: 298847934\n\n541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n" + "sha": "b6927fca808f38df32a642c560082f5bf6538ced", + "internalRef": "299503150", + "log": "b6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" } }, { From cc7085672eedc39ea340f10cb0c1872ae7995825 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2020 16:41:40 -0700 Subject: [PATCH 055/223] chore: release 1.5.0 (#67) --- packages/google-devtools-cloudbuild/CHANGELOG.md | 9 +++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 2c570d18e01b..fb9aece6c7cb 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [1.5.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.4.0...v1.5.0) (2020-03-09) + + +### Features + +* cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields. ([#79](https://www.github.com/googleapis/nodejs-cloudbuild/issues/79)) ([0889fff](https://www.github.com/googleapis/nodejs-cloudbuild/commit/0889fff058e83dd421d4ad798c0f5318d74f22ff)) +* deferred client initialization ([#75](https://www.github.com/googleapis/nodejs-cloudbuild/issues/75)) ([47b177d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/47b177dfed997bf4fafcf2810ddae9c5c7815112)) +* export protos in src/index.ts ([c8e28b3](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c8e28b3f39fa25e09ebaf19292a46b9078738498)) + ## [1.4.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.3.3...v1.4.0) (2020-02-13) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index c449b88805b4..095d40ba9bb4 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.4.0", + "version": "1.5.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 8481326b785e..aac548abfdd1 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.4.0" + "@google-cloud/cloudbuild": "^1.5.0" }, "devDependencies": { "c8": "^7.0.0", From e444faec3c83747ccf9f6db1ae519e2ca9a2e777 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 18 Mar 2020 12:56:45 -0700 Subject: [PATCH 056/223] docs: mention templates in contributing section of README (#80) --- packages/google-devtools-cloudbuild/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index c11c124c5abe..1e6e15dbe560 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -140,6 +140,12 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloudbuild/blob/master/CONTRIBUTING.md). +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its template in this +[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). + ## License Apache Version 2.0 From d2393e7512f4f0befeb64bbe3b45dbfec3f099eb Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 23 Mar 2020 18:30:09 -0700 Subject: [PATCH 057/223] docs: document version support goals (#87) --- packages/google-devtools-cloudbuild/README.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 1e6e15dbe560..0bebac774987 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -117,6 +117,27 @@ has instructions for running the samples. The [Cloud Build Node.js Client API Reference][client-docs] documentation also contains samples. +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. + +Client libraries targetting some end-of-life versions of Node.js are available, and +can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. + +_Legacy Node.js versions are supported as a best effort:_ + +* Legacy versions will not be tested in continuous integration. +* Some security patches may not be able to be backported. +* Dependencies will not be kept up-to-date, and features will not be backported. + +#### Legacy tags available + +* `legacy-8`: install client libraries from this dist-tag for versions + compatible with Node.js 8. + ## Versioning This library follows [Semantic Versioning](http://semver.org/). From 27a48e83851b64394b309285511fbb951973ff43 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Mar 2020 01:39:27 -0700 Subject: [PATCH 058/223] feat: add time-to-live in a queue for builds Co-authored-by: Alexander Fenster --- packages/google-devtools-cloudbuild/.jsdoc.js | 2 +- .../devtools/cloudbuild/v1/cloudbuild.proto | 11 +++++++- .../protos/protos.d.ts | 6 +++++ .../protos/protos.js | 27 +++++++++++++++++++ .../protos/protos.json | 4 +++ .../google-devtools-cloudbuild/src/index.ts | 2 +- .../src/v1/cloud_build_client.ts | 12 ++++++--- .../src/v1/index.ts | 2 +- .../google-devtools-cloudbuild/synth.metadata | 16 +++++------ .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic-cloud_build-v1.ts | 2 +- .../webpack.config.js | 2 +- 14 files changed, 72 insertions(+), 20 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 882b3291bb9a..bee860ad1da6 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index cce87526e64a..aedf054780eb 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -586,6 +586,13 @@ message Build { // `FAILURE`. repeated string images = 13; + // TTL in queue for this build. If provided and the build is enqueued longer + // than this value, the build will expire and the build status will be + // `EXPIRED`. + // + // The TTL starts ticking from create_time. + google.protobuf.Duration queue_ttl = 40; + // Artifacts produced by the build that should be uploaded upon // successful completion of all build steps. Artifacts artifacts = 37; @@ -862,7 +869,9 @@ message BuildTrigger { // If true, the trigger will never result in a build. bool disabled = 9; - // Substitutions data for Build resource. + // Substitutions for Build resource. The keys must match the following + // regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the + // keys in bindings. map substitutions = 11; // ignored_files and included_files are file glob matches using diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index fe028a9e12e0..7e72a794c1f5 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1535,6 +1535,9 @@ export namespace google { /** Build images */ images?: (string[]|null); + /** Build queueTtl */ + queueTtl?: (google.protobuf.IDuration|null); + /** Build artifacts */ artifacts?: (google.devtools.cloudbuild.v1.IArtifacts|null); @@ -1611,6 +1614,9 @@ export namespace google { /** Build images. */ public images: string[]; + /** Build queueTtl. */ + public queueTtl?: (google.protobuf.IDuration|null); + /** Build artifacts. */ public artifacts?: (google.devtools.cloudbuild.v1.IArtifacts|null); diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 8d2a8507cb8c..3d0992485515 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -3635,6 +3635,7 @@ * @property {google.protobuf.ITimestamp|null} [finishTime] Build finishTime * @property {google.protobuf.IDuration|null} [timeout] Build timeout * @property {Array.|null} [images] Build images + * @property {google.protobuf.IDuration|null} [queueTtl] Build queueTtl * @property {google.devtools.cloudbuild.v1.IArtifacts|null} [artifacts] Build artifacts * @property {string|null} [logsBucket] Build logsBucket * @property {google.devtools.cloudbuild.v1.ISourceProvenance|null} [sourceProvenance] Build sourceProvenance @@ -3764,6 +3765,14 @@ */ Build.prototype.images = $util.emptyArray; + /** + * Build queueTtl. + * @member {google.protobuf.IDuration|null|undefined} queueTtl + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.queueTtl = null; + /** * Build artifacts. * @member {google.devtools.cloudbuild.v1.IArtifacts|null|undefined} artifacts @@ -3920,6 +3929,8 @@ } if (message.artifacts != null && message.hasOwnProperty("artifacts")) $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) + $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); return writer; }; @@ -3994,6 +4005,9 @@ message.images = []; message.images.push(reader.string()); break; + case 40: + message.queueTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; case 37: message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); break; @@ -4143,6 +4157,11 @@ if (!$util.isString(message.images[i])) return "images: string[] expected"; } + if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) { + var error = $root.google.protobuf.Duration.verify(message.queueTtl); + if (error) + return "queueTtl." + error; + } if (message.artifacts != null && message.hasOwnProperty("artifacts")) { var error = $root.google.devtools.cloudbuild.v1.Artifacts.verify(message.artifacts); if (error) @@ -4307,6 +4326,11 @@ for (var i = 0; i < object.images.length; ++i) message.images[i] = String(object.images[i]); } + if (object.queueTtl != null) { + if (typeof object.queueTtl !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.queueTtl: object expected"); + message.queueTtl = $root.google.protobuf.Duration.fromObject(object.queueTtl); + } if (object.artifacts != null) { if (typeof object.artifacts !== "object") throw TypeError(".google.devtools.cloudbuild.v1.Build.artifacts: object expected"); @@ -4405,6 +4429,7 @@ object.statusDetail = ""; object.logUrl = ""; object.artifacts = null; + object.queueTtl = null; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -4469,6 +4494,8 @@ } if (message.artifacts != null && message.hasOwnProperty("artifacts")) object.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.toObject(message.artifacts, options); + if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) + object.queueTtl = $root.google.protobuf.Duration.toObject(message.queueTtl, options); return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index ce36bf07ef8f..84be4ce827af 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -476,6 +476,10 @@ "type": "string", "id": 13 }, + "queueTtl": { + "type": "google.protobuf.Duration", + "id": 40 + }, "artifacts": { "type": "Artifacts", "id": 37 diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index 76d862c077cb..e43c0333ef4d 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 81ca99704b9e..4af4b4e5caef 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -48,7 +48,12 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class CloudBuildClient { - private _descriptors: Descriptors = {page: {}, stream: {}, longrunning: {}}; + private _descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; @@ -290,7 +295,8 @@ export class CloudBuildClient { if (this._terminated) { return Promise.reject('The client has already been closed.'); } - return stub[methodName].apply(stub, args); + const func = stub[methodName]; + return func.apply(stub, args); }, (err: Error | null | undefined) => () => { throw err; diff --git a/packages/google-devtools-cloudbuild/src/v1/index.ts b/packages/google-devtools-cloudbuild/src/v1/index.ts index f95068dcfe8f..3313b92fe9a5 100644 --- a/packages/google-devtools-cloudbuild/src/v1/index.ts +++ b/packages/google-devtools-cloudbuild/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 4ffd12c68086..2479b61286ef 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,20 +1,20 @@ { - "updateTime": "2020-03-08T11:18:19.716646Z", + "updateTime": "2020-03-22T11:19:11.533116Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "b6927fca808f38df32a642c560082f5bf6538ced", - "internalRef": "299503150", - "log": "b6927fca808f38df32a642c560082f5bf6538ced\nUpdate BigQuery Connection API v1beta1 proto: added credential to CloudSqlProperties.\n\nPiperOrigin-RevId: 299503150\n\n91e1fb5ef9829c0c7a64bfa5bde330e6ed594378\nchore: update protobuf (protoc) version to 3.11.2\n\nPiperOrigin-RevId: 299404145\n\n30e36b4bee6749c4799f4fc1a51cc8f058ba167d\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 299399890\n\nffbb493674099f265693872ae250711b2238090c\nfeat: cloudbuild/v1 add new fields and annotate OUTPUT_OUT fields.\n\nPiperOrigin-RevId: 299397780\n\nbc973a15818e00c19e121959832676e9b7607456\nbazel: Fix broken common dependency\n\nPiperOrigin-RevId: 299397431\n\n71094a343e3b962e744aa49eb9338219537474e4\nchore: bigtable/admin/v2 publish retry config\n\nPiperOrigin-RevId: 299391875\n\n8f488efd7bda33885cb674ddd023b3678c40bd82\nfeat: Migrate logging to GAPIC v2; release new features.\n\nIMPORTANT: This is a breaking change for client libraries\nin all languages.\n\nCommitter: @lukesneeringer, @jskeet\nPiperOrigin-RevId: 299370279\n\n007605bf9ad3a1fd775014ebefbf7f1e6b31ee71\nUpdate API for bigqueryreservation v1beta1.\n- Adds flex capacity commitment plan to CapacityCommitment.\n- Adds methods for getting and updating BiReservations.\n- Adds methods for updating/splitting/merging CapacityCommitments.\n\nPiperOrigin-RevId: 299368059\n\n" + "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", + "internalRef": "302154871", + "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\n" } }, { - "template": { - "name": "node_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" } } ], diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js index 5fa8fdb4709f..74ebe459788c 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts index 4ab3ab35685c..1d3c6a97b883 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index c9aa74ec2214..c4d80e9c0c8c 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts index 3327bf1ac756..244f5e710060 100644 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index 5f578c552282..eaafd3d67f5b 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC +// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 9511506d202cdb6f33875e4532dae8b5f313ebe4 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 31 Mar 2020 13:45:22 -0700 Subject: [PATCH 059/223] feat!: drop node8 support, support for async iterators (#91) BREAKING CHANGE: The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. New feature: methods with pagination now support async iteration. --- .../google-devtools-cloudbuild/.eslintrc.json | 3 + .../google-devtools-cloudbuild/.eslintrc.yml | 15 - .../google-devtools-cloudbuild/.prettierrc | 8 - .../google-devtools-cloudbuild/.prettierrc.js | 17 + .../google-devtools-cloudbuild/package.json | 10 +- .../google-devtools-cloudbuild/src/index.ts | 2 - .../src/v1/cloud_build_client.ts | 971 +++++--- .../google-devtools-cloudbuild/synth.metadata | 20 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../test/gapic-cloud_build-v1.ts | 988 -------- .../test/gapic_cloud_build_v1.ts | 2092 +++++++++++++++++ .../webpack.config.js | 12 +- 12 files changed, 2730 insertions(+), 1410 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.eslintrc.json delete mode 100644 packages/google-devtools-cloudbuild/.eslintrc.yml delete mode 100644 packages/google-devtools-cloudbuild/.prettierrc create mode 100644 packages/google-devtools-cloudbuild/.prettierrc.js delete mode 100644 packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts create mode 100644 packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts diff --git a/packages/google-devtools-cloudbuild/.eslintrc.json b/packages/google-devtools-cloudbuild/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-devtools-cloudbuild/.eslintrc.yml b/packages/google-devtools-cloudbuild/.eslintrc.yml deleted file mode 100644 index 73eeec27612d..000000000000 --- a/packages/google-devtools-cloudbuild/.eslintrc.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -extends: - - 'eslint:recommended' - - 'plugin:node/recommended' - - prettier -plugins: - - node - - prettier -rules: - prettier/prettier: error - block-scoped-var: error - eqeqeq: error - no-warning-comments: warn - no-var: error - prefer-const: error diff --git a/packages/google-devtools-cloudbuild/.prettierrc b/packages/google-devtools-cloudbuild/.prettierrc deleted file mode 100644 index df6eac074460..000000000000 --- a/packages/google-devtools-cloudbuild/.prettierrc +++ /dev/null @@ -1,8 +0,0 @@ ---- -bracketSpacing: false -printWidth: 80 -semi: true -singleQuote: true -tabWidth: 2 -trailingComma: es5 -useTabs: false diff --git a/packages/google-devtools-cloudbuild/.prettierrc.js b/packages/google-devtools-cloudbuild/.prettierrc.js new file mode 100644 index 000000000000..08cba3775be1 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// 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. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 095d40ba9bb4..3cfdd41c492f 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -25,13 +25,14 @@ ], "devDependencies": { "@types/mocha": "^7.0.0", + "@types/sinon": "^7.5.2", "c8": "^7.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.1", - "gts": "^1.1.0", + "gts": "2.0.0-alpha.9", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", @@ -39,7 +40,8 @@ "mocha": "^7.0.0", "pack-n-play": "^1.0.0-2", "prettier": "^1.17.0", - "typescript": "3.6.4" + "sinon": "^9.0.1", + "typescript": "^3.8.3" }, "scripts": { "predocs": "npm run compile", @@ -60,9 +62,9 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=8.10.0" + "node": ">=10" }, "dependencies": { - "google-gax": "^1.14.2" + "google-gax": "^2.0.1" } } diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index e43c0333ef4d..0777353632e1 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -19,8 +19,6 @@ import * as v1 from './v1'; const CloudBuildClient = v1.CloudBuildClient; export {v1, CloudBuildClient}; -// For compatibility with JavaScript libraries we need to provide this default export: -// tslint:disable-next-line no-default-export export default {v1, CloudBuildClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 4af4b4e5caef..8b467b46a210 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -18,19 +18,19 @@ import * as gax from 'google-gax'; import { - APICallback, Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback, - PaginationResponse, + GaxCall, } from 'google-gax'; import * as path from 'path'; import {Transform} from 'stream'; -import * as protosTypes from '../../protos/protos'; +import {RequestType} from 'google-gax/build/src/apitypes'; +import * as protos from '../../protos/protos'; import * as gapicConfig from './cloud_build_client_config.json'; const version = require('../../../package.json').version; @@ -48,13 +48,6 @@ const version = require('../../../package.json').version; * @memberof v1 */ export class CloudBuildClient { - private _descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - private _innerApiCalls: {[name: string]: Function}; private _terminated = false; private _opts: ClientOptions; private _gaxModule: typeof gax | typeof gax.fallback; @@ -62,6 +55,13 @@ export class CloudBuildClient { private _protos: {}; private _defaults: {[method: string]: gax.CallSettings}; auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + innerApiCalls: {[name: string]: Function}; operationsClient: gax.OperationsClient; cloudBuildStub?: Promise<{[name: string]: Function}>; @@ -154,13 +154,16 @@ export class CloudBuildClient { 'protos.json' ); this._protos = this._gaxGrpc.loadProto( - opts.fallback ? require('../../protos/protos.json') : nodejsProtoPath + opts.fallback + ? // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + : nodejsProtoPath ); // 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 = { + this.descriptors.page = { listBuilds: new this._gaxModule.PageDescriptor( 'pageToken', 'nextPageToken', @@ -178,6 +181,7 @@ export class CloudBuildClient { // rather than holding a request open. const protoFilesRoot = opts.fallback ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires require('../../protos/protos.json') ) : this._gaxModule.protobuf.loadSync(nodejsProtoPath); @@ -207,7 +211,7 @@ export class CloudBuildClient { '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; - this._descriptors.longrunning = { + this.descriptors.longrunning = { createBuild: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createBuildResponse.decode.bind(createBuildResponse), @@ -236,7 +240,7 @@ export class CloudBuildClient { // 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 = {}; + this.innerApiCalls = {}; } /** @@ -263,7 +267,7 @@ export class CloudBuildClient { ? (this._protos as protobuf.Root).lookupService( 'google.devtools.cloudbuild.v1.CloudBuild' ) - : // tslint:disable-next-line no-any + : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.devtools.cloudbuild.v1.CloudBuild, this._opts ) as Promise<{[method: string]: Function}>; @@ -288,9 +292,8 @@ export class CloudBuildClient { 'updateWorkerPool', 'listWorkerPools', ]; - for (const methodName of cloudBuildStubMethods) { - const innerCallPromise = this.cloudBuildStub.then( + const callPromise = this.cloudBuildStub.then( stub => (...args: Array<{}>) => { if (this._terminated) { return Promise.reject('The client has already been closed.'); @@ -304,20 +307,14 @@ export class CloudBuildClient { ); const apiCall = this._gaxModule.createApiCall( - innerCallPromise, + callPromise, this._defaults[methodName], - this._descriptors.page[methodName] || - this._descriptors.stream[methodName] || - this._descriptors.longrunning[methodName] + this.descriptors.page[methodName] || + this.descriptors.stream[methodName] || + this.descriptors.longrunning[methodName] ); - this._innerApiCalls[methodName] = ( - argument: {}, - callOptions?: CallOptions, - callback?: APICallback - ) => { - return apiCall(argument, callOptions, callback); - }; + this.innerApiCalls[methodName] = apiCall; } return this.cloudBuildStub; @@ -374,22 +371,30 @@ export class CloudBuildClient { // -- Service calls -- // ------------------- getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, {} | undefined ] >; getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, - {} | undefined + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, + {} | null | undefined + > + ): void; + getBuild( + request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, + {} | null | undefined > ): void; /** @@ -411,24 +416,25 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest + protos.google.devtools.cloudbuild.v1.IBuild, + | protos.google.devtools.cloudbuild.v1.IGetBuildRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, - {} | undefined + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IGetBuildRequest | undefined, {} | undefined ] > | void { @@ -442,25 +448,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.getBuild(request, options, callback); + return this.innerApiCalls.getBuild(request, options, callback); } cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, {} | undefined ] >; cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, - {} | undefined + protos.google.devtools.cloudbuild.v1.IBuild, + | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelBuild( + request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IBuild, + | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -479,24 +497,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ cancelBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - | protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest + protos.google.devtools.cloudbuild.v1.IBuild, + | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, - {} | undefined + protos.google.devtools.cloudbuild.v1.IBuild, + | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest + | null + | undefined, + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.ICancelBuildRequest | undefined, {} | undefined ] > | void { @@ -510,29 +531,40 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.cancelBuild(request, options, callback); + return this.innerApiCalls.cancelBuild(request, options, callback); } createBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IBuildTrigger, ( - | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest | undefined ), {} | undefined ] >; createBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -553,26 +585,28 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IBuildTrigger, ( - | protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest | undefined ), {} | undefined @@ -588,29 +622,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.createBuildTrigger(request, options, callback); + return this.innerApiCalls.createBuildTrigger(request, options, callback); } getBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - ( - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest | undefined, {} | undefined ] >; getBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -631,28 +673,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - ( - | protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest | undefined, {} | undefined ] > | void { @@ -666,29 +707,40 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.getBuildTrigger(request, options, callback); + return this.innerApiCalls.getBuildTrigger(request, options, callback); } deleteBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest | undefined ), {} | undefined ] >; deleteBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -709,26 +761,28 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, + protos.google.protobuf.IEmpty, ( - | protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest | undefined ), {} | undefined @@ -744,29 +798,40 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.deleteBuildTrigger(request, options, callback); + return this.innerApiCalls.deleteBuildTrigger(request, options, callback); } updateBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IBuildTrigger, ( - | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest | undefined ), {} | undefined ] >; updateBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -789,26 +854,28 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + protos.google.devtools.cloudbuild.v1.IBuildTrigger, + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger, + protos.google.devtools.cloudbuild.v1.IBuildTrigger, ( - | protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest + | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest | undefined ), {} | undefined @@ -824,29 +891,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.updateBuildTrigger(request, options, callback); + return this.innerApiCalls.updateBuildTrigger(request, options, callback); } createWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest | undefined, {} | undefined ] >; createWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + createWorkerPool( + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -867,28 +942,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest | undefined, {} | undefined ] > | void { @@ -902,29 +976,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.createWorkerPool(request, options, callback); + return this.innerApiCalls.createWorkerPool(request, options, callback); } getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest | undefined, {} | undefined ] >; getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + getWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -944,28 +1026,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ getWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest | undefined, {} | undefined ] > | void { @@ -979,29 +1060,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.getWorkerPool(request, options, callback); + return this.innerApiCalls.getWorkerPool(request, options, callback); } deleteWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest | undefined, {} | undefined ] >; deleteWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + deleteWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1021,28 +1110,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ deleteWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.protobuf.IEmpty, - | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + protos.google.protobuf.IEmpty, + | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.protobuf.IEmpty, - ( - | protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | undefined - ), + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest | undefined, {} | undefined ] > | void { @@ -1056,29 +1144,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.deleteWorkerPool(request, options, callback); + return this.innerApiCalls.deleteWorkerPool(request, options, callback); } updateWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest | undefined, {} | undefined ] >; updateWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + updateWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1100,28 +1196,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ updateWorkerPool( - request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + protos.google.devtools.cloudbuild.v1.IWorkerPool, + | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IWorkerPool, - ( - | protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest | undefined, {} | undefined ] > | void { @@ -1135,29 +1230,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.updateWorkerPool(request, options, callback); + return this.innerApiCalls.updateWorkerPool(request, options, callback); } listWorkerPools( - request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - ( - | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | undefined, {} | undefined ] >; listWorkerPools( - request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, options: gax.CallOptions, callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | null | undefined, - {} | undefined + {} | null | undefined + > + ): void; + listWorkerPools( + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | null + | undefined, + {} | null | undefined > ): void; /** @@ -1176,28 +1279,27 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listWorkerPools( - request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, optionsOrCallback?: | gax.CallOptions | Callback< - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | null | undefined, - {} | undefined + {} | null | undefined >, callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest + | null | undefined, - {} | undefined + {} | null | undefined > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - ( - | protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | undefined - ), + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | undefined, {} | undefined ] > | void { @@ -1211,32 +1313,43 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.listWorkerPools(request, options, callback); + return this.innerApiCalls.listWorkerPools(request, options, callback); } createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: gax.CallOptions ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options: gax.CallOptions, callback: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createBuild( + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; /** @@ -1259,32 +1372,32 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ createBuild( - request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest, + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: | gax.CallOptions | Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, callback?: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1298,31 +1411,42 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.createBuild(request, options, callback); + return this.innerApiCalls.createBuild(request, options, callback); } retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options?: gax.CallOptions ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options: gax.CallOptions, callback: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + retryBuild( + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; /** @@ -1367,32 +1491,32 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ retryBuild( - request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest, + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: | gax.CallOptions | Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, callback?: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1406,31 +1530,42 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.retryBuild(request, options, callback); + return this.innerApiCalls.retryBuild(request, options, callback); } runBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: gax.CallOptions ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; runBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options: gax.CallOptions, callback: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + runBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): void; /** @@ -1451,32 +1586,32 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ runBuildTrigger( - request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: | gax.CallOptions | Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined >, callback?: Callback< LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined > ): Promise< [ LROperation< - protosTypes.google.devtools.cloudbuild.v1.IBuild, - protosTypes.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata >, - protosTypes.google.longrunning.IOperation | undefined, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1490,25 +1625,37 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.runBuildTrigger(request, options, callback); + return this.innerApiCalls.runBuildTrigger(request, options, callback); } listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + protos.google.devtools.cloudbuild.v1.IBuild[], + protos.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protos.google.devtools.cloudbuild.v1.IListBuildsResponse ] >; listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild + > + ): void; + listBuilds( + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild > ): void; /** @@ -1546,24 +1693,28 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listBuilds( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + | PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild >, - callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuild[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildsResponse + protos.google.devtools.cloudbuild.v1.IBuild[], + protos.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protos.google.devtools.cloudbuild.v1.IListBuildsResponse ] > | void { request = request || {}; @@ -1576,7 +1727,7 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.listBuilds(request, options, callback); + return this.innerApiCalls.listBuilds(request, options, callback); } /** @@ -1608,36 +1759,84 @@ export class CloudBuildClient { * An object stream which emits an object representing [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. */ listBuildsStream( - request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listBuilds.createStream( - this._innerApiCalls.listBuilds as gax.GaxCall, + return this.descriptors.page.listBuilds.createStream( + this.innerApiCalls.listBuilds as gax.GaxCall, request, callSettings ); } + + /** + * Equivalent to {@link listBuilds}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Token to provide to skip to a particular spot in the list. + * @param {string} request.filter + * The raw filter text to constrain the results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listBuildsAsync( + request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listBuilds.asyncIterate( + this.innerApiCalls['listBuilds'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } listBuildTriggers( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options?: gax.CallOptions ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + protos.google.devtools.cloudbuild.v1.IBuildTrigger[], + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse ] >; listBuildTriggers( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options: gax.CallOptions, - callback: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuildTrigger + > + ): void; + listBuildTriggers( + request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuildTrigger > ): void; /** @@ -1672,24 +1871,28 @@ export class CloudBuildClient { * The promise has a method named "cancel" which cancels the ongoing API call. */ listBuildTriggers( - request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + | PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuildTrigger >, - callback?: Callback< - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuildTrigger > ): Promise< [ - protosTypes.google.devtools.cloudbuild.v1.IBuildTrigger[], - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, - protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersResponse + protos.google.devtools.cloudbuild.v1.IBuildTrigger[], + protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest | null, + protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse ] > | void { request = request || {}; @@ -1702,7 +1905,7 @@ export class CloudBuildClient { } options = options || {}; this.initialize(); - return this._innerApiCalls.listBuildTriggers(request, options, callback); + return this.innerApiCalls.listBuildTriggers(request, options, callback); } /** @@ -1732,20 +1935,54 @@ export class CloudBuildClient { * An object stream which emits an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} on 'data' event. */ listBuildTriggersStream( - request?: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options?: gax.CallOptions ): Transform { request = request || {}; options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); - return this._descriptors.page.listBuildTriggers.createStream( - this._innerApiCalls.listBuildTriggers as gax.GaxCall, + return this.descriptors.page.listBuildTriggers.createStream( + this.innerApiCalls.listBuildTriggers as gax.GaxCall, request, callSettings ); } + /** + * Equivalent to {@link listBuildTriggers}, but returns an iterable object. + * + * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project for which to list BuildTriggers. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Token to provide to skip to a particular spot in the 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 conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + */ + listBuildTriggersAsync( + request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + options?: gax.CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listBuildTriggers.asyncIterate( + this.innerApiCalls['listBuildTriggers'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + /** * Terminate the GRPC channel and close the client. * diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 2479b61286ef..1e146964f89c 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,23 +1,5 @@ { - "updateTime": "2020-03-22T11:19:11.533116Z", - "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0be7105dc52590fa9a24e784052298ae37ce53aa", - "internalRef": "302154871", - "log": "0be7105dc52590fa9a24e784052298ae37ce53aa\nAdd BUILD.bazel file to asset/v1p1beta1\n\nPiperOrigin-RevId: 302154871\n\n6c248fd13e8543f8d22cbf118d978301a9fbe2a8\nAdd missing resource annotations and additional_bindings to dialogflow v2 API.\n\nPiperOrigin-RevId: 302063117\n\n9a3a7f33be9eeacf7b3e98435816b7022d206bd7\nChange the service name from \"chromeos-moblab.googleapis.com\" to \"chromeosmoblab.googleapis.com\"\n\nPiperOrigin-RevId: 302060989\n\n98a339237577e3de26cb4921f75fb5c57cc7a19f\nfeat: devtools/build/v1 publish client library config annotations\n\n* add details field to some of the BuildEvents\n* add final_invocation_id and build_tool_exit_code fields to BuildStatus\n\nPiperOrigin-RevId: 302044087\n\ncfabc98c6bbbb22d1aeaf7612179c0be193b3a13\nfeat: home/graph/v1 publish client library config annotations & comment updates\n\nThis change includes adding the client library configuration annotations, updated proto comments, and some client library configuration files.\n\nPiperOrigin-RevId: 302042647\n\nc8c8c0bd15d082db9546253dbaad1087c7a9782c\nchore: use latest gapic-generator in bazel WORKSPACE.\nincluding the following commits from gapic-generator:\n- feat: take source protos in all sub-packages (#3144)\n\nPiperOrigin-RevId: 301843591\n\ne4daf5202ea31cb2cb6916fdbfa9d6bd771aeb4c\nAdd bazel file for v1 client lib generation\n\nPiperOrigin-RevId: 301802926\n\n275fbcce2c900278d487c33293a3c7e1fbcd3a34\nfeat: pubsub/v1 add an experimental filter field to Subscription\n\nPiperOrigin-RevId: 301661567\n\nf2b18cec51d27c999ad30011dba17f3965677e9c\nFix: UpdateBackupRequest.backup is a resource, not a resource reference - remove annotation.\n\nPiperOrigin-RevId: 301636171\n\n800384063ac93a0cac3a510d41726fa4b2cd4a83\nCloud Billing Budget API v1beta1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301634389\n\n0cc6c146b660db21f04056c3d58a4b752ee445e3\nCloud Billing Budget API v1alpha1\nModified api documentation to include warnings about the new filter field.\n\nPiperOrigin-RevId: 301630018\n\nff2ea00f69065585c3ac0993c8b582af3b6fc215\nFix: Add resource definition for a parent of InspectTemplate which was otherwise missing.\n\nPiperOrigin-RevId: 301623052\n\n55fa441c9daf03173910760191646399338f2b7c\nAdd proto definition for AccessLevel, AccessPolicy, and ServicePerimeter.\n\nPiperOrigin-RevId: 301620844\n\ne7b10591c5408a67cf14ffafa267556f3290e262\nCloud Bigtable Managed Backup service and message proto files.\n\nPiperOrigin-RevId: 301585144\n\nd8e226f702f8ddf92915128c9f4693b63fb8685d\nfeat: Add time-to-live in a queue for builds\n\nPiperOrigin-RevId: 301579876\n\n430375af011f8c7a5174884f0d0e539c6ffa7675\ndocs: add missing closing backtick\n\nPiperOrigin-RevId: 301538851\n\n0e9f1f60ded9ad1c2e725e37719112f5b487ab65\nbazel: Use latest release of gax_java\n\nPiperOrigin-RevId: 301480457\n\n5058c1c96d0ece7f5301a154cf5a07b2ad03a571\nUpdate GAPIC v2 with batching parameters for Logging API\n\nPiperOrigin-RevId: 301443847\n\n64ab9744073de81fec1b3a6a931befc8a90edf90\nFix: Introduce location-based organization/folder/billing-account resources\nChore: Update copyright years\n\nPiperOrigin-RevId: 301373760\n\n23d5f09e670ebb0c1b36214acf78704e2ecfc2ac\nUpdate field_behavior annotations in V1 and V2.\n\nPiperOrigin-RevId: 301337970\n\nb2cf37e7fd62383a811aa4d54d013ecae638851d\nData Catalog V1 API\n\nPiperOrigin-RevId: 301282503\n\n1976b9981e2900c8172b7d34b4220bdb18c5db42\nCloud DLP api update. Adds missing fields to Finding and adds support for hybrid jobs.\n\nPiperOrigin-RevId: 301205325\n\nae78682c05e864d71223ce22532219813b0245ac\nfix: several sample code blocks in comments are now properly indented for markdown\n\nPiperOrigin-RevId: 301185150\n\ndcd171d04bda5b67db13049320f97eca3ace3731\nPublish Media Translation API V1Beta1\n\nPiperOrigin-RevId: 301180096\n\nff1713453b0fbc5a7544a1ef6828c26ad21a370e\nAdd protos and BUILD rules for v1 API.\n\nPiperOrigin-RevId: 301179394\n\n8386761d09819b665b6a6e1e6d6ff884bc8ff781\nfeat: chromeos/modlab publish protos and config for Chrome OS Moblab API.\n\nPiperOrigin-RevId: 300843960\n\nb2e2bc62fab90e6829e62d3d189906d9b79899e4\nUpdates to GCS gRPC API spec:\n\n1. Changed GetIamPolicy and TestBucketIamPermissions to use wrapper messages around google.iam.v1 IAM requests messages, and added CommonRequestParams. This lets us support RequesterPays buckets.\n2. Added a metadata field to GetObjectMediaResponse, to support resuming an object media read safely (by extracting the generation of the object being read, and using it in the resumed read request).\n\nPiperOrigin-RevId: 300817706\n\n7fd916ce12335cc9e784bb9452a8602d00b2516c\nAdd deprecated_collections field for backward-compatiblity in PHP and monolith-generated Python and Ruby clients.\n\nGenerate TopicName class in Java which covers the functionality of both ProjectTopicName and DeletedTopicName. Introduce breaking changes to be fixed by synth.py.\n\nDelete default retry parameters.\n\nRetry codes defs can be deleted once # https://github.com/googleapis/gapic-generator/issues/3137 is fixed.\n\nPiperOrigin-RevId: 300813135\n\n047d3a8ac7f75383855df0166144f891d7af08d9\nfix!: google/rpc refactor ErrorInfo.type to ErrorInfo.reason and comment updates.\n\nPiperOrigin-RevId: 300773211\n\nfae4bb6d5aac52aabe5f0bb4396466c2304ea6f6\nAdding RetryPolicy to pubsub.proto\n\nPiperOrigin-RevId: 300769420\n\n7d569be2928dbd72b4e261bf9e468f23afd2b950\nAdding additional protocol buffer annotations to v3.\n\nPiperOrigin-RevId: 300718800\n\n13942d1a85a337515040a03c5108993087dc0e4f\nAdd logging protos for Recommender v1.\n\nPiperOrigin-RevId: 300689896\n\na1a573c3eecfe2c404892bfa61a32dd0c9fb22b6\nfix: change go package to use cloud.google.com/go/maps\n\nPiperOrigin-RevId: 300661825\n\nc6fbac11afa0c7ab2972d9df181493875c566f77\nfeat: publish documentai/v1beta2 protos\n\nPiperOrigin-RevId: 300656808\n\n5202a9e0d9903f49e900f20fe5c7f4e42dd6588f\nProtos for v1beta1 release of Cloud Security Center Settings API\n\nPiperOrigin-RevId: 300580858\n\n83518e18655d9d4ac044acbda063cc6ecdb63ef8\nAdds gapic.yaml file and BUILD.bazel file.\n\nPiperOrigin-RevId: 300554200\n\n836c196dc8ef8354bbfb5f30696bd3477e8db5e2\nRegenerate recommender v1beta1 gRPC ServiceConfig file for Insights methods.\n\nPiperOrigin-RevId: 300549302\n\n34a5450c591b6be3d6566f25ac31caa5211b2f3f\nIncreases the default timeout from 20s to 30s for MetricService\n\nPiperOrigin-RevId: 300474272\n\n5d8bffe87cd01ba390c32f1714230e5a95d5991d\nfeat: use the latest gapic-generator in WORKSPACE for bazel build.\n\nPiperOrigin-RevId: 300461878\n\nd631c651e3bcfac5d371e8560c27648f7b3e2364\nUpdated the GAPIC configs to include parameters for Backups APIs.\n\nPiperOrigin-RevId: 300443402\n\n678afc7055c1adea9b7b54519f3bdb228013f918\nAdding Game Servers v1beta API.\n\nPiperOrigin-RevId: 300433218\n\n80d2bd2c652a5e213302041b0620aff423132589\nEnable proto annotation and gapic v2 for talent API.\n\nPiperOrigin-RevId: 300393997\n\n85e454be7a353f7fe1bf2b0affb753305785b872\ndocs(google/maps/roads): remove mention of nonexported api\n\nPiperOrigin-RevId: 300367734\n\nbf839ae632e0f263a729569e44be4b38b1c85f9c\nAdding protocol buffer annotations and updated config info for v1 and v2.\n\nPiperOrigin-RevId: 300276913\n\n309b899ca18a4c604bce63882a161d44854da549\nPublish `Backup` APIs and protos.\n\nPiperOrigin-RevId: 300246038\n\neced64c3f122421350b4aca68a28e89121d20db8\nadd PHP client libraries\n\nPiperOrigin-RevId: 300193634\n\n7727af0e39df1ae9ad715895c8576d7b65cf6c6d\nfeat: use the latest gapic-generator and protoc-java-resource-name-plugin in googleapis/WORKSPACE.\n\nPiperOrigin-RevId: 300188410\n\n2a25aa351dd5b5fe14895266aff5824d90ce757b\nBreaking change: remove the ProjectOrTenant resource and its references.\n\nPiperOrigin-RevId: 300182152\n\na499dbb28546379415f51803505cfb6123477e71\nUpdate web risk v1 gapic config and BUILD file.\n\nPiperOrigin-RevId: 300152177\n\n52701da10fec2a5f9796e8d12518c0fe574488fe\nFix: apply appropriate namespace/package options for C#, PHP and Ruby.\n\nPiperOrigin-RevId: 300123508\n\n365c029b8cdb63f7751b92ab490f1976e616105c\nAdd CC targets to the kms protos.\n\nThese are needed by go/tink.\n\nPiperOrigin-RevId: 300038469\n\n4ba9aa8a4a1413b88dca5a8fa931824ee9c284e6\nExpose logo recognition API proto for GA.\n\nPiperOrigin-RevId: 299971671\n\n1c9fc2c9e03dadf15f16b1c4f570955bdcebe00e\nAdding ruby_package option to accessapproval.proto for the Ruby client libraries generation.\n\nPiperOrigin-RevId: 299955924\n\n1cc6f0a7bfb147e6f2ede911d9b01e7a9923b719\nbuild(google/maps/routes): generate api clients\n\nPiperOrigin-RevId: 299955905\n\n29a47c965aac79e3fe8e3314482ca0b5967680f0\nIncrease timeout to 1hr for method `dropRange` in bigtable/admin/v2, which is\nsynced with the timeout setting in gapic_yaml.\n\nPiperOrigin-RevId: 299917154\n\n8f631c4c70a60a9c7da3749511ee4ad432b62898\nbuild(google/maps/roads/v1op): move go to monorepo pattern\n\nPiperOrigin-RevId: 299885195\n\nd66816518844ebbf63504c9e8dfc7133921dd2cd\nbuild(google/maps/roads/v1op): Add bazel build files to generate clients.\n\nPiperOrigin-RevId: 299851148\n\naf7dff701fabe029672168649c62356cf1bb43d0\nAdd LogPlayerReports and LogImpressions to Playable Locations service\n\nPiperOrigin-RevId: 299724050\n\n" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "7e98e1609c91082f4eeb63b530c6468aefd18cfd" - } - } - ], + "updateTime": "2020-03-31T19:22:01.525662Z", "destinations": [ { "client": { diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts index 1d3c6a97b883..f7a8fb06cead 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -19,7 +19,7 @@ import {CloudBuildClient} from '@google-cloud/cloudbuild'; function main() { - const cloudBuildClient = new CloudBuildClient(); + new CloudBuildClient(); } main(); diff --git a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts b/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts deleted file mode 100644 index 244f5e710060..000000000000 --- a/packages/google-devtools-cloudbuild/test/gapic-cloud_build-v1.ts +++ /dev/null @@ -1,988 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protosTypes from '../protos/protos'; -import * as assert from 'assert'; -import {describe, it} from 'mocha'; -const cloudbuildModule = require('../src'); - -const FAKE_STATUS_CODE = 1; -class FakeError { - name: string; - message: string; - code: number; - constructor(n: number) { - this.name = 'fakeName'; - this.message = 'fake message'; - this.code = n; - } -} -const error = new FakeError(FAKE_STATUS_CODE); -export interface Callback { - (err: FakeError | null, response?: {} | null): void; -} - -export class Operation { - constructor() {} - promise() {} -} -function mockSimpleGrpcMethod( - expectedRequest: {}, - response: {} | null, - error: FakeError | null -) { - return (actualRequest: {}, options: {}, callback: Callback) => { - assert.deepStrictEqual(actualRequest, expectedRequest); - if (error) { - callback(error); - } else if (response) { - callback(null, response); - } else { - callback(null); - } - }; -} -function mockLongRunningGrpcMethod( - expectedRequest: {}, - response: {} | null, - error?: {} | null -) { - return (request: {}) => { - assert.deepStrictEqual(request, expectedRequest); - const mockOperation = { - promise() { - return new Promise((resolve, reject) => { - if (error) { - reject(error); - } else { - resolve([response]); - } - }); - }, - }; - return Promise.resolve([mockOperation]); - }; -} -describe('v1.CloudBuildClient', () => { - it('has servicePath', () => { - const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; - assert(servicePath); - }); - it('has apiEndpoint', () => { - const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; - assert(apiEndpoint); - }); - it('has port', () => { - const port = cloudbuildModule.v1.CloudBuildClient.port; - assert(port); - assert(typeof port === 'number'); - }); - it('should create a client with no option', () => { - const client = new cloudbuildModule.v1.CloudBuildClient(); - assert(client); - }); - it('should create a client with gRPC fallback', () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - fallback: true, - }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.cloudBuildStub, undefined); - await client.initialize(); - assert(client.cloudBuildStub); - }); - it('has close method', () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.close(); - }); - describe('getBuild', () => { - it('invokes getBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBuild = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getBuild(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getBuild(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('cancelBuild', () => { - it('invokes cancelBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.cancelBuild(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes cancelBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICancelBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.cancelBuild = mockSimpleGrpcMethod( - request, - null, - error - ); - client.cancelBuild(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createBuildTrigger', () => { - it('invokes createBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createBuildTrigger(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createBuildTrigger(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getBuildTrigger', () => { - it('invokes getBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getBuildTrigger(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getBuildTrigger(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteBuildTrigger', () => { - it('invokes deleteBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteBuildTrigger(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteBuildTrigger(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateBuildTrigger', () => { - it('invokes updateBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateBuildTrigger(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateBuildTrigger = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateBuildTrigger(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createWorkerPool', () => { - it('invokes createWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.createWorkerPool(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes createWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - client.createWorkerPool(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('getWorkerPool', () => { - it('invokes getWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.getWorkerPool(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes getWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.getWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - client.getWorkerPool(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('deleteWorkerPool', () => { - it('invokes deleteWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.deleteWorkerPool(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes deleteWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.deleteWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - client.deleteWorkerPool(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('updateWorkerPool', () => { - it('invokes updateWorkerPool without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.updateWorkerPool(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes updateWorkerPool with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.updateWorkerPool = mockSimpleGrpcMethod( - request, - null, - error - ); - client.updateWorkerPool(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('listWorkerPools', () => { - it('invokes listWorkerPools without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( - request, - expectedResponse, - null - ); - client.listWorkerPools(request, (err: {}, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - - it('invokes listWorkerPools with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.listWorkerPools = mockSimpleGrpcMethod( - request, - null, - error - ); - client.listWorkerPools(request, (err: FakeError, response: {}) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - assert(typeof response === 'undefined'); - done(); - }); - }); - }); - describe('createBuild', () => { - it('invokes createBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createBuild = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .createBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes createBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.ICreateBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.createBuild = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .createBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('retryBuild', () => { - it('invokes retryBuild without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.retryBuild = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .retryBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes retryBuild with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IRetryBuildRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.retryBuild = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .retryBuild(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('runBuildTrigger', () => { - it('invokes runBuildTrigger without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.runBuildTrigger = mockLongRunningGrpcMethod( - request, - expectedResponse - ); - client - .runBuildTrigger(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then((responses: [Operation]) => { - assert.deepStrictEqual(responses[0], expectedResponse); - done(); - }) - .catch((err: {}) => { - done(err); - }); - }); - - it('invokes runBuildTrigger with error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock gRPC layer - client._innerApiCalls.runBuildTrigger = mockLongRunningGrpcMethod( - request, - null, - error - ); - client - .runBuildTrigger(request) - .then((responses: [Operation]) => { - const operation = responses[0]; - return operation ? operation.promise() : {}; - }) - .then(() => { - assert.fail(); - }) - .catch((err: FakeError) => { - assert(err instanceof FakeError); - assert.strictEqual(err.code, FAKE_STATUS_CODE); - done(); - }); - }); - }); - describe('listBuilds', () => { - it('invokes listBuilds without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listBuilds = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listBuilds(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listBuildsStream', () => { - it('invokes listBuildsStream without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildsRequest = {}; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listBuilds = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listBuildsStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); - describe('listBuildTriggers', () => { - it('invokes listBuildTriggers without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; - // Mock response - const expectedResponse = {}; - // Mock Grpc layer - client._innerApiCalls.listBuildTriggers = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - client.listBuildTriggers(request, (err: FakeError, response: {}) => { - assert.ifError(err); - assert.deepStrictEqual(response, expectedResponse); - done(); - }); - }); - }); - describe('listBuildTriggersStream', () => { - it('invokes listBuildTriggersStream without error', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - // Initialize client before mocking - client.initialize(); - // Mock request - const request: protosTypes.google.devtools.cloudbuild.v1.IListBuildTriggersRequest = {}; - // Mock response - const expectedResponse = {response: 'data'}; - // Mock Grpc layer - client._innerApiCalls.listBuildTriggers = ( - actualRequest: {}, - options: {}, - callback: Callback - ) => { - assert.deepStrictEqual(actualRequest, request); - callback(null, expectedResponse); - }; - const stream = client - .listBuildTriggersStream(request, {}) - .on('data', (response: {}) => { - assert.deepStrictEqual(response, expectedResponse); - done(); - }) - .on('error', (err: FakeError) => { - done(err); - }); - stream.write(expectedResponse); - }); - }); -}); diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts new file mode 100644 index 000000000000..039da7bea988 --- /dev/null +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -0,0 +1,2092 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by 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 cloudbuildModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation} from 'google-gax'; + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message).toObject( + instance as protobuf.Message, + {defaults: true} + ); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.CloudBuildClient', () => { + it('has servicePath', () => { + const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = cloudbuildModule.v1.CloudBuildClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new cloudbuildModule.v1.CloudBuildClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudBuildStub, undefined); + await client.initialize(); + assert(client.cloudBuildStub); + }); + + it('has close method', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudbuildModule.v1.CloudBuildClient({ + 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 cloudbuildModule.v1.CloudBuildClient({ + 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('getBuild', () => { + it('invokes getBuild without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.Build() + ); + client.innerApiCalls.getBuild = stubSimpleCall(expectedResponse); + const [response] = await client.getBuild(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getBuild without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.Build() + ); + client.innerApiCalls.getBuild = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getBuild( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuild | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getBuild with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.getBuild = stubSimpleCall(undefined, expectedError); + assert.rejects(async () => { + await client.getBuild(request); + }, expectedError); + assert( + (client.innerApiCalls.getBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('cancelBuild', () => { + it('invokes cancelBuild without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.Build() + ); + client.innerApiCalls.cancelBuild = stubSimpleCall(expectedResponse); + const [response] = await client.cancelBuild(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes cancelBuild without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.Build() + ); + client.innerApiCalls.cancelBuild = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.cancelBuild( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuild | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.cancelBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes cancelBuild with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelBuild = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.cancelBuild(request); + }, expectedError); + assert( + (client.innerApiCalls.cancelBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createBuildTrigger', () => { + it('invokes createBuildTrigger without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.createBuildTrigger = stubSimpleCall( + expectedResponse + ); + const [response] = await client.createBuildTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createBuildTrigger without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.createBuildTrigger = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createBuildTrigger( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createBuildTrigger with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createBuildTrigger = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createBuildTrigger(request); + }, expectedError); + assert( + (client.innerApiCalls.createBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getBuildTrigger', () => { + it('invokes getBuildTrigger without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.getBuildTrigger = stubSimpleCall(expectedResponse); + const [response] = await client.getBuildTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getBuildTrigger without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.getBuildTrigger = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getBuildTrigger( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getBuildTrigger with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.getBuildTrigger = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getBuildTrigger(request); + }, expectedError); + assert( + (client.innerApiCalls.getBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteBuildTrigger', () => { + it('invokes deleteBuildTrigger without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteBuildTrigger = stubSimpleCall( + expectedResponse + ); + const [response] = await client.deleteBuildTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteBuildTrigger without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteBuildTrigger = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteBuildTrigger( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteBuildTrigger with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteBuildTrigger = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteBuildTrigger(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateBuildTrigger', () => { + it('invokes updateBuildTrigger without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.updateBuildTrigger = stubSimpleCall( + expectedResponse + ); + const [response] = await client.updateBuildTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateBuildTrigger without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ); + client.innerApiCalls.updateBuildTrigger = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateBuildTrigger( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateBuildTrigger with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.updateBuildTrigger = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateBuildTrigger(request); + }, expectedError); + assert( + (client.innerApiCalls.updateBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createWorkerPool', () => { + it('invokes createWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.createWorkerPool = stubSimpleCall(expectedResponse); + const [response] = await client.createWorkerPool(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createWorkerPool without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.createWorkerPool = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createWorkerPool( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IWorkerPool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createWorkerPool with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createWorkerPool = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createWorkerPool(request); + }, expectedError); + assert( + (client.innerApiCalls.createWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getWorkerPool', () => { + it('invokes getWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.getWorkerPool = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkerPool(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getWorkerPool without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.getWorkerPool = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getWorkerPool( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IWorkerPool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getWorkerPool with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.getWorkerPool = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.getWorkerPool(request); + }, expectedError); + assert( + (client.innerApiCalls.getWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('deleteWorkerPool', () => { + it('invokes deleteWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkerPool = stubSimpleCall(expectedResponse); + const [response] = await client.deleteWorkerPool(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteWorkerPool without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteWorkerPool = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteWorkerPool( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteWorkerPool with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteWorkerPool = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.deleteWorkerPool(request); + }, expectedError); + assert( + (client.innerApiCalls.deleteWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateWorkerPool', () => { + it('invokes updateWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.updateWorkerPool = stubSimpleCall(expectedResponse); + const [response] = await client.updateWorkerPool(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateWorkerPool without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.WorkerPool() + ); + client.innerApiCalls.updateWorkerPool = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateWorkerPool( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IWorkerPool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateWorkerPool with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.updateWorkerPool = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.updateWorkerPool(request); + }, expectedError); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listWorkerPools', () => { + it('invokes listWorkerPools without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse() + ); + client.innerApiCalls.listWorkerPools = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkerPools(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkerPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listWorkerPools without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse() + ); + client.innerApiCalls.listWorkerPools = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listWorkerPools( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listWorkerPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listWorkerPools with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkerPools = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listWorkerPools(request); + }, expectedError); + assert( + (client.innerApiCalls.listWorkerPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('createBuild', () => { + it('invokes createBuild without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBuild = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBuild(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createBuild without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createBuild = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createBuild( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createBuild with call error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createBuild = stubLongRunningCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.createBuild(request); + }, expectedError); + assert( + (client.innerApiCalls.createBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createBuild with LRO error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.createBuild = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createBuild(request); + assert.rejects(async () => { + await operation.promise(); + }, expectedError); + assert( + (client.innerApiCalls.createBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('retryBuild', () => { + it('invokes retryBuild without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.retryBuild = stubLongRunningCall(expectedResponse); + const [operation] = await client.retryBuild(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.retryBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes retryBuild without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.retryBuild = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.retryBuild( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.retryBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes retryBuild with call error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.retryBuild = stubLongRunningCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.retryBuild(request); + }, expectedError); + assert( + (client.innerApiCalls.retryBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes retryBuild with LRO error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.retryBuild = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.retryBuild(request); + assert.rejects(async () => { + await operation.promise(); + }, expectedError); + assert( + (client.innerApiCalls.retryBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('runBuildTrigger', () => { + it('invokes runBuildTrigger without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runBuildTrigger = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.runBuildTrigger(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.runBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes runBuildTrigger without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.runBuildTrigger = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.runBuildTrigger( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.runBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes runBuildTrigger with call error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.runBuildTrigger = stubLongRunningCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.runBuildTrigger(request); + }, expectedError); + assert( + (client.innerApiCalls.runBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes runBuildTrigger with LRO error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.runBuildTrigger = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.runBuildTrigger(request); + assert.rejects(async () => { + await operation.promise(); + }, expectedError); + assert( + (client.innerApiCalls.runBuildTrigger as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('listBuilds', () => { + it('invokes listBuilds without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + ]; + client.innerApiCalls.listBuilds = stubSimpleCall(expectedResponse); + const [response] = await client.listBuilds(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuilds as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuilds without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + ]; + client.innerApiCalls.listBuilds = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listBuilds( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuild[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuilds as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listBuilds with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuilds = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listBuilds(request); + }, expectedError); + assert( + (client.innerApiCalls.listBuilds as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuildsStream without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + ]; + client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listBuildsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.Build[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.Build) => { + 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.listBuilds.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuilds, request) + ); + }); + + it('invokes listBuildsStream with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBuildsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.Build[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.Build) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listBuilds.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuilds, request) + ); + }); + + it('uses async iteration with listBuilds without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + ]; + client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; + const iterable = client.listBuildsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + }); + + it('uses async iteration with listBuilds with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBuildsAsync(request); + assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + }); + }); + + describe('listBuildTriggers', () => { + it('invokes listBuildTriggers without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.innerApiCalls.listBuildTriggers = stubSimpleCall(expectedResponse); + const [response] = await client.listBuildTriggers(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuildTriggers without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedOptions = {}; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.innerApiCalls.listBuildTriggers = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listBuildTriggers( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listBuildTriggers with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedOptions = {}; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuildTriggers = stubSimpleCall( + undefined, + expectedError + ); + assert.rejects(async () => { + await client.listBuildTriggers(request); + }, expectedError); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuildTriggersStream without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listBuildTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { + 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.listBuildTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuildTriggers, request) + ); + }); + + it('invokes listBuildTriggersStream with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listBuildTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + assert.rejects(async () => { + await promise; + }, expectedError); + assert( + (client.descriptors.page.listBuildTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuildTriggers, request) + ); + }); + + it('uses async iteration with listBuildTriggers without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = []; + const iterable = client.listBuildTriggersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuildTriggers + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listBuildTriggers with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBuildTriggersAsync(request); + assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuildTriggers + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + }); + }); +}); diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index eaafd3d67f5b..4ccaba44bd62 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/ + exclude: /node_modules/, }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]grpc/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' + use: 'null-loader', }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader' + use: 'null-loader', }, ], }, From 1cbc9a6f1668f98f18edafe574e943c5fccc0760 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 31 Mar 2020 18:35:32 -0700 Subject: [PATCH 060/223] build: set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#93) --- packages/google-devtools-cloudbuild/synth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 4dcce43e56f7..968b24c2ef6a 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -20,6 +20,9 @@ logging.basicConfig(level=logging.DEBUG) +AUTOSYNTH_MULTIPLE_COMMITS = True + + # run the gapic generator gapic = gcp.GAPICMicrogenerator() versions = ['v1'] From fca746b7de9d8343b30fa56af5b320d477ccb996 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 1 Apr 2020 23:35:09 +0200 Subject: [PATCH 061/223] chore(deps): update dependency @types/sinon to v9 (#94) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.5.2` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/7.5.2/9.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 3cfdd41c492f..870c66515ab8 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -25,7 +25,7 @@ ], "devDependencies": { "@types/mocha": "^7.0.0", - "@types/sinon": "^7.5.2", + "@types/sinon": "^9.0.0", "c8": "^7.0.0", "chai": "^4.2.0", "eslint": "^6.0.0", From 37fd63a7bc2a7a21f5dd45dd489574b83033a11c Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 5 Apr 2020 12:49:07 -0700 Subject: [PATCH 062/223] chore: remove duplicate mocha config (#97) --- packages/google-devtools-cloudbuild/.mocharc.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/.mocharc.json diff --git a/packages/google-devtools-cloudbuild/.mocharc.json b/packages/google-devtools-cloudbuild/.mocharc.json deleted file mode 100644 index 670c5e2c24b7..000000000000 --- a/packages/google-devtools-cloudbuild/.mocharc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} From 091d6464800d4034a806372061eeedb792bb69da Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 6 Apr 2020 09:04:12 -0700 Subject: [PATCH 063/223] refactor: change to default proto.js export (#96) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1630485f-7526-4afd-9c13-b5660664d6a2/targets --- .../protos/protos.js | 2 +- .../google-devtools-cloudbuild/synth.metadata | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 3d0992485515..3e9473e8a782 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + var $root = $protobuf.roots._google_cloud_cloudbuild_1_5_0_protos || ($protobuf.roots._google_cloud_cloudbuild_1_5_0_protos = {}); $root.google = (function() { diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 1e146964f89c..8b939a7122c2 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,5 +1,22 @@ { - "updateTime": "2020-03-31T19:22:01.525662Z", + "updateTime": "2020-04-03T11:25:24.226680Z", + "sources": [ + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", + "internalRef": "304500143" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + } + } + ], "destinations": [ { "client": { From 7698e04a9c32d616a7322f3765d7311db53424c6 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 7 Apr 2020 12:18:59 -0700 Subject: [PATCH 064/223] test: await assert.rejects (#98) --- packages/google-devtools-cloudbuild/.jsdoc.js | 2 +- .../google-devtools-cloudbuild/.mocharc.json | 5 ++ .../google-devtools-cloudbuild/.prettierrc.js | 2 +- .../google-devtools-cloudbuild/synth.metadata | 10 ++-- .../test/gapic_cloud_build_v1.ts | 46 +++++++++---------- 5 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.mocharc.json diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index bee860ad1da6..23f9f66e36bd 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2019 Google, LLC.', + copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/cloudbuild', diff --git a/packages/google-devtools-cloudbuild/.mocharc.json b/packages/google-devtools-cloudbuild/.mocharc.json new file mode 100644 index 000000000000..670c5e2c24b7 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.mocharc.json @@ -0,0 +1,5 @@ +{ + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} diff --git a/packages/google-devtools-cloudbuild/.prettierrc.js b/packages/google-devtools-cloudbuild/.prettierrc.js index 08cba3775be1..d1b95106f4ce 100644 --- a/packages/google-devtools-cloudbuild/.prettierrc.js +++ b/packages/google-devtools-cloudbuild/.prettierrc.js @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 8b939a7122c2..f12d7583c50d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,19 +1,21 @@ { - "updateTime": "2020-04-03T11:25:24.226680Z", + "updateTime": "2020-04-07T12:06:25.370681Z", "sources": [ { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3d5d228a58bdf875e6147b228db3159010c735ee", - "internalRef": "304500143" + "sha": "823facb4ca6a4b36b817ce955a790dcb40cf808f", + "internalRef": "305155214", + "log": "823facb4ca6a4b36b817ce955a790dcb40cf808f\nchore: enable gapicv2 for videointelligence/v1p3beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305155214\n\n6b9c969d42bcb0f8206675bd868ed7d1ddcdaef9\nAdd API for bigqueryreservation v1.\n\nPiperOrigin-RevId: 305151484\n\n514f7d27811832a9f58b83d6f6305d894b097cf6\nchore: enable gapicv2 for phishingprotection/v1beta1 API\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305126983\n\nff74d47d47280e6bbcbad1a7c82b1e0959c472ec\nfix: PHP-related fixes in BUILD.bazel and service.yamls\n\nThis PR also adds the rules for all 7 langauges in OsLogin and Kms BUILD.bazel files. Those build files were missing rules for 5 langagues, including PHP.\n\nThis PR is the prerequisite for migrating PHP synth.py scripts from artman to bazel.\n\nThe fixes in service.yaml fix regression made during proto annotation migration. This became visible only during PHP generation, because only PHP depends on the affected sections of the service.yaml config.\n\nPiperOrigin-RevId: 305108224\n\nfdbc7b1f63969307c71143a0c24fdfd02e739df6\nEnable gapicv2 for osconfig/agentendpoint/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305086443\n\n1490d30e1ae339570dd7826ba625a603ede91a08\nEnable gapicv2 for osconfig/v1beta\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305069755\n\n7bf824e82e5c3549642b150dc4a9579602000f34\nEnable gapicv2 for iam/credentials/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305065283\n\n9ff6fd3b22f99167827e89aae7778408b5e82425\nUpdates Dataproc v1 API:\n- Adds Dataproc Jobs.SubmitJobAsOperation RPC\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053617\n\ncad0f5137a70d0d14a8d9acbfcee98e4cd3e9662\nUpdates to Dataproc v1beta2 API:\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053062\n\na005f045a301535eeb4c4b3fa7bb94eec9d22a8b\nAdd support for Cloud EKM to the Cloud KMS service and resource protos.\n\nPiperOrigin-RevId: 305026790\n\n5077b1e4674afdbbf11dac3f5f43d36285ba53ff\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304836531\n\nd6cb4997910eda04c0c66c0f2fd043eeaa0f660d\nchore: enable gapic v2 and proto annotation for documentai API.\n\ncommitter @summer-ji-eng\n\nPiperOrigin-RevId: 304724866\n\n490bc556608bfa5b1548c9374b06152fa33d657e\nEnable gapicv2 for devtools/remoteworkers/v1test2\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718691\n\n9f78ce31a5bd7f4a63e3cf0ddf28221557adb7ed\nEnable gapicv2 for managedidentities/v1beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718676\n\n6e17d259b8e320bc51aa240cefef05ec753e2b83\ndocs: treat a dummy example URL as a string literal instead of a link\n\nPiperOrigin-RevId: 304716376\n\na8d76f99d3073aaccabdcc122c798a63e812c4fe\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304702368\n\n65c749bc6a1d240416a0e6979381b67f97aff907\ndocs: fix formatting of some regexes and string literals.\n\nPiperOrigin-RevId: 304701150\n\n9119eefcd2b5ce845a680fa4ec4093ed733498f0\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304698702\n\n62a2a7cc33d3535638d220df238823eefcca930d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696461\n\n23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99820243d348191bc9c634f2b48ddf65096285ed" + "sha": "1df68ed6735ddce6797d0f83641a731c3c3f75b4", + "log": "1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" } } ], diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 039da7bea988..4b2a85fb3527 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -302,7 +302,7 @@ describe('v1.CloudBuildClient', () => { const expectedOptions = {}; const expectedError = new Error('expected'); client.innerApiCalls.getBuild = stubSimpleCall(undefined, expectedError); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getBuild(request); }, expectedError); assert( @@ -392,7 +392,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.cancelBuild(request); }, expectedError); assert( @@ -484,7 +484,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createBuildTrigger(request); }, expectedError); assert( @@ -574,7 +574,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getBuildTrigger(request); }, expectedError); assert( @@ -666,7 +666,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteBuildTrigger(request); }, expectedError); assert( @@ -758,7 +758,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateBuildTrigger(request); }, expectedError); assert( @@ -848,7 +848,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createWorkerPool(request); }, expectedError); assert( @@ -938,7 +938,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.getWorkerPool(request); }, expectedError); assert( @@ -1028,7 +1028,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.deleteWorkerPool(request); }, expectedError); assert( @@ -1118,7 +1118,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.updateWorkerPool(request); }, expectedError); assert( @@ -1208,7 +1208,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listWorkerPools(request); }, expectedError); assert( @@ -1306,7 +1306,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.createBuild(request); }, expectedError); assert( @@ -1333,7 +1333,7 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.createBuild(request); - assert.rejects(async () => { + await assert.rejects(async () => { await operation.promise(); }, expectedError); assert( @@ -1431,7 +1431,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.retryBuild(request); }, expectedError); assert( @@ -1458,7 +1458,7 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.retryBuild(request); - assert.rejects(async () => { + await assert.rejects(async () => { await operation.promise(); }, expectedError); assert( @@ -1558,7 +1558,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.runBuildTrigger(request); }, expectedError); assert( @@ -1585,7 +1585,7 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.runBuildTrigger(request); - assert.rejects(async () => { + await assert.rejects(async () => { await operation.promise(); }, expectedError); assert( @@ -1679,7 +1679,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listBuilds(request); }, expectedError); assert( @@ -1761,7 +1761,7 @@ describe('v1.CloudBuildClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -1817,7 +1817,7 @@ describe('v1.CloudBuildClient', () => { expectedError ); const iterable = client.listBuildsAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -1927,7 +1927,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - assert.rejects(async () => { + await assert.rejects(async () => { await client.listBuildTriggers(request); }, expectedError); assert( @@ -2015,7 +2015,7 @@ describe('v1.CloudBuildClient', () => { reject(err); }); }); - assert.rejects(async () => { + await assert.rejects(async () => { await promise; }, expectedError); assert( @@ -2076,7 +2076,7 @@ describe('v1.CloudBuildClient', () => { expectedError ); const iterable = client.listBuildTriggersAsync(request); - assert.rejects(async () => { + await assert.rejects(async () => { const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = []; for await (const resource of iterable) { responses.push(resource!); From cbbbe3f491f668d3bf22b3dcbf49e9e90dc06693 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 10 Apr 2020 20:56:29 +0200 Subject: [PATCH 065/223] chore(deps): update dependency gts to v2.0.0 (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [gts](https://togithub.com/google/gts) | devDependencies | patch | [`2.0.0-alpha.9` -> `2.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.0-alpha.9/2.0.0) | --- ### Release Notes
google/gts ### [`v2.0.0`](https://togithub.com/google/gts/blob/master/CHANGELOG.md#​200-httpswwwgithubcomgooglegtscomparev112v200-2020-04-02) [Compare Source](https://togithub.com/google/gts/compare/39a2705e51b4b6329a70f91f8293a2d7a363bf5d...v2.0.0) ##### ⚠ BREAKING CHANGES ⚠ This is a major rewrite of the tool. Based on community guidance, we've switched from using [tslint](https://palantir.github.io/tslint/) to [eslint](https://eslint.org/). _Please read all of the steps below to upgrade_. ##### Configuring `eslint` With the shift to `eslint`, `gts` now will format and lint JavaScript _as well_ as TypeScript. Upgrading will require a number of manual steps. To format JavaScript and TypeScript, you can run: $ npx gts fix To specify only TypeScript: $ npx gts fix '**/*.ts' ##### Delete `tslint.json` This file is no longer used, and can lead to confusion. ##### Create a `.eslintrc.json` Now that we're using eslint, you need to extend the eslint configuration baked into the module. Create a new file named `.eslintrc.json`, and paste the following: ```js { "extends": "./node_modules/gts" } ``` ##### Create a `.eslintignore` The `.eslintignore` file lets you ignore specific directories. This tool now lints and formats JavaScript, so it's _really_ important to ignore your build directory! Here is an example of a `.eslintignore` file: **/node_modules build/ ##### Rule changes The underlying linter was changed, so naturally there are going to be a variety of rule changes along the way. To see the full list, check out [.eslintrc.json](https://togithub.com/google/gts/blob/master/.eslintrc.json). ##### Require Node.js 10.x and up Node.js 8.x is now end of life - this module now requires Ndoe.js 10.x and up. ##### Features - add the eol-last rule ([#​425](https://www.github.com/google/gts/issues/425)) ([50ebd4d](https://www.github.com/google/gts/commit/50ebd4dbaf063615f4c025f567ca28076a734223)) - allow eslintrc to run over tsx files ([#​469](https://www.github.com/google/gts/issues/469)) ([a21db94](https://www.github.com/google/gts/commit/a21db94601def563952d677cb0980a12b6730f4c)) - disable global rule for checking TODO comments ([#​459](https://www.github.com/google/gts/issues/459)) ([96aa84a](https://www.github.com/google/gts/commit/96aa84a0a42181046daa248750cc8fef0c320619)) - override require-atomic-updates ([#​468](https://www.github.com/google/gts/issues/468)) ([8105c93](https://www.github.com/google/gts/commit/8105c9334ee5104b05f6b1b2f150e51419637262)) - prefer single quotes if possible ([#​475](https://www.github.com/google/gts/issues/475)) ([39a2705](https://www.github.com/google/gts/commit/39a2705e51b4b6329a70f91f8293a2d7a363bf5d)) - use eslint instead of tslint ([#​400](https://www.github.com/google/gts/issues/400)) ([b3096fb](https://www.github.com/google/gts/commit/b3096fbd5076d302d93c2307bf627e12c423e726)) ##### Bug Fixes - use .prettierrc.js ([#​437](https://www.github.com/google/gts/issues/437)) ([06efa84](https://www.github.com/google/gts/commit/06efa8444cdf1064b64f3e8d61ebd04f45d90b4c)) - **deps:** update dependency chalk to v4 ([#​477](https://www.github.com/google/gts/issues/477)) ([061d64e](https://www.github.com/google/gts/commit/061d64e29d37b93ce55228937cc100e05ddef352)) - **deps:** update dependency eslint-plugin-node to v11 ([#​426](https://www.github.com/google/gts/issues/426)) ([a394b7c](https://www.github.com/google/gts/commit/a394b7c1f80437f25017ca5c500b968ebb789ece)) - **deps:** update dependency execa to v4 ([#​427](https://www.github.com/google/gts/issues/427)) ([f42ef36](https://www.github.com/google/gts/commit/f42ef36709251553342e655e287e889df72ee3e3)) - **deps:** update dependency prettier to v2 ([#​464](https://www.github.com/google/gts/issues/464)) ([20ef43d](https://www.github.com/google/gts/commit/20ef43d566df17d3c93949ef7db3b72ee9123ca3)) - disable no-use-before-define ([#​431](https://www.github.com/google/gts/issues/431)) ([dea2c22](https://www.github.com/google/gts/commit/dea2c223d1d3a60a1786aa820eebb93be27016a7)) - **deps:** update dependency update-notifier to v4 ([#​403](https://www.github.com/google/gts/issues/403)) ([57393b7](https://www.github.com/google/gts/commit/57393b74c6cf299e8ae09311f0382226b8baa3e3)) - **deps:** upgrade to meow 6.x ([#​423](https://www.github.com/google/gts/issues/423)) ([8f93d00](https://www.github.com/google/gts/commit/8f93d0049337a832d9a22b6ae4e86fd41140ec56)) - align back to the google style guide ([#​440](https://www.github.com/google/gts/issues/440)) ([8bd78c4](https://www.github.com/google/gts/commit/8bd78c4c78526a72400f618a95a987d2a7c1a8db)) - disable empty-function check ([#​467](https://www.github.com/google/gts/issues/467)) ([6455d7a](https://www.github.com/google/gts/commit/6455d7a9d227320d3ffe1b00c9c739b846f339a8)) - drop support for node 8 ([#​422](https://www.github.com/google/gts/issues/422)) ([888c686](https://www.github.com/google/gts/commit/888c68692079065f38ce66ec84472f1f3311a050)) - emit .prettierrc.js with init ([#​462](https://www.github.com/google/gts/issues/462)) ([b114614](https://www.github.com/google/gts/commit/b114614d22ab5560d2d1dd5cb6695968cc80027b)) - enable trailing comma ([#​470](https://www.github.com/google/gts/issues/470)) ([6518f58](https://www.github.com/google/gts/commit/6518f5843d3093e3beb7d3371b56d9aecedf3924)) - include _.tsx and _.jsx in default fix command ([#​473](https://www.github.com/google/gts/issues/473)) ([0509780](https://www.github.com/google/gts/commit/050978005ad089d9b3b5d8895b25ea1175d75db2)) ##### [1.1.2](https://www.github.com/google/gts/compare/v1.1.1...v1.1.2) (2019-11-20) ##### Bug Fixes - **deps:** update to newest prettier (with support for optional chain) ([#​396](https://www.github.com/google/gts/issues/396)) ([ce8ad06](https://www.github.com/google/gts/commit/ce8ad06c8489c44a9e2ed5292382637b3ebb7601)) ##### [1.1.1](https://www.github.com/google/gts/compare/v1.1.0...v1.1.1) (2019-11-11) ##### Bug Fixes - **deps:** update dependency chalk to v3 ([#​389](https://www.github.com/google/gts/issues/389)) ([1ce0f45](https://www.github.com/google/gts/commit/1ce0f450677e143a27efc39def617d13c66503e8)) - **deps:** update dependency inquirer to v7 ([#​377](https://www.github.com/google/gts/issues/377)) ([bf2c349](https://www.github.com/google/gts/commit/bf2c349b2208ac63e551542599ac9cd27b461338)) - **deps:** update dependency rimraf to v3 ([#​374](https://www.github.com/google/gts/issues/374)) ([2058eaa](https://www.github.com/google/gts/commit/2058eaa682f4baae978b469fd708d1f866e7da74)) - **deps:** update dependency write-file-atomic to v3 ([#​353](https://www.github.com/google/gts/issues/353)) ([59e6aa8](https://www.github.com/google/gts/commit/59e6aa8580a2f8e9457d2d2b6fa9e18e86347592))
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 870c66515ab8..ed5e514ed085 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -32,7 +32,7 @@ "eslint-config-prettier": "^6.0.0", "eslint-plugin-node": "^11.0.0", "eslint-plugin-prettier": "^3.0.1", - "gts": "2.0.0-alpha.9", + "gts": "2.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", From bd9129da085285f014d96555b9ac355eef3013b7 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 10 Apr 2020 18:49:56 -0700 Subject: [PATCH 066/223] fix: remove eslint, update gax, fix generated protos, run the generator (#100) Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint. --- packages/google-devtools-cloudbuild/package.json | 14 +++++--------- .../protos/protos.json | 16 ++++++++++++---- .../google-devtools-cloudbuild/synth.metadata | 15 +++------------ packages/google-devtools-cloudbuild/synth.py | 3 ++- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ed5e514ed085..38514c53c11e 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -28,11 +28,7 @@ "@types/sinon": "^9.0.0", "c8": "^7.0.0", "chai": "^4.2.0", - "eslint": "^6.0.0", - "eslint-config-prettier": "^6.0.0", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-prettier": "^3.0.1", - "gts": "2.0.0", + "gts": "^2.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", @@ -46,9 +42,9 @@ "scripts": { "predocs": "npm run compile", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts check && eslint samples system-test", + "lint": "gts fix", "clean": "gts clean", - "fix": "gts fix && eslint samples system-test --fix", + "fix": "gts fix", "compile": "tsc -p . && cp -r protos build/", "compile-protos": "compileProtos src", "prepare": "npm run compile-protos && npm run compile", @@ -58,13 +54,13 @@ "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "prelint": "cd samples; npm link ../; npm i" + "prelint": "cd samples; npm link ../; npm install" }, "license": "Apache-2.0", "engines": { "node": ">=10" }, "dependencies": { - "google-gax": "^2.0.1" + "google-gax": "^2.1.0" } } diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 84be4ce827af..3c7648f754f9 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -2358,26 +2358,32 @@ "extend": "google.protobuf.MethodOptions" }, "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, "methods": { "ListOperations": { "requestType": "ListOperationsRequest", "responseType": "ListOperationsResponse", "options": { - "(google.api.http).get": "/v1/{name=operations}" + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" } }, "GetOperation": { "requestType": "GetOperationRequest", "responseType": "Operation", "options": { - "(google.api.http).get": "/v1/{name=operations/**}" + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" } }, "DeleteOperation": { "requestType": "DeleteOperationRequest", "responseType": "google.protobuf.Empty", "options": { - "(google.api.http).delete": "/v1/{name=operations/**}" + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" } }, "CancelOperation": { @@ -2385,7 +2391,8 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).post": "/v1/{name=operations/**}:cancel", - "(google.api.http).body": "*" + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" } }, "WaitOperation": { @@ -2511,6 +2518,7 @@ }, "rpc": { "options": { + "cc_enable_arenas": true, "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", "java_multiple_files": true, "java_outer_classname": "StatusProto", diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index f12d7583c50d..8e2534c047ea 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,21 +1,12 @@ { - "updateTime": "2020-04-07T12:06:25.370681Z", + "updateTime": "2020-04-11T00:02:28.872597Z", "sources": [ - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "823facb4ca6a4b36b817ce955a790dcb40cf808f", - "internalRef": "305155214", - "log": "823facb4ca6a4b36b817ce955a790dcb40cf808f\nchore: enable gapicv2 for videointelligence/v1p3beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305155214\n\n6b9c969d42bcb0f8206675bd868ed7d1ddcdaef9\nAdd API for bigqueryreservation v1.\n\nPiperOrigin-RevId: 305151484\n\n514f7d27811832a9f58b83d6f6305d894b097cf6\nchore: enable gapicv2 for phishingprotection/v1beta1 API\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305126983\n\nff74d47d47280e6bbcbad1a7c82b1e0959c472ec\nfix: PHP-related fixes in BUILD.bazel and service.yamls\n\nThis PR also adds the rules for all 7 langauges in OsLogin and Kms BUILD.bazel files. Those build files were missing rules for 5 langagues, including PHP.\n\nThis PR is the prerequisite for migrating PHP synth.py scripts from artman to bazel.\n\nThe fixes in service.yaml fix regression made during proto annotation migration. This became visible only during PHP generation, because only PHP depends on the affected sections of the service.yaml config.\n\nPiperOrigin-RevId: 305108224\n\nfdbc7b1f63969307c71143a0c24fdfd02e739df6\nEnable gapicv2 for osconfig/agentendpoint/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305086443\n\n1490d30e1ae339570dd7826ba625a603ede91a08\nEnable gapicv2 for osconfig/v1beta\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305069755\n\n7bf824e82e5c3549642b150dc4a9579602000f34\nEnable gapicv2 for iam/credentials/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305065283\n\n9ff6fd3b22f99167827e89aae7778408b5e82425\nUpdates Dataproc v1 API:\n- Adds Dataproc Jobs.SubmitJobAsOperation RPC\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053617\n\ncad0f5137a70d0d14a8d9acbfcee98e4cd3e9662\nUpdates to Dataproc v1beta2 API:\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053062\n\na005f045a301535eeb4c4b3fa7bb94eec9d22a8b\nAdd support for Cloud EKM to the Cloud KMS service and resource protos.\n\nPiperOrigin-RevId: 305026790\n\n5077b1e4674afdbbf11dac3f5f43d36285ba53ff\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304836531\n\nd6cb4997910eda04c0c66c0f2fd043eeaa0f660d\nchore: enable gapic v2 and proto annotation for documentai API.\n\ncommitter @summer-ji-eng\n\nPiperOrigin-RevId: 304724866\n\n490bc556608bfa5b1548c9374b06152fa33d657e\nEnable gapicv2 for devtools/remoteworkers/v1test2\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718691\n\n9f78ce31a5bd7f4a63e3cf0ddf28221557adb7ed\nEnable gapicv2 for managedidentities/v1beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718676\n\n6e17d259b8e320bc51aa240cefef05ec753e2b83\ndocs: treat a dummy example URL as a string literal instead of a link\n\nPiperOrigin-RevId: 304716376\n\na8d76f99d3073aaccabdcc122c798a63e812c4fe\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304702368\n\n65c749bc6a1d240416a0e6979381b67f97aff907\ndocs: fix formatting of some regexes and string literals.\n\nPiperOrigin-RevId: 304701150\n\n9119eefcd2b5ce845a680fa4ec4093ed733498f0\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304698702\n\n62a2a7cc33d3535638d220df238823eefcca930d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696461\n\n23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n" - } - }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1df68ed6735ddce6797d0f83641a731c3c3f75b4", - "log": "1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie \n" + "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", + "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n" } } ], diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 968b24c2ef6a..2c156ced5852 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -44,4 +44,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) +subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npx', 'compileProtos', 'src']) From 68daf064302c2ea2e70294d8e248a929cd2ae5f7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sat, 11 Apr 2020 19:19:45 -0700 Subject: [PATCH 067/223] build: remove unused codecov config (#101) --- packages/google-devtools-cloudbuild/codecov.yaml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/codecov.yaml diff --git a/packages/google-devtools-cloudbuild/codecov.yaml b/packages/google-devtools-cloudbuild/codecov.yaml deleted file mode 100644 index 5724ea9478d7..000000000000 --- a/packages/google-devtools-cloudbuild/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com From 60111103c05c09004e641a6596d230f6049a2cb7 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 14:53:58 -0700 Subject: [PATCH 068/223] chore: update lint ignore files (#102) --- packages/google-devtools-cloudbuild/.eslintignore | 3 ++- packages/google-devtools-cloudbuild/.prettierignore | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.eslintignore b/packages/google-devtools-cloudbuild/.eslintignore index 09b31fe735a0..9340ad9b86d3 100644 --- a/packages/google-devtools-cloudbuild/.eslintignore +++ b/packages/google-devtools-cloudbuild/.eslintignore @@ -1,5 +1,6 @@ **/node_modules -src/**/doc/* +**/coverage +test/fixtures build/ docs/ protos/ diff --git a/packages/google-devtools-cloudbuild/.prettierignore b/packages/google-devtools-cloudbuild/.prettierignore index f6fac98b0a8e..9340ad9b86d3 100644 --- a/packages/google-devtools-cloudbuild/.prettierignore +++ b/packages/google-devtools-cloudbuild/.prettierignore @@ -1,3 +1,6 @@ -node_modules/* -samples/node_modules/* -src/**/doc/* +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ From 6c56bf057f8e51e2dfc964196b7a587f385cf335 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Mon, 13 Apr 2020 19:28:32 -0700 Subject: [PATCH 069/223] chore: remove tslint.json (#103) --- packages/google-devtools-cloudbuild/tslint.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/tslint.json diff --git a/packages/google-devtools-cloudbuild/tslint.json b/packages/google-devtools-cloudbuild/tslint.json deleted file mode 100644 index 617dc975bae8..000000000000 --- a/packages/google-devtools-cloudbuild/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "gts/tslint.json" -} From f721b2752012e36448438263c01c5ecf776f3262 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 14 Apr 2020 09:55:47 -0700 Subject: [PATCH 070/223] chore: remove unused dev packages (#104) --- packages/google-devtools-cloudbuild/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 38514c53c11e..ce6368db2a21 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,6 @@ "linkinator": "^2.0.0", "mocha": "^7.0.0", "pack-n-play": "^1.0.0-2", - "prettier": "^1.17.0", "sinon": "^9.0.1", "typescript": "^3.8.3" }, From f54cd758c201047e35e965f2829f3b2c63951252 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Wed, 15 Apr 2020 09:42:36 -0700 Subject: [PATCH 071/223] chore: run fix instead of lint in synthfile (#106) --- packages/google-devtools-cloudbuild/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 2c156ced5852..104aad4b9555 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -44,5 +44,5 @@ # Node.js specific cleanup subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src']) From b05cf2001ff8ba9927d920f5a7661274a516a9db Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Apr 2020 09:57:40 -0700 Subject: [PATCH 072/223] chore: linting (#108) --- .../google-devtools-cloudbuild/synth.metadata | 19 ++++++++++++++++--- .../system-test/install.ts | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 8e2534c047ea..40da81be92f6 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -1,12 +1,25 @@ { - "updateTime": "2020-04-11T00:02:28.872597Z", "sources": [ + { + "git": { + "name": ".", + "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", + "sha": "d6370a1147e00bc487d26ac16b80529cd0baba02" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "bcc476396e799806d3355e87246c6becf6250a70", + "internalRef": "306974763" + } + }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5", - "log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie \n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n" + "sha": "682c0c37d1054966ca662a44259e96cc7aea4413" } } ], diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index c4d80e9c0c8c..4c1ba3eb79af 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -21,7 +21,7 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function() { + it('should have correct type signature for typescript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. @@ -35,7 +35,7 @@ describe('typescript consumer tests', () => { await packNTest(options); // will throw upon error. }); - it('should have correct type signature for javascript users', async function() { + it('should have correct type signature for javascript users', async function () { this.timeout(300000); const options = { packageDir: process.cwd(), // path to your module. From 779d9ed324d284b9917f9115cbf40d3ff0f08912 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 20 Apr 2020 14:42:23 -0700 Subject: [PATCH 073/223] build: use codecov's action, now that it's authless (#499) (#109) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/73563d93-aea4-4354-9013-d19800d55cda/targets --- packages/google-devtools-cloudbuild/synth.metadata | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 40da81be92f6..d7bbdfe949dd 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "d6370a1147e00bc487d26ac16b80529cd0baba02" + "sha": "58343cc0991725c5f9730b8d5c8486e2e6f19220" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "bcc476396e799806d3355e87246c6becf6250a70", - "internalRef": "306974763" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "682c0c37d1054966ca662a44259e96cc7aea4413" + "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" } } ], From 8bd99331908c9882fc215a25ae3ec4f49b6ab170 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 20:14:34 -0700 Subject: [PATCH 074/223] build: adopt changes to generator formatter (#110) --- .../protos/protos.js | 572 +++++++++--------- .../google-devtools-cloudbuild/synth.metadata | 2 +- 2 files changed, 287 insertions(+), 287 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 3e9473e8a782..d28ce8d0c56d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -694,9 +694,9 @@ RetryBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); return writer; }; @@ -913,11 +913,11 @@ RunBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -1150,11 +1150,11 @@ StorageSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bucket != null && message.hasOwnProperty("bucket")) + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.object != null && message.hasOwnProperty("object")) + if (message.object != null && Object.hasOwnProperty.call(message, "object")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); - if (message.generation != null && message.hasOwnProperty("generation")) + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); return writer; }; @@ -1456,21 +1456,21 @@ RepoSource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.repoName != null && message.hasOwnProperty("repoName")) + if (message.repoName != null && Object.hasOwnProperty.call(message, "repoName")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.repoName); - if (message.branchName != null && message.hasOwnProperty("branchName")) + if (message.branchName != null && Object.hasOwnProperty.call(message, "branchName")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.branchName); - if (message.tagName != null && message.hasOwnProperty("tagName")) + if (message.tagName != null && Object.hasOwnProperty.call(message, "tagName")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.tagName); - if (message.commitSha != null && message.hasOwnProperty("commitSha")) + if (message.commitSha != null && Object.hasOwnProperty.call(message, "commitSha")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.commitSha); - if (message.dir != null && message.hasOwnProperty("dir")) + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.dir); - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) writer.uint32(/* id 8, wireType 0 =*/64).bool(message.invertRegex); - if (message.substitutions != null && message.hasOwnProperty("substitutions")) + if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); return writer; @@ -1796,9 +1796,9 @@ Source.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.storageSource != null && message.hasOwnProperty("storageSource")) + if (message.storageSource != null && Object.hasOwnProperty.call(message, "storageSource")) $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.storageSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.repoSource != null && message.hasOwnProperty("repoSource")) + if (message.repoSource != null && Object.hasOwnProperty.call(message, "repoSource")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.repoSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -2036,11 +2036,11 @@ BuiltImage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.digest != null && message.hasOwnProperty("digest")) + if (message.digest != null && Object.hasOwnProperty.call(message, "digest")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.digest); - if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + if (message.pushTiming != null && Object.hasOwnProperty.call(message, "pushTiming")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pushTiming, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -2368,7 +2368,7 @@ BuildStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.env != null && message.env.length) for (var i = 0; i < message.env.length; ++i) @@ -2376,14 +2376,14 @@ if (message.args != null && message.args.length) for (var i = 0; i < message.args.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); - if (message.dir != null && message.hasOwnProperty("dir")) + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); if (message.waitFor != null && message.waitFor.length) for (var i = 0; i < message.waitFor.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); - if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + if (message.entrypoint != null && Object.hasOwnProperty.call(message, "entrypoint")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.entrypoint); if (message.secretEnv != null && message.secretEnv.length) for (var i = 0; i < message.secretEnv.length; ++i) @@ -2391,13 +2391,13 @@ if (message.volumes != null && message.volumes.length) for (var i = 0; i < message.volumes.length; ++i) $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.timing != null && message.hasOwnProperty("timing")) + if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 12, wireType 0 =*/96).int32(message.status); - if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) + if (message.pullTiming != null && Object.hasOwnProperty.call(message, "pullTiming")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pullTiming, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -2866,9 +2866,9 @@ Volume.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -3121,14 +3121,14 @@ if (message.buildStepImages != null && message.buildStepImages.length) for (var i = 0; i < message.buildStepImages.length; ++i) writer.uint32(/* id 3, wireType 2 =*/26).string(message.buildStepImages[i]); - if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + if (message.artifactManifest != null && Object.hasOwnProperty.call(message, "artifactManifest")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactManifest); - if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + if (message.numArtifacts != null && Object.hasOwnProperty.call(message, "numArtifacts")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.numArtifacts); if (message.buildStepOutputs != null && message.buildStepOutputs.length) for (var i = 0; i < message.buildStepOutputs.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.buildStepOutputs[i]); - if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) + if (message.artifactTiming != null && Object.hasOwnProperty.call(message, "artifactTiming")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.artifactTiming, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -3452,7 +3452,7 @@ ArtifactResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); if (message.fileHash != null && message.fileHash.length) for (var i = 0; i < message.fileHash.length; ++i) @@ -3877,43 +3877,43 @@ Build.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); - if (message.source != null && message.hasOwnProperty("source")) + if (message.source != null && Object.hasOwnProperty.call(message, "source")) $root.google.devtools.cloudbuild.v1.Source.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.startTime != null && message.hasOwnProperty("startTime")) + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.results != null && message.hasOwnProperty("results")) + if (message.results != null && Object.hasOwnProperty.call(message, "results")) $root.google.devtools.cloudbuild.v1.Results.encode(message.results, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.steps != null && message.steps.length) for (var i = 0; i < message.steps.length; ++i) $root.google.devtools.cloudbuild.v1.BuildStep.encode(message.steps[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.images != null && message.images.length) for (var i = 0; i < message.images.length; ++i) writer.uint32(/* id 13, wireType 2 =*/106).string(message.images[i]); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 16, wireType 2 =*/130).string(message.projectId); - if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + if (message.logsBucket != null && Object.hasOwnProperty.call(message, "logsBucket")) writer.uint32(/* id 19, wireType 2 =*/154).string(message.logsBucket); - if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) + if (message.sourceProvenance != null && Object.hasOwnProperty.call(message, "sourceProvenance")) $root.google.devtools.cloudbuild.v1.SourceProvenance.encode(message.sourceProvenance, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + if (message.buildTriggerId != null && Object.hasOwnProperty.call(message, "buildTriggerId")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.buildTriggerId); - if (message.options != null && message.hasOwnProperty("options")) + if (message.options != null && Object.hasOwnProperty.call(message, "options")) $root.google.devtools.cloudbuild.v1.BuildOptions.encode(message.options, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (message.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) writer.uint32(/* id 24, wireType 2 =*/194).string(message.statusDetail); - if (message.logUrl != null && message.hasOwnProperty("logUrl")) + if (message.logUrl != null && Object.hasOwnProperty.call(message, "logUrl")) writer.uint32(/* id 25, wireType 2 =*/202).string(message.logUrl); - if (message.substitutions != null && message.hasOwnProperty("substitutions")) + if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) writer.uint32(/* id 29, wireType 2 =*/234).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); if (message.tags != null && message.tags.length) @@ -3922,14 +3922,14 @@ if (message.secrets != null && message.secrets.length) for (var i = 0; i < message.secrets.length; ++i) $root.google.devtools.cloudbuild.v1.Secret.encode(message.secrets[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.timing != null && message.hasOwnProperty("timing")) + if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) for (var keys = Object.keys(message.timing), i = 0; i < keys.length; ++i) { writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - if (message.artifacts != null && message.hasOwnProperty("artifacts")) + if (message.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) + if (message.queueTtl != null && Object.hasOwnProperty.call(message, "queueTtl")) $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); return writer; }; @@ -4513,7 +4513,7 @@ /** * Status enum. * @name google.devtools.cloudbuild.v1.Build.Status - * @enum {string} + * @enum {number} * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value * @property {number} QUEUED=1 QUEUED value * @property {number} WORKING=2 WORKING value @@ -4610,7 +4610,7 @@ if (message.images != null && message.images.length) for (var i = 0; i < message.images.length; ++i) writer.uint32(/* id 1, wireType 2 =*/10).string(message.images[i]); - if (message.objects != null && message.hasOwnProperty("objects")) + if (message.objects != null && Object.hasOwnProperty.call(message, "objects")) $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.encode(message.objects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -4844,12 +4844,12 @@ ArtifactObjects.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && message.hasOwnProperty("location")) + if (message.location != null && Object.hasOwnProperty.call(message, "location")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); 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.timing != null && message.hasOwnProperty("timing")) + if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -5091,9 +5091,9 @@ TimeSpan.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startTime != null && message.hasOwnProperty("startTime")) + 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 && message.hasOwnProperty("endTime")) + 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; }; @@ -5302,7 +5302,7 @@ BuildOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; @@ -5513,14 +5513,14 @@ SourceProvenance.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resolvedStorageSource != null && message.hasOwnProperty("resolvedStorageSource")) + if (message.resolvedStorageSource != null && Object.hasOwnProperty.call(message, "resolvedStorageSource")) $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.resolvedStorageSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) + if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) for (var keys = Object.keys(message.fileHashes), i = 0; i < keys.length; ++i) { writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHashes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); } - if (message.resolvedRepoSource != null && message.hasOwnProperty("resolvedRepoSource")) + if (message.resolvedRepoSource != null && Object.hasOwnProperty.call(message, "resolvedRepoSource")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.resolvedRepoSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; @@ -5982,9 +5982,9 @@ Hash.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; @@ -6154,7 +6154,7 @@ /** * HashType enum. * @name google.devtools.cloudbuild.v1.Hash.HashType - * @enum {string} + * @enum {number} * @property {number} NONE=0 NONE value * @property {number} SHA256=1 SHA256 value * @property {number} MD5=2 MD5 value @@ -6236,9 +6236,9 @@ Secret.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) + if (message.secretEnv != null && Object.hasOwnProperty.call(message, "secretEnv")) for (var keys = Object.keys(message.secretEnv), 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).bytes(message.secretEnv[keys[i]]).ldelim(); return writer; @@ -6469,9 +6469,9 @@ CreateBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -6684,9 +6684,9 @@ GetBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); return writer; }; @@ -6912,13 +6912,13 @@ ListBuildsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter); return writer; }; @@ -7152,7 +7152,7 @@ if (message.builds != null && message.builds.length) for (var i = 0; i < message.builds.length; ++i) $root.google.devtools.cloudbuild.v1.Build.encode(message.builds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -7379,9 +7379,9 @@ CancelBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); return writer; }; @@ -7706,24 +7706,24 @@ BuildTrigger.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && message.hasOwnProperty("id")) + if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.build != null && message.hasOwnProperty("build")) + if (message.build != null && Object.hasOwnProperty.call(message, "build")) $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) + if (message.triggerTemplate != null && Object.hasOwnProperty.call(message, "triggerTemplate")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.triggerTemplate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.filename != null && message.hasOwnProperty("filename")) + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.filename); - if (message.disabled != null && message.hasOwnProperty("disabled")) + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) writer.uint32(/* id 9, wireType 0 =*/72).bool(message.disabled); - if (message.description != null && message.hasOwnProperty("description")) + if (message.description != null && Object.hasOwnProperty.call(message, "description")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); - if (message.substitutions != null && message.hasOwnProperty("substitutions")) + if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); - if (message.github != null && message.hasOwnProperty("github")) + if (message.github != null && Object.hasOwnProperty.call(message, "github")) $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.encode(message.github, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.ignoredFiles != null && message.ignoredFiles.length) for (var i = 0; i < message.ignoredFiles.length; ++i) @@ -7734,7 +7734,7 @@ if (message.tags != null && message.tags.length) for (var i = 0; i < message.tags.length; ++i) writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 21, wireType 2 =*/170).string(message.name); return writer; }; @@ -8200,15 +8200,15 @@ GitHubEventsConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.installationId != null && message.hasOwnProperty("installationId")) + if (message.installationId != null && Object.hasOwnProperty.call(message, "installationId")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.installationId); - if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) + if (message.pullRequest != null && Object.hasOwnProperty.call(message, "pullRequest")) $root.google.devtools.cloudbuild.v1.PullRequestFilter.encode(message.pullRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.push != null && message.hasOwnProperty("push")) + if (message.push != null && Object.hasOwnProperty.call(message, "push")) $root.google.devtools.cloudbuild.v1.PushFilter.encode(message.push, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.owner != null && message.hasOwnProperty("owner")) + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.owner); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); return writer; }; @@ -8509,11 +8509,11 @@ PullRequestFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.branch != null && message.hasOwnProperty("branch")) + if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); - if (message.commentControl != null && message.hasOwnProperty("commentControl")) + if (message.commentControl != null && Object.hasOwnProperty.call(message, "commentControl")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.commentControl); - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.invertRegex); return writer; }; @@ -8685,7 +8685,7 @@ /** * CommentControl enum. * @name google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl - * @enum {string} + * @enum {number} * @property {number} COMMENTS_DISABLED=0 COMMENTS_DISABLED value * @property {number} COMMENTS_ENABLED=1 COMMENTS_ENABLED value */ @@ -8787,11 +8787,11 @@ PushFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.branch != null && message.hasOwnProperty("branch")) + if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.invertRegex); return writer; }; @@ -9020,9 +9020,9 @@ CreateBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -9235,9 +9235,9 @@ GetBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); return writer; }; @@ -9454,11 +9454,11 @@ ListBuildTriggersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; @@ -9681,7 +9681,7 @@ if (message.triggers != null && message.triggers.length) for (var i = 0; i < message.triggers.length; ++i) $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.triggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -9908,9 +9908,9 @@ DeleteBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); return writer; }; @@ -10127,11 +10127,11 @@ UpdateBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); - if (message.trigger != null && message.hasOwnProperty("trigger")) + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -10446,19 +10446,19 @@ writer.int32(message.sourceProvenanceHash[i]); writer.ldelim(); } - if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + if (message.requestedVerifyOption != null && Object.hasOwnProperty.call(message, "requestedVerifyOption")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.requestedVerifyOption); - if (message.machineType != null && message.hasOwnProperty("machineType")) + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.machineType); - if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + if (message.substitutionOption != null && Object.hasOwnProperty.call(message, "substitutionOption")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.substitutionOption); - if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + if (message.logStreamingOption != null && Object.hasOwnProperty.call(message, "logStreamingOption")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.logStreamingOption); - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) writer.uint32(/* id 6, wireType 0 =*/48).int64(message.diskSizeGb); - if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.workerPool); - if (message.logging != null && message.hasOwnProperty("logging")) + if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logging); if (message.env != null && message.env.length) for (var i = 0; i < message.env.length; ++i) @@ -10891,7 +10891,7 @@ /** * VerifyOption enum. * @name google.devtools.cloudbuild.v1.BuildOptions.VerifyOption - * @enum {string} + * @enum {number} * @property {number} NOT_VERIFIED=0 NOT_VERIFIED value * @property {number} VERIFIED=1 VERIFIED value */ @@ -10905,7 +10905,7 @@ /** * MachineType enum. * @name google.devtools.cloudbuild.v1.BuildOptions.MachineType - * @enum {string} + * @enum {number} * @property {number} UNSPECIFIED=0 UNSPECIFIED value * @property {number} N1_HIGHCPU_8=1 N1_HIGHCPU_8 value * @property {number} N1_HIGHCPU_32=2 N1_HIGHCPU_32 value @@ -10921,7 +10921,7 @@ /** * SubstitutionOption enum. * @name google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption - * @enum {string} + * @enum {number} * @property {number} MUST_MATCH=0 MUST_MATCH value * @property {number} ALLOW_LOOSE=1 ALLOW_LOOSE value */ @@ -10935,7 +10935,7 @@ /** * LogStreamingOption enum. * @name google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption - * @enum {string} + * @enum {number} * @property {number} STREAM_DEFAULT=0 STREAM_DEFAULT value * @property {number} STREAM_ON=1 STREAM_ON value * @property {number} STREAM_OFF=2 STREAM_OFF value @@ -10951,7 +10951,7 @@ /** * LoggingMode enum. * @name google.devtools.cloudbuild.v1.BuildOptions.LoggingMode - * @enum {string} + * @enum {number} * @property {number} LOGGING_UNSPECIFIED=0 LOGGING_UNSPECIFIED value * @property {number} LEGACY=1 LEGACY value * @property {number} GCS_ONLY=2 GCS_ONLY value @@ -11105,11 +11105,11 @@ WorkerPool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); - if (message.workerCount != null && message.hasOwnProperty("workerCount")) + if (message.workerCount != null && Object.hasOwnProperty.call(message, "workerCount")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.workerCount); if (message.regions != null && message.regions.length) { writer.uint32(/* id 9, wireType 2 =*/74).fork(); @@ -11117,17 +11117,17 @@ writer.int32(message.regions[i]); writer.ldelim(); } - if (message.createTime != null && message.hasOwnProperty("createTime")) + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.status != null && message.hasOwnProperty("status")) + if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 13, wireType 0 =*/104).int32(message.status); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 14, wireType 2 =*/114).string(message.name); - if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) + if (message.workerConfig != null && Object.hasOwnProperty.call(message, "workerConfig")) $root.google.devtools.cloudbuild.v1.WorkerConfig.encode(message.workerConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); return writer; }; @@ -11470,7 +11470,7 @@ /** * Region enum. * @name google.devtools.cloudbuild.v1.WorkerPool.Region - * @enum {string} + * @enum {number} * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value * @property {number} US_CENTRAL1=1 US_CENTRAL1 value * @property {number} US_WEST1=2 US_WEST1 value @@ -11490,7 +11490,7 @@ /** * Status enum. * @name google.devtools.cloudbuild.v1.WorkerPool.Status - * @enum {string} + * @enum {number} * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} RUNNING=2 RUNNING value @@ -11593,13 +11593,13 @@ WorkerConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.machineType != null && message.hasOwnProperty("machineType")) + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diskSizeGb); - if (message.network != null && message.hasOwnProperty("network")) + if (message.network != null && Object.hasOwnProperty.call(message, "network")) $root.google.devtools.cloudbuild.v1.Network.encode(message.network, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.tag != null && message.hasOwnProperty("tag")) + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.tag); return writer; }; @@ -11857,11 +11857,11 @@ Network.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && message.hasOwnProperty("projectId")) + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.network != null && message.hasOwnProperty("network")) + if (message.network != null && Object.hasOwnProperty.call(message, "network")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetwork); return writer; }; @@ -12080,9 +12080,9 @@ CreateWorkerPoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -12286,7 +12286,7 @@ GetWorkerPoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -12473,7 +12473,7 @@ DeleteWorkerPoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -12669,9 +12669,9 @@ UpdateWorkerPoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -12875,7 +12875,7 @@ ListWorkerPoolsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && message.hasOwnProperty("parent")) + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); return writer; }; @@ -13301,7 +13301,7 @@ 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 && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); return writer; }; @@ -13615,26 +13615,26 @@ HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && message.hasOwnProperty("selector")) + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && message.hasOwnProperty("get")) + if (message.get != null && Object.hasOwnProperty.call(message, "get")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && message.hasOwnProperty("put")) + if (message.put != null && Object.hasOwnProperty.call(message, "put")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && message.hasOwnProperty("post")) + if (message.post != null && Object.hasOwnProperty.call(message, "post")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && message.hasOwnProperty("delete")) + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && message.hasOwnProperty("patch")) + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && message.hasOwnProperty("body")) + if (message.body != null && Object.hasOwnProperty.call(message, "body")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && message.hasOwnProperty("custom")) + 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 && message.hasOwnProperty("responseBody")) + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); return writer; }; @@ -13991,9 +13991,9 @@ CustomHttpPattern.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && message.hasOwnProperty("kind")) + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && message.hasOwnProperty("path")) + if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; @@ -14139,7 +14139,7 @@ /** * FieldBehavior enum. * @name google.api.FieldBehavior - * @enum {string} + * @enum {number} * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value * @property {number} OPTIONAL=1 OPTIONAL value * @property {number} REQUIRED=2 REQUIRED value @@ -14540,9 +14540,9 @@ FileDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && message.hasOwnProperty("package")) + 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) @@ -14559,9 +14559,9 @@ 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 && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("sourceCodeInfo")) + 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) @@ -14569,7 +14569,7 @@ 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 && message.hasOwnProperty("syntax")) + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); return writer; }; @@ -15107,7 +15107,7 @@ DescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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) @@ -15124,7 +15124,7 @@ 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 && message.hasOwnProperty("options")) + 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) @@ -15589,11 +15589,11 @@ ExtensionRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -15817,9 +15817,9 @@ ReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -16310,25 +16310,25 @@ FieldDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && message.hasOwnProperty("extendee")) + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && message.hasOwnProperty("label")) + if (message.label != null && Object.hasOwnProperty.call(message, "label")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && message.hasOwnProperty("type")) + if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && message.hasOwnProperty("typeName")) + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("oneofIndex")) + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); return writer; }; @@ -16675,7 +16675,7 @@ /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} + * @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 @@ -16721,7 +16721,7 @@ /** * Label enum. * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} + * @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 @@ -16802,9 +16802,9 @@ OneofDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -17047,12 +17047,12 @@ EnumDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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) @@ -17355,9 +17355,9 @@ EnumReservedRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.start != null && message.hasOwnProperty("start")) + if (message.start != null && Object.hasOwnProperty.call(message, "start")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); return writer; }; @@ -17577,11 +17577,11 @@ EnumValueDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && message.hasOwnProperty("number")) + if (message.number != null && Object.hasOwnProperty.call(message, "number")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && message.hasOwnProperty("options")) + 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; }; @@ -17815,12 +17815,12 @@ ServiceDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + 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 && message.hasOwnProperty("options")) + 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; }; @@ -18100,17 +18100,17 @@ MethodDescriptorProto.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && message.hasOwnProperty("inputType")) + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && message.hasOwnProperty("outputType")) + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && message.hasOwnProperty("options")) + 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 && message.hasOwnProperty("clientStreaming")) + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); return writer; }; @@ -18539,45 +18539,45 @@ FileOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + 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) @@ -18970,7 +18970,7 @@ /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} + * @enum {number} * @property {number} SPEED=1 SPEED value * @property {number} CODE_SIZE=2 CODE_SIZE value * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value @@ -19079,13 +19079,13 @@ MessageOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + 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) @@ -19405,17 +19405,17 @@ FieldOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.ctype != null && message.hasOwnProperty("ctype")) + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && message.hasOwnProperty("packed")) + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && message.hasOwnProperty("lazy")) + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && message.hasOwnProperty("jstype")) + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && message.hasOwnProperty("weak")) + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) @@ -19744,7 +19744,7 @@ /** * CType enum. * @name google.protobuf.FieldOptions.CType - * @enum {string} + * @enum {number} * @property {number} STRING=0 STRING value * @property {number} CORD=1 CORD value * @property {number} STRING_PIECE=2 STRING_PIECE value @@ -19760,7 +19760,7 @@ /** * JSType enum. * @name google.protobuf.FieldOptions.JSType - * @enum {string} + * @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 @@ -20059,9 +20059,9 @@ EnumOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -20304,7 +20304,7 @@ EnumValueOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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) @@ -20553,14 +20553,14 @@ ServiceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + 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 && message.hasOwnProperty(".google.api.defaultHost")) + 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 && message.hasOwnProperty(".google.api.oauthScopes")) + 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; }; @@ -20848,19 +20848,19 @@ MethodOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + 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; }; @@ -21110,7 +21110,7 @@ /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {string} + * @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 @@ -21240,17 +21240,17 @@ 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 && message.hasOwnProperty("identifierValue")) + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); return writer; }; @@ -22027,9 +22027,9 @@ writer.int32(message.span[i]); writer.ldelim(); } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + 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) @@ -22560,11 +22560,11 @@ writer.int32(message.path[i]); writer.ldelim(); } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && message.hasOwnProperty("begin")) + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && message.hasOwnProperty("end")) + if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); return writer; }; @@ -22817,9 +22817,9 @@ Any.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type_url != null && message.hasOwnProperty("type_url")) + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && message.hasOwnProperty("value")) + if (message.value != null && Object.hasOwnProperty.call(message, "value")) writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); return writer; }; @@ -23036,9 +23036,9 @@ Duration.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -23420,9 +23420,9 @@ Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && message.hasOwnProperty("seconds")) + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && message.hasOwnProperty("nanos")) + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); return writer; }; @@ -23897,15 +23897,15 @@ Operation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.metadata != null && message.hasOwnProperty("metadata")) + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.done != null && message.hasOwnProperty("done")) + if (message.done != null && Object.hasOwnProperty.call(message, "done")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); - if (message.error != null && message.hasOwnProperty("error")) + if (message.error != null && Object.hasOwnProperty.call(message, "error")) $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.response != null && message.hasOwnProperty("response")) + if (message.response != null && Object.hasOwnProperty.call(message, "response")) $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -24165,7 +24165,7 @@ GetOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -24379,13 +24379,13 @@ ListOperationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && message.hasOwnProperty("filter")) + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -24619,7 +24619,7 @@ if (message.operations != null && message.operations.length) for (var i = 0; i < message.operations.length; ++i) $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; @@ -24837,7 +24837,7 @@ CancelOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -25024,7 +25024,7 @@ DeleteOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; @@ -25220,9 +25220,9 @@ WaitOperationRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && message.hasOwnProperty("name")) + if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.timeout != null && message.hasOwnProperty("timeout")) + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -25435,9 +25435,9 @@ OperationInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.responseType != null && message.hasOwnProperty("responseType")) + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); - if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); return writer; }; @@ -25667,9 +25667,9 @@ Status.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.code != null && message.hasOwnProperty("code")) + if (message.code != null && Object.hasOwnProperty.call(message, "code")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - if (message.message != null && message.hasOwnProperty("message")) + if (message.message != null && Object.hasOwnProperty.call(message, "message")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); if (message.details != null && message.details.length) for (var i = 0; i < message.details.length; ++i) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index d7bbdfe949dd..ddcfc075f940 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "58343cc0991725c5f9730b8d5c8486e2e6f19220" + "sha": "cda6e80da542affe1cfc77fcaffbd31ef96d6959" } }, { From c079225cb691d4167da6a421192d23b026b8704d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Apr 2020 08:03:00 -0700 Subject: [PATCH 075/223] feat: improve support for x-goog-request-params (#111) --- .../src/v1/cloud_build_client.ts | 105 +++++ .../google-devtools-cloudbuild/synth.metadata | 2 +- .../test/gapic_cloud_build_v1.ts | 428 ++++++++++++++++-- 3 files changed, 498 insertions(+), 37 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 8b467b46a210..7463062e257a 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -447,6 +447,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.getBuild(request, options, callback); } @@ -530,6 +537,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.cancelBuild(request, options, callback); } @@ -621,6 +635,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.createBuildTrigger(request, options, callback); } @@ -706,6 +727,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.getBuildTrigger(request, options, callback); } @@ -797,6 +825,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.deleteBuildTrigger(request, options, callback); } @@ -890,6 +925,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); } @@ -1410,6 +1452,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.createBuild(request, options, callback); } @@ -1529,6 +1578,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.retryBuild(request, options, callback); } @@ -1624,6 +1680,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.runBuildTrigger(request, options, callback); } @@ -1726,6 +1789,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.listBuilds(request, options, callback); } @@ -1764,6 +1834,13 @@ export class CloudBuildClient { ): Transform { request = request || {}; options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuilds.createStream( @@ -1799,6 +1876,13 @@ export class CloudBuildClient { ): AsyncIterable { request = request || {}; options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); @@ -1904,6 +1988,13 @@ export class CloudBuildClient { options = optionsOrCallback as gax.CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.listBuildTriggers(request, options, callback); } @@ -1940,6 +2031,13 @@ export class CloudBuildClient { ): Transform { request = request || {}; options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuildTriggers.createStream( @@ -1973,6 +2071,13 @@ export class CloudBuildClient { ): AsyncIterable { request = request || {}; options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index ddcfc075f940..1304cf5bf5d9 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "cda6e80da542affe1cfc77fcaffbd31ef96d6959" + "sha": "eaa52923d28e6f61c425f7d40a29a15305de9c86" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 4b2a85fb3527..fb9bdc736698 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -236,7 +236,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -259,7 +267,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -299,7 +315,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.getBuild = stubSimpleCall(undefined, expectedError); await assert.rejects(async () => { @@ -323,7 +347,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -346,7 +378,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -386,7 +426,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.cancelBuild = stubSimpleCall( undefined, @@ -413,7 +461,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -438,7 +494,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -478,7 +542,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.createBuildTrigger = stubSimpleCall( undefined, @@ -505,7 +577,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -528,7 +608,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -568,7 +656,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.getBuildTrigger = stubSimpleCall( undefined, @@ -595,7 +691,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -620,7 +724,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -660,7 +772,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.deleteBuildTrigger = stubSimpleCall( undefined, @@ -687,7 +807,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -712,7 +840,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -752,7 +888,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.updateBuildTrigger = stubSimpleCall( undefined, @@ -1229,7 +1373,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1253,7 +1405,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1300,7 +1460,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.createBuild = stubLongRunningCall( undefined, @@ -1325,7 +1493,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.createBuild = stubLongRunningCall( undefined, @@ -1354,7 +1530,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1378,7 +1562,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1425,7 +1617,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.retryBuild = stubLongRunningCall( undefined, @@ -1450,7 +1650,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.retryBuild = stubLongRunningCall( undefined, @@ -1479,7 +1687,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1505,7 +1721,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1552,7 +1776,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, @@ -1577,7 +1809,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, @@ -1606,7 +1846,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -1631,7 +1879,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -1673,7 +1929,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.listBuilds = stubSimpleCall( undefined, @@ -1698,6 +1962,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -1729,6 +1995,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuilds, request) ); + assert.strictEqual( + (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); }); it('invokes listBuildsStream with error', async () => { @@ -1740,6 +2012,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( undefined, @@ -1769,6 +2043,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuilds, request) ); + assert.strictEqual( + (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); }); it('uses async iteration with listBuilds without error', async () => { @@ -1780,6 +2060,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -1800,6 +2082,12 @@ describe('v1.CloudBuildClient', () => { ).args[1], request ); + assert.strictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); }); it('uses async iteration with listBuilds with error', async () => { @@ -1811,6 +2099,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( undefined, @@ -1829,6 +2119,12 @@ describe('v1.CloudBuildClient', () => { ).args[1], request ); + assert.strictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); }); }); @@ -1842,7 +2138,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -1873,7 +2177,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -1921,7 +2233,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const expectedOptions = {}; + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); client.innerApiCalls.listBuildTriggers = stubSimpleCall( undefined, @@ -1946,6 +2266,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -1983,6 +2305,13 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuildTriggers, request) ); + assert.strictEqual( + (client.descriptors.page.listBuildTriggers + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); }); it('invokes listBuildTriggersStream with error', async () => { @@ -1994,6 +2323,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall( undefined, @@ -2023,6 +2354,13 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuildTriggers, request) ); + assert.strictEqual( + (client.descriptors.page.listBuildTriggers + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); }); it('uses async iteration with listBuildTriggers without error', async () => { @@ -2034,6 +2372,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -2059,6 +2399,13 @@ describe('v1.CloudBuildClient', () => { .asyncIterate as SinonStub).getCall(0).args[1], request ); + assert.strictEqual( + (client.descriptors.page.listBuildTriggers + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); }); it('uses async iteration with listBuildTriggers with error', async () => { @@ -2070,6 +2417,8 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall( undefined, @@ -2087,6 +2436,13 @@ describe('v1.CloudBuildClient', () => { .asyncIterate as SinonStub).getCall(0).args[1], request ); + assert.strictEqual( + (client.descriptors.page.listBuildTriggers + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); }); }); }); From 31d1e56001383a687d7ac26fff73cac263808f42 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 23 Apr 2020 19:34:15 -0700 Subject: [PATCH 076/223] chore: update npm scripts and synth.py (#112) Update npm scripts: add clean, prelint, prefix; make sure that lint and fix are set properly. Use post-process feature of synthtool. --- packages/google-devtools-cloudbuild/package.json | 5 +++-- packages/google-devtools-cloudbuild/synth.py | 7 ++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ce6368db2a21..fd56769b1ac9 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -41,7 +41,7 @@ "scripts": { "predocs": "npm run compile", "docs": "jsdoc -c .jsdoc.js", - "lint": "gts fix", + "lint": "gts check", "clean": "gts clean", "fix": "gts fix", "compile": "tsc -p . && cp -r protos build/", @@ -53,7 +53,8 @@ "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "predocs-test": "npm run docs", "docs-test": "linkinator docs", - "prelint": "cd samples; npm link ../; npm install" + "prelint": "cd samples; npm link ../; npm install", + "precompile": "gts clean" }, "license": "Apache-2.0", "engines": { diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index 104aad4b9555..cbf95c57c668 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -15,7 +15,7 @@ import synthtool as s import synthtool.gcp as gcp -import subprocess +import synthtool.languages.node as node import logging logging.basicConfig(level=logging.DEBUG) @@ -42,7 +42,4 @@ templates = common_templates.node_library(source_location='build/src') s.copy(templates, excludes=[]) -# Node.js specific cleanup -subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'fix']) -subprocess.run(['npx', 'compileProtos', 'src']) +node.postprocess_gapic_library() From a3ea8a609f627c056715e2c6e92e3441ce2eea8e Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Tue, 5 May 2020 19:34:41 -0700 Subject: [PATCH 077/223] feat: check status of long running operation by its name (#114) For each client method returning a long running operation, a separate method to check its status is added. Added methods: `checkCreateBuildProgress`, `checkRetryBuildProgress`, `checkRunBuildTriggerProgress`. --- .../src/v1/cloud_build_client.ts | 110 +++++++++- .../google-devtools-cloudbuild/synth.metadata | 14 +- .../test/gapic_cloud_build_v1.ts | 203 ++++++++++++------ 3 files changed, 251 insertions(+), 76 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 7463062e257a..e4be7296a849 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -32,7 +32,7 @@ import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import * as gapicConfig from './cloud_build_client_config.json'; - +import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -1462,6 +1462,42 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.createBuild(request, options, callback); } + /** + * Check the status of the long running operation returned by the createBuild() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkCreateBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkCreateBuildProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createBuild, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } retryBuild( request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options?: gax.CallOptions @@ -1588,6 +1624,42 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.retryBuild(request, options, callback); } + /** + * Check the status of the long running operation returned by the retryBuild() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkRetryBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkRetryBuildProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.retryBuild, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } runBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: gax.CallOptions @@ -1690,6 +1762,42 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.runBuildTrigger(request, options, callback); } + /** + * Check the status of the long running operation returned by the runBuildTrigger() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkRunBuildTriggerProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkRunBuildTriggerProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.runBuildTrigger, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } listBuilds( request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, options?: gax.CallOptions diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 1304cf5bf5d9..f9c38ca51b64 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "eaa52923d28e6f61c425f7d40a29a15305de9c86" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", - "internalRef": "307114445" + "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", + "sha": "7b55f19b90423b4e1ab4db41707ad26b036cb935" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "19465d3ec5e5acdb01521d8f3bddd311bcbee28d" + "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" } } ], diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index fb9bdc736698..231add23db82 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -25,7 +25,7 @@ import * as cloudbuildModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation} from 'google-gax'; +import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = (instance.constructor as typeof protobuf.Message).toObject( @@ -326,9 +326,7 @@ describe('v1.CloudBuildClient', () => { }; const expectedError = new Error('expected'); client.innerApiCalls.getBuild = stubSimpleCall(undefined, expectedError); - await assert.rejects(async () => { - await client.getBuild(request); - }, expectedError); + await assert.rejects(client.getBuild(request), expectedError); assert( (client.innerApiCalls.getBuild as SinonStub) .getCall(0) @@ -440,9 +438,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.cancelBuild(request); - }, expectedError); + await assert.rejects(client.cancelBuild(request), expectedError); assert( (client.innerApiCalls.cancelBuild as SinonStub) .getCall(0) @@ -556,9 +552,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createBuildTrigger(request); - }, expectedError); + await assert.rejects(client.createBuildTrigger(request), expectedError); assert( (client.innerApiCalls.createBuildTrigger as SinonStub) .getCall(0) @@ -670,9 +664,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getBuildTrigger(request); - }, expectedError); + await assert.rejects(client.getBuildTrigger(request), expectedError); assert( (client.innerApiCalls.getBuildTrigger as SinonStub) .getCall(0) @@ -786,9 +778,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteBuildTrigger(request); - }, expectedError); + await assert.rejects(client.deleteBuildTrigger(request), expectedError); assert( (client.innerApiCalls.deleteBuildTrigger as SinonStub) .getCall(0) @@ -902,9 +892,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateBuildTrigger(request); - }, expectedError); + await assert.rejects(client.updateBuildTrigger(request), expectedError); assert( (client.innerApiCalls.updateBuildTrigger as SinonStub) .getCall(0) @@ -992,9 +980,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createWorkerPool(request); - }, expectedError); + await assert.rejects(client.createWorkerPool(request), expectedError); assert( (client.innerApiCalls.createWorkerPool as SinonStub) .getCall(0) @@ -1082,9 +1068,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.getWorkerPool(request); - }, expectedError); + await assert.rejects(client.getWorkerPool(request), expectedError); assert( (client.innerApiCalls.getWorkerPool as SinonStub) .getCall(0) @@ -1172,9 +1156,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.deleteWorkerPool(request); - }, expectedError); + await assert.rejects(client.deleteWorkerPool(request), expectedError); assert( (client.innerApiCalls.deleteWorkerPool as SinonStub) .getCall(0) @@ -1262,9 +1244,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.updateWorkerPool(request); - }, expectedError); + await assert.rejects(client.updateWorkerPool(request), expectedError); assert( (client.innerApiCalls.updateWorkerPool as SinonStub) .getCall(0) @@ -1352,9 +1332,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listWorkerPools(request); - }, expectedError); + await assert.rejects(client.listWorkerPools(request), expectedError); assert( (client.innerApiCalls.listWorkerPools as SinonStub) .getCall(0) @@ -1474,9 +1452,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.createBuild(request); - }, expectedError); + await assert.rejects(client.createBuild(request), expectedError); assert( (client.innerApiCalls.createBuild as SinonStub) .getCall(0) @@ -1509,15 +1485,51 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.createBuild(request); - await assert.rejects(async () => { - await operation.promise(); - }, expectedError); + await assert.rejects(operation.promise(), expectedError); assert( (client.innerApiCalls.createBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkCreateBuildProgress without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBuildProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateBuildProgress with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateBuildProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); }); describe('retryBuild', () => { @@ -1631,9 +1643,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.retryBuild(request); - }, expectedError); + await assert.rejects(client.retryBuild(request), expectedError); assert( (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) @@ -1666,15 +1676,51 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.retryBuild(request); - await assert.rejects(async () => { - await operation.promise(); - }, expectedError); + await assert.rejects(operation.promise(), expectedError); assert( (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkRetryBuildProgress without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRetryBuildProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRetryBuildProgress with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkRetryBuildProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); }); describe('runBuildTrigger', () => { @@ -1790,9 +1836,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.runBuildTrigger(request); - }, expectedError); + await assert.rejects(client.runBuildTrigger(request), expectedError); assert( (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) @@ -1825,15 +1869,54 @@ describe('v1.CloudBuildClient', () => { expectedError ); const [operation] = await client.runBuildTrigger(request); - await assert.rejects(async () => { - await operation.promise(); - }, expectedError); + await assert.rejects(operation.promise(), expectedError); assert( (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes checkRunBuildTriggerProgress without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRunBuildTriggerProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRunBuildTriggerProgress with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRunBuildTriggerProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); }); describe('listBuilds', () => { @@ -1943,9 +2026,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listBuilds(request); - }, expectedError); + await assert.rejects(client.listBuilds(request), expectedError); assert( (client.innerApiCalls.listBuilds as SinonStub) .getCall(0) @@ -2035,9 +2116,7 @@ describe('v1.CloudBuildClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listBuilds.createStream as SinonStub) .getCall(0) @@ -2247,9 +2326,7 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(async () => { - await client.listBuildTriggers(request); - }, expectedError); + await assert.rejects(client.listBuildTriggers(request), expectedError); assert( (client.innerApiCalls.listBuildTriggers as SinonStub) .getCall(0) @@ -2346,9 +2423,7 @@ describe('v1.CloudBuildClient', () => { reject(err); }); }); - await assert.rejects(async () => { - await promise; - }, expectedError); + await assert.rejects(promise, expectedError); assert( (client.descriptors.page.listBuildTriggers.createStream as SinonStub) .getCall(0) From 6d1d7bf3452c5b7492679ed2b52ddc7af1e85220 Mon Sep 17 00:00:00 2001 From: Summer Ji Date: Wed, 6 May 2020 00:53:22 -0700 Subject: [PATCH 078/223] fix: synth.py clean up for multiple version (#115) --- .../google-devtools-cloudbuild/src/index.ts | 6 ++++-- .../google-devtools-cloudbuild/synth.metadata | 10 +++++++++- packages/google-devtools-cloudbuild/synth.py | 19 ++++++++++--------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index 0777353632e1..ac851b099c54 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -12,12 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; + const CloudBuildClient = v1.CloudBuildClient; + export {v1, CloudBuildClient}; export default {v1, CloudBuildClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index f9c38ca51b64..58b9662daf22 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,15 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", - "sha": "7b55f19b90423b4e1ab4db41707ad26b036cb935" + "sha": "7b50a74c098e782393f92140a37e3bd26f45e77d" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "a3a0bf0f6291d69f2ff3df7fcd63d28ee20ac727", + "internalRef": "310060413" } }, { diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index cbf95c57c668..a14fc8500fe2 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -27,19 +27,20 @@ gapic = gcp.GAPICMicrogenerator() versions = ['v1'] for version in versions: - library = gapic.typescript_library( - 'cloudbuild', - generator_args={ - "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json", - "package-name": "@google-cloud/cloudbuild" - }, - proto_path='/google/devtools/cloudbuild/v1', - version=version) + library = gapic.typescript_library( + 'cloudbuild', + generator_args={ + "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json", + "package-name": "@google-cloud/cloudbuild" + }, + proto_path='/google/devtools/cloudbuild/v1', + version=version) s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates common_templates = gcp.CommonTemplates() -templates = common_templates.node_library(source_location='build/src') +templates = common_templates.node_library( + source_location='build/src', versions=versions, default_version='v1') s.copy(templates, excludes=[]) node.postprocess_gapic_library() From 6561b4a6c24ae5170dfd6792f42e92e527e358df Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 May 2020 11:24:51 -0700 Subject: [PATCH 079/223] build: do not fail builds on codecov errors (#528) (#116) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/13e8b547-7af0-436b-b85e-2c1942f8f36a/targets Source-Link: https://github.com/googleapis/synthtool/commit/be74d3e532faa47eb59f1a0eaebde0860d1d8ab4 --- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 58b9662daf22..6eeab3a4fe77 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,8 +3,8 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", - "sha": "7b50a74c098e782393f92140a37e3bd26f45e77d" + "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", + "sha": "aa7d99b9c02267808cac07f7691f5ce62f06ca14" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ab883569eb0257bbf16a6d825fd018b3adde3912" + "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" } } ], From 3b757ac2ee5cb7c374b7c99a0a6c706858b0b5c1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 9 Jun 2020 17:39:41 -0700 Subject: [PATCH 080/223] feat: move ts target to es2018 from es2016 (#121) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b55eba7-85ee-48d5-a737-8b677439db4d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/1c92077459db3dc50741e878f98b08c6261181e0 --- .../protos/protos.d.ts | 6 ++++ .../protos/protos.js | 28 +++++++++++++++++-- .../protos/protos.json | 6 +++- .../src/v1/cloud_build_client.ts | 7 +++++ .../google-devtools-cloudbuild/synth.metadata | 4 +-- .../google-devtools-cloudbuild/tsconfig.json | 2 +- 6 files changed, 46 insertions(+), 7 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 7e72a794c1f5..100f8b765b5d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -6281,6 +6281,9 @@ export namespace google { /** FieldDescriptorProto options */ options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } /** Represents a FieldDescriptorProto. */ @@ -6322,6 +6325,9 @@ export namespace google { /** 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 diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index d28ce8d0c56d..2eb62e4b1f01 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots._google_cloud_cloudbuild_1_5_0_protos || ($protobuf.roots._google_cloud_cloudbuild_1_5_0_protos = {}); + var $root = $protobuf.roots._google_cloud_cloudbuild_protos || ($protobuf.roots._google_cloud_cloudbuild_protos = {}); $root.google = (function() { @@ -16189,6 +16189,7 @@ * @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 */ /** @@ -16286,6 +16287,14 @@ */ 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 @@ -16330,6 +16339,8 @@ 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; }; @@ -16394,6 +16405,9 @@ 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; @@ -16488,6 +16502,9 @@ if (error) return "options." + error; } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; return null; }; @@ -16610,6 +16627,8 @@ 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; }; @@ -16637,6 +16656,7 @@ object.options = null; object.oneofIndex = 0; object.jsonName = ""; + object.proto3Optional = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16658,6 +16678,8 @@ 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; }; @@ -18449,7 +18471,7 @@ * @memberof google.protobuf.FileOptions * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileOptions.prototype.ccEnableArenas = true; /** * FileOptions objcClassPrefix. @@ -18898,7 +18920,7 @@ object.javaGenerateEqualsAndHash = false; object.deprecated = false; object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; + object.ccEnableArenas = true; object.objcClassPrefix = ""; object.csharpNamespace = ""; object.swiftPrefix = ""; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 3c7648f754f9..c5013b029e85 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -1632,6 +1632,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -1867,7 +1871,7 @@ "type": "bool", "id": 31, "options": { - "default": false + "default": true } }, "objcClassPrefix": { diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index e4be7296a849..e94556793173 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -107,6 +107,13 @@ export class CloudBuildClient { } opts.servicePath = opts.servicePath || servicePath; opts.port = opts.port || port; + + // users can override the config from client side, like retry codes name. + // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 + // The way to override client config for Showcase API: + // + // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} + // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; const isBrowser = typeof window !== 'undefined'; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 6eeab3a4fe77..4105e4e9b1ea 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "aa7d99b9c02267808cac07f7691f5ce62f06ca14" + "sha": "2bed454946812b16a995422f773b2406a69d1d2d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "be74d3e532faa47eb59f1a0eaebde0860d1d8ab4" + "sha": "1c92077459db3dc50741e878f98b08c6261181e0" } } ], diff --git a/packages/google-devtools-cloudbuild/tsconfig.json b/packages/google-devtools-cloudbuild/tsconfig.json index 613d35597b5a..c78f1c884ef6 100644 --- a/packages/google-devtools-cloudbuild/tsconfig.json +++ b/packages/google-devtools-cloudbuild/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2016", + "es2018", "dom" ] }, From 24d4c752bd33ff3fe1802a9b3fa75b2cb08c2556 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 11 Jun 2020 17:45:09 +0200 Subject: [PATCH 081/223] chore(deps): update dependency mocha to v8 (#122) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [mocha](https://mochajs.org/) ([source](https://togithub.com/mochajs/mocha)) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/mocha/7.2.0/8.0.1) | --- ### Release Notes
mochajs/mocha ### [`v8.0.1`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​801--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v8.0.0...v8.0.1) The obligatory patch after a major. #### :bug: Fixes - [#​4328](https://togithub.com/mochajs/mocha/issues/4328): Fix `--parallel` when combined with `--watch` ([**@​boneskull**](https://togithub.com/boneskull)) ### [`v8.0.0`](https://togithub.com/mochajs/mocha/blob/master/CHANGELOG.md#​800--2020-06-10) [Compare Source](https://togithub.com/mochajs/mocha/compare/v7.2.0...v8.0.0) In this major release, Mocha adds the ability to _run tests in parallel_. Better late than never! Please note the **breaking changes** detailed below. Let's welcome [**@​giltayar**](https://togithub.com/giltayar) and [**@​nicojs**](https://togithub.com/nicojs) to the maintenance team! #### :boom: Breaking Changes - [#​4164](https://togithub.com/mochajs/mocha/issues/4164): **Mocha v8.0.0 now requires Node.js v10.0.0 or newer.** Mocha no longer supports the Node.js v8.x line ("Carbon"), which entered End-of-Life at the end of 2019 ([**@​UlisesGascon**](https://togithub.com/UlisesGascon)) - [#​4175](https://togithub.com/mochajs/mocha/issues/4175): Having been deprecated with a warning since v7.0.0, **`mocha.opts` is no longer supported** ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND:** Replace `mocha.opts` with a [configuration file](https://mochajs.org/#configuring-mocha-nodejs). - [#​4260](https://togithub.com/mochajs/mocha/issues/4260): Remove `enableTimeout()` (`this.enableTimeout()`) from the context object ([**@​craigtaub**](https://togithub.com/craigtaub)) :sparkles: **WORKAROUND:** Replace usage of `this.enableTimeout(false)` in your tests with `this.timeout(0)`. - [#​4315](https://togithub.com/mochajs/mocha/issues/4315): The `spec` option no longer supports a comma-delimited list of files ([**@​juergba**](https://togithub.com/juergba)) :sparkles: **WORKAROUND**: Use an array instead (e.g., `"spec": "foo.js,bar.js"` becomes `"spec": ["foo.js", "bar.js"]`). - [#​4309](https://togithub.com/mochajs/mocha/issues/4309): Drop support for Node.js v13.x line, which is now End-of-Life ([**@​juergba**](https://togithub.com/juergba)) - [#​4282](https://togithub.com/mochajs/mocha/issues/4282): `--forbid-only` will throw an error even if exclusive tests are avoided via `--grep` or other means ([**@​arvidOtt**](https://togithub.com/arvidOtt)) - [#​4223](https://togithub.com/mochajs/mocha/issues/4223): The context object's `skip()` (`this.skip()`) in a "before all" (`before()`) hook will no longer execute subsequent sibling hooks, in addition to hooks in child suites ([**@​juergba**](https://togithub.com/juergba)) - [#​4178](https://togithub.com/mochajs/mocha/issues/4178): Remove previously soft-deprecated APIs ([**@​wnghdcjfe**](https://togithub.com/wnghdcjfe)): - `Mocha.prototype.ignoreLeaks()` - `Mocha.prototype.useColors()` - `Mocha.prototype.useInlineDiffs()` - `Mocha.prototype.hideDiff()` #### :tada: Enhancements - [#​4245](https://togithub.com/mochajs/mocha/issues/4245): Add ability to run tests in parallel for Node.js (see [docs](https://mochajs.org/#parallel-tests)) ([**@​boneskull**](https://togithub.com/boneskull)) :exclamation: See also [#​4244](https://togithub.com/mochajs/mocha/issues/4244); [Root Hook Plugins (docs)](https://mochajs.org/#root-hook-plugins) -- _root hooks must be defined via Root Hook Plugins to work in parallel mode_ - [#​4304](https://togithub.com/mochajs/mocha/issues/4304): `--require` now works with ES modules ([**@​JacobLey**](https://togithub.com/JacobLey)) - [#​4299](https://togithub.com/mochajs/mocha/issues/4299): In some circumstances, Mocha can run ES modules under Node.js v10 -- _use at your own risk!_ ([**@​giltayar**](https://togithub.com/giltayar)) #### :book: Documentation - [#​4246](https://togithub.com/mochajs/mocha/issues/4246): Add documentation for parallel mode and Root Hook plugins ([**@​boneskull**](https://togithub.com/boneskull)) #### :bug: Fixes (All bug fixes in Mocha v8.0.0 are also breaking changes, and are listed above)
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index fd56769b1ac9..575244af83b5 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -33,7 +33,7 @@ "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^7.0.0", + "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", "typescript": "^3.8.3" diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index aac548abfdd1..f4c1eaea6bfa 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -20,6 +20,6 @@ "devDependencies": { "c8": "^7.0.0", "chai": "^4.2.0", - "mocha": "^7.0.0" + "mocha": "^8.0.0" } } From cb475ffba91bf0b44973ba1e068d33e81975ad3b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 11 Jun 2020 09:56:51 -0700 Subject: [PATCH 082/223] chore(nodejs_templates): add script logging to node_library populate-secrets.sh (#123) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/e306327b-605f-4c07-9420-c106e40c47d5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/e7034945fbdc0e79d3c57f6e299e5c90b0f11469 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 4105e4e9b1ea..b777d51c0124 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "2bed454946812b16a995422f773b2406a69d1d2d" + "sha": "59c547744519ef9e8d073ea3ecdb81248176a71a" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1c92077459db3dc50741e878f98b08c6261181e0" + "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" } } ], From ab7c4f5d569ddd8f60cc996f762ad430f7964a53 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2020 19:08:13 +0000 Subject: [PATCH 083/223] chore: release 2.0.0 (#92) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## [2.0.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.5.0...v2.0.0) (2020-06-11) ### ⚠ BREAKING CHANGES * The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. ### Features * add time-to-live in a queue for builds ([04e3387](https://www.github.com/googleapis/nodejs-cloudbuild/commit/04e3387af33a7ab39eb0c4df47ce08026507b499)) * check status of long running operation by its name ([#114](https://www.github.com/googleapis/nodejs-cloudbuild/issues/114)) ([7b50a74](https://www.github.com/googleapis/nodejs-cloudbuild/commit/7b50a74c098e782393f92140a37e3bd26f45e77d)) * drop node8 support, support for async iterators ([#91](https://www.github.com/googleapis/nodejs-cloudbuild/issues/91)) ([74a195d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/74a195d5cdf63dab1ac3d0d52ef42e1254ab3a2e)) * improve support for x-goog-request-params ([#111](https://www.github.com/googleapis/nodejs-cloudbuild/issues/111)) ([e08d640](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e08d64017e059c911ebe55055c26a0ab76481d86)) * move ts target to es2018 from es2016 ([#121](https://www.github.com/googleapis/nodejs-cloudbuild/issues/121)) ([59c5477](https://www.github.com/googleapis/nodejs-cloudbuild/commit/59c547744519ef9e8d073ea3ecdb81248176a71a)) ### Bug Fixes * remove eslint, update gax, fix generated protos, run the generator ([#100](https://www.github.com/googleapis/nodejs-cloudbuild/issues/100)) ([aafb9cc](https://www.github.com/googleapis/nodejs-cloudbuild/commit/aafb9cc7745b4d5d6dce58f17763f76379af733f)) * synth.py clean up for multiple version ([#115](https://www.github.com/googleapis/nodejs-cloudbuild/issues/115)) ([aa7d99b](https://www.github.com/googleapis/nodejs-cloudbuild/commit/aa7d99b9c02267808cac07f7691f5ce62f06ca14)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- .../google-devtools-cloudbuild/CHANGELOG.md | 21 +++++++++++++++++++ .../google-devtools-cloudbuild/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index fb9aece6c7cb..fc690f9cb830 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## [2.0.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.5.0...v2.0.0) (2020-06-11) + + +### ⚠ BREAKING CHANGES + +* The library now supports Node.js v10+. The last version to support Node.js v8 is tagged legacy-8 on NPM. + +### Features + +* add time-to-live in a queue for builds ([04e3387](https://www.github.com/googleapis/nodejs-cloudbuild/commit/04e3387af33a7ab39eb0c4df47ce08026507b499)) +* check status of long running operation by its name ([#114](https://www.github.com/googleapis/nodejs-cloudbuild/issues/114)) ([7b50a74](https://www.github.com/googleapis/nodejs-cloudbuild/commit/7b50a74c098e782393f92140a37e3bd26f45e77d)) +* drop node8 support, support for async iterators ([#91](https://www.github.com/googleapis/nodejs-cloudbuild/issues/91)) ([74a195d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/74a195d5cdf63dab1ac3d0d52ef42e1254ab3a2e)) +* improve support for x-goog-request-params ([#111](https://www.github.com/googleapis/nodejs-cloudbuild/issues/111)) ([e08d640](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e08d64017e059c911ebe55055c26a0ab76481d86)) +* move ts target to es2018 from es2016 ([#121](https://www.github.com/googleapis/nodejs-cloudbuild/issues/121)) ([59c5477](https://www.github.com/googleapis/nodejs-cloudbuild/commit/59c547744519ef9e8d073ea3ecdb81248176a71a)) + + +### Bug Fixes + +* remove eslint, update gax, fix generated protos, run the generator ([#100](https://www.github.com/googleapis/nodejs-cloudbuild/issues/100)) ([aafb9cc](https://www.github.com/googleapis/nodejs-cloudbuild/commit/aafb9cc7745b4d5d6dce58f17763f76379af733f)) +* synth.py clean up for multiple version ([#115](https://www.github.com/googleapis/nodejs-cloudbuild/issues/115)) ([aa7d99b](https://www.github.com/googleapis/nodejs-cloudbuild/commit/aa7d99b9c02267808cac07f7691f5ce62f06ca14)) + ## [1.5.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.4.0...v1.5.0) (2020-03-09) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 575244af83b5..17d75692aab1 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "1.5.0", + "version": "2.0.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index f4c1eaea6bfa..c3b97fe8ada3 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^1.5.0" + "@google-cloud/cloudbuild": "^2.0.0" }, "devDependencies": { "c8": "^7.0.0", From 1c5454b1a91f966a5a5848aefd913d7d42f9e17c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 07:55:31 -0700 Subject: [PATCH 084/223] fix: support fallback mode for electron (#124) --- .../src/v1/cloud_build_client.ts | 13 +++++-------- packages/google-devtools-cloudbuild/synth.metadata | 2 +- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index e94556793173..0ac693ac771b 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -116,14 +116,11 @@ export class CloudBuildClient { // const showcaseClient = new showcaseClient({ projectId, customConfig }); opts.clientConfig = opts.clientConfig || {}; - const isBrowser = typeof window !== 'undefined'; - if (isBrowser) { - opts.fallback = true; - } - // If we are in browser, we are already using fallback because of the - // "browser" field in package.json. - // But if we were explicitly requested to use fallback, let's do it now. - this._gaxModule = !isBrowser && opts.fallback ? gax.fallback : gax; + // If we're running in browser, it's OK to omit `fallback` since + // google-gax has `browser` field in its `package.json`. + // For Electron (which does not respect `browser` field), + // pass `{fallback: true}` to the CloudBuildClient constructor. + this._gaxModule = opts.fallback ? gax.fallback : gax; // Create a `gaxGrpc` object, with any grpc-specific options // sent to the client. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index b777d51c0124..f2375c8e53ae 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "59c547744519ef9e8d073ea3ecdb81248176a71a" + "sha": "f52fdfeb4f72ceb8f74f1da10e986cbc8f0bb593" } }, { From 6863773cf5c4b0836fa5cb3fd55f54e9fa77cab1 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 18 Jun 2020 08:28:43 -0700 Subject: [PATCH 085/223] chore: update issue template (#125) --- packages/google-devtools-cloudbuild/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index f2375c8e53ae..5e418877da9d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "e7034945fbdc0e79d3c57f6e299e5c90b0f11469" + "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" } } ], From f62412327ee79194b9344b28d6f07fcc26b27e3f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 27 Jun 2020 17:48:01 -0700 Subject: [PATCH 086/223] build: add config .gitattributes (#129) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2a81bca4-7abd-4108-ac1f-21340f858709/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/dc9caca650c77b7039e2bbc3339ffb34ae78e5b7 --- packages/google-devtools-cloudbuild/.gitattributes | 3 +++ packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.gitattributes diff --git a/packages/google-devtools-cloudbuild/.gitattributes b/packages/google-devtools-cloudbuild/.gitattributes new file mode 100644 index 000000000000..2e63216ae9cb --- /dev/null +++ b/packages/google-devtools-cloudbuild/.gitattributes @@ -0,0 +1,3 @@ +*.ts text eol=lf +*.js test eol=lf +protos/* linguist-generated diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 5e418877da9d..0d840bee299b 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "f52fdfeb4f72ceb8f74f1da10e986cbc8f0bb593" + "sha": "c81038676ba297bae0e40d6a7041ed7c2300d430" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "b10590a4a1568548dd13cfcea9aa11d40898144b" + "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" } } ], From 4e59014947a117954c35b41649910ff86eb43552 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 30 Jun 2020 21:18:04 -0700 Subject: [PATCH 087/223] chore: set Ruby namespace in proto options (#128) PiperOrigin-RevId: 317660600 Source-Author: Google APIs Source-Date: Mon Jun 22 08:38:39 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 6d05c93a2c37c67d8dc0b72b636c4b162d0dd7cd Source-Link: https://github.com/googleapis/googleapis/commit/6d05c93a2c37c67d8dc0b72b636c4b162d0dd7cd Co-authored-by: Justin Beckwith --- .../protos/google/devtools/cloudbuild/v1/cloudbuild.proto | 1 + packages/google-devtools-cloudbuild/protos/protos.json | 3 ++- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index aedf054780eb..40692c3e8f62 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -28,6 +28,7 @@ option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; +option ruby_package = "Google::Cloud::Build::V1"; // Creates and manages builds on Google Cloud Platform. // diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index c5013b029e85..e992dfa659b5 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -11,7 +11,8 @@ "go_package": "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild", "java_multiple_files": true, "java_package": "com.google.cloudbuild.v1", - "objc_class_prefix": "GCB" + "objc_class_prefix": "GCB", + "ruby_package": "Google::Cloud::Build::V1" }, "nested": { "CloudBuild": { diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0d840bee299b..c206bf7a3394 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "a3a0bf0f6291d69f2ff3df7fcd63d28ee20ac727", - "internalRef": "310060413" + "sha": "6d05c93a2c37c67d8dc0b72b636c4b162d0dd7cd", + "internalRef": "317660600" } }, { From d2a2c8cb9f54a447a08bfacd5ef8ef8b3245add3 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 6 Jul 2020 10:17:53 -0700 Subject: [PATCH 088/223] build: use bazel build (#130) --- .../google-devtools-cloudbuild/synth.metadata | 20 ++++++------------- packages/google-devtools-cloudbuild/synth.py | 11 ++-------- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index c206bf7a3394..501ece2122db 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "c81038676ba297bae0e40d6a7041ed7c2300d430" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6d05c93a2c37c67d8dc0b72b636c4b162d0dd7cd", - "internalRef": "317660600" + "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", + "sha": "ef3680b64b18fc78093d4c35b0c4bbdc767b414c" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "dc9caca650c77b7039e2bbc3339ffb34ae78e5b7" + "sha": "303271797a360f8a439203413f13a160f2f5b3b4" } } ], @@ -27,10 +19,10 @@ { "client": { "source": "googleapis", - "apiName": "cloudbuild", + "apiName": "devtools-cloudbuild", "apiVersion": "v1", - "language": "typescript", - "generator": "gapic-generator-typescript" + "language": "nodejs", + "generator": "bazel" } } ] diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py index a14fc8500fe2..b4f7d22564c6 100644 --- a/packages/google-devtools-cloudbuild/synth.py +++ b/packages/google-devtools-cloudbuild/synth.py @@ -24,17 +24,10 @@ # run the gapic generator -gapic = gcp.GAPICMicrogenerator() +gapic = gcp.GAPICBazel() versions = ['v1'] for version in versions: - library = gapic.typescript_library( - 'cloudbuild', - generator_args={ - "grpc-service-config": "google/devtools/cloudbuild/v1/cloudbuild_grpc_service_config.json", - "package-name": "@google-cloud/cloudbuild" - }, - proto_path='/google/devtools/cloudbuild/v1', - version=version) + library = gapic.node_library('devtools-cloudbuild', version, proto_path='google/devtools/cloudbuild/v1') s.copy(library, excludes=['README.md', 'package.json']) # Copy common templates From 06745cae6d38be4a16da192e3b9adc05ce08d020 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 7 Jul 2020 13:19:41 -0700 Subject: [PATCH 089/223] chore: release 2.0.1 (#126) * updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index fc690f9cb830..12fa1c5d1ac8 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.0...v2.0.1) (2020-07-06) + + +### Bug Fixes + +* support fallback mode for electron ([#124](https://www.github.com/googleapis/nodejs-cloudbuild/issues/124)) ([d2c9f9b](https://www.github.com/googleapis/nodejs-cloudbuild/commit/d2c9f9b69463f9739b1813c673ba53ee97c9a3d5)) + ## [2.0.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v1.5.0...v2.0.0) (2020-06-11) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 17d75692aab1..18084bf36811 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.0", + "version": "2.0.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index c3b97fe8ada3..388287958e31 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.0" + "@google-cloud/cloudbuild": "^2.0.1" }, "devDependencies": { "c8": "^7.0.0", From b28c583a653950cfd3373f3ee45e3326456a9a6b Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 9 Jul 2020 05:42:07 -0700 Subject: [PATCH 090/223] fix: typeo in nodejs .gitattribute (#132) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cc99acfa-05b8-434b-9500-2f6faf2eaa02/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b --- packages/google-devtools-cloudbuild/.gitattributes | 2 +- packages/google-devtools-cloudbuild/synth.metadata | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.gitattributes b/packages/google-devtools-cloudbuild/.gitattributes index 2e63216ae9cb..d4f4169b28bf 100644 --- a/packages/google-devtools-cloudbuild/.gitattributes +++ b/packages/google-devtools-cloudbuild/.gitattributes @@ -1,3 +1,3 @@ *.ts text eol=lf -*.js test eol=lf +*.js text eol=lf protos/* linguist-generated diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 501ece2122db..0b7844675f77 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,15 +3,23 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", - "sha": "ef3680b64b18fc78093d4c35b0c4bbdc767b414c" + "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", + "sha": "dd85ba7821b41c0f189bbd634f00f34c9e52cff3" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", + "internalRef": "320300472" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "303271797a360f8a439203413f13a160f2f5b3b4" + "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" } } ], From 709d09107e3437c8d1e7c8ad57bce0708e1c8242 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2020 01:13:56 +0000 Subject: [PATCH 091/223] chore: release 2.0.2 (#133) :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.1...v2.0.2) (2020-07-09) ### Bug Fixes * typeo in nodejs .gitattribute ([#132](https://www.github.com/googleapis/nodejs-cloudbuild/issues/132)) ([80b5bd9](https://www.github.com/googleapis/nodejs-cloudbuild/commit/80b5bd963aa43e5a47da9e6d0e2ffbf0cde7feef)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 12fa1c5d1ac8..73d3515f3c49 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.1...v2.0.2) (2020-07-09) + + +### Bug Fixes + +* typeo in nodejs .gitattribute ([#132](https://www.github.com/googleapis/nodejs-cloudbuild/issues/132)) ([80b5bd9](https://www.github.com/googleapis/nodejs-cloudbuild/commit/80b5bd963aa43e5a47da9e6d0e2ffbf0cde7feef)) + ### [2.0.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.0...v2.0.1) (2020-07-06) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 18084bf36811..dd907534f5d4 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.1", + "version": "2.0.2", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 388287958e31..e50a4531de85 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.1" + "@google-cloud/cloudbuild": "^2.0.2" }, "devDependencies": { "c8": "^7.0.0", From 1289477d88bdd6240d9097553f1ee8f54549a282 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 12 Jul 2020 18:46:43 +0200 Subject: [PATCH 092/223] chore(deps): update dependency @types/mocha to v8 (#134) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | devDependencies | major | [`^7.0.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/7.0.2/8.0.0) | --- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index dd907534f5d4..37f5bd68a2f9 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -24,7 +24,7 @@ "Cloud Build API" ], "devDependencies": { - "@types/mocha": "^7.0.0", + "@types/mocha": "^8.0.0", "@types/sinon": "^9.0.0", "c8": "^7.0.0", "chai": "^4.2.0", From 79ebbc318141e1d9156b4df6fc7de0d7d36edf83 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 17:41:02 -0700 Subject: [PATCH 093/223] chore: update generated protos.js (#136) --- .../protos/protos.js | 142 ++++++++++++++---- .../google-devtools-cloudbuild/synth.metadata | 2 +- 2 files changed, 114 insertions(+), 30 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 2eb62e4b1f01..8cf7e703c6c7 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1503,7 +1503,7 @@ RepoSource.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RepoSource(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.RepoSource(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -1529,12 +1529,26 @@ message.invertRegex = reader.bool(); break; case 9: - reader.skip().pos++; if (message.substitutions === $util.emptyObject) message.substitutions = {}; - key = reader.string(); - reader.pos++; - message.substitutions[key] = reader.string(); + 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.substitutions[key] = value; break; default: reader.skipType(tag & 7); @@ -3961,7 +3975,7 @@ Build.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -4027,12 +4041,26 @@ message.logUrl = reader.string(); break; case 29: - reader.skip().pos++; if (message.substitutions === $util.emptyObject) message.substitutions = {}; - key = reader.string(); - reader.pos++; - message.substitutions[key] = reader.string(); + 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.substitutions[key] = value; break; case 31: if (!(message.tags && message.tags.length)) @@ -4045,12 +4073,26 @@ message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); break; case 33: - reader.skip().pos++; if (message.timing === $util.emptyObject) message.timing = {}; - key = reader.string(); - reader.pos++; - message.timing[key] = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.timing[key] = value; break; default: reader.skipType(tag & 7); @@ -5552,7 +5594,7 @@ SourceProvenance.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.SourceProvenance(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.SourceProvenance(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5563,12 +5605,26 @@ message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); break; case 4: - reader.skip().pos++; if (message.fileHashes === $util.emptyObject) message.fileHashes = {}; - key = reader.string(); - reader.pos++; - message.fileHashes[key] = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fileHashes[key] = value; break; default: reader.skipType(tag & 7); @@ -6271,7 +6327,7 @@ Secret.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secret(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secret(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -6279,12 +6335,26 @@ message.kmsKeyName = reader.string(); break; case 3: - reader.skip().pos++; if (message.secretEnv === $util.emptyObject) message.secretEnv = {}; - key = reader.string(); - reader.pos++; - message.secretEnv[key] = reader.bytes(); + 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.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.secretEnv[key] = value; break; default: reader.skipType(tag & 7); @@ -7766,7 +7836,7 @@ BuildTrigger.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(), key; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7803,12 +7873,26 @@ message.disabled = reader.bool(); break; case 11: - reader.skip().pos++; if (message.substitutions === $util.emptyObject) message.substitutions = {}; - key = reader.string(); - reader.pos++; - message.substitutions[key] = reader.string(); + 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.substitutions[key] = value; break; case 15: if (!(message.ignoredFiles && message.ignoredFiles.length)) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0b7844675f77..14af22d13606 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "dd85ba7821b41c0f189bbd634f00f34c9e52cff3" + "sha": "150639108e6ea068506bd0e4f97dc744403ac66f" } }, { From e4e6014de270acb7c1be81aa4b1ed961c37db91f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 14 Jul 2020 17:46:05 -0700 Subject: [PATCH 094/223] build: missing closing paren in publish script (#137) --- packages/google-devtools-cloudbuild/synth.metadata | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 14af22d13606..1986a157ddc7 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "799d8e6522c1ef7cb55a70d9ea0b15e045c3d00b" + "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" } } ], From 24cff870dc324fe60bef8fda94f54a60a00b7e81 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 15:34:53 -0700 Subject: [PATCH 095/223] =?UTF-8?q?fix:=20add=20missing=20cloudbuild=20RPC?= =?UTF-8?q?s=20to=20retry=20config,=20add=20Node=208=20tests=C2=A0=20(#141?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix: add missing cloudbuild RPCs to retry config PiperOrigin-RevId: 321573910 Source-Author: Google APIs Source-Date: Thu Jul 16 08:45:55 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 17edd4b49024f85db4d543e34f541404b8a5fbaf Source-Link: https://github.com/googleapis/googleapis/commit/17edd4b49024f85db4d543e34f541404b8a5fbaf --- .../src/v1/cloud_build_client_config.json | 9 +++++++-- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json index 8d0e7c251ac6..d52bbfa9a07b 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -76,23 +76,28 @@ "retry_params_name": "default" }, "CreateWorkerPool": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "GetWorkerPool": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 600000, + "retry_codes_name": "idempotent", "retry_params_name": "default" }, "DeleteWorkerPool": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "UpdateWorkerPool": { + "timeout_millis": 600000, "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, "ListWorkerPools": { - "retry_codes_name": "non_idempotent", + "timeout_millis": 600000, + "retry_codes_name": "idempotent", "retry_params_name": "default" } } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 1986a157ddc7..d3fc34a1b6f3 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "150639108e6ea068506bd0e4f97dc744403ac66f" + "sha": "f2cc63e01175b49b91d32a22aab1d66896f4159b" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4f4aa3a03e470f1390758b9d89eb1aa88837a5be", - "internalRef": "320300472" + "sha": "17edd4b49024f85db4d543e34f541404b8a5fbaf", + "internalRef": "321573910" } }, { From b630571fb35947da20ad40a242c7c5e3c4f6df28 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 17 Jul 2020 16:06:09 -0700 Subject: [PATCH 096/223] chore: add config files for cloud-rad for node.js, delete Node 8 templates (#142) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5e903fff-57bb-4395-bb94-8b4d1909dbf6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/21f1470ecd01424dc91c70f1a7c798e4e87d1eec Source-Link: https://github.com/googleapis/synthtool/commit/388e10f5ae302d3e8de1fac99f3a95d1ab8f824a --- .../api-extractor.json | 369 ++++++++++++++++++ .../google-devtools-cloudbuild/synth.metadata | 2 +- 2 files changed, 370 insertions(+), 1 deletion(-) create mode 100644 packages/google-devtools-cloudbuild/api-extractor.json diff --git a/packages/google-devtools-cloudbuild/api-extractor.json b/packages/google-devtools-cloudbuild/api-extractor.json new file mode 100644 index 000000000000..de228294b237 --- /dev/null +++ b/packages/google-devtools-cloudbuild/api-extractor.json @@ -0,0 +1,369 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/protos/protos.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we can specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + */ + "bundledPackages": [ ], + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true, + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/etc/" + */ + // "reportFolder": "/etc/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/" + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true, + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true, + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning", + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + }, + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + }, + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning", + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } + +} diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index d3fc34a1b6f3..98e18f5249f5 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "d82deccf657a66e31bd5da9efdb96c6fa322fc7e" + "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" } } ], From 1d2c60504bb55fbdcc84633675295cb5c700c184 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Tue, 21 Jul 2020 14:44:44 -0400 Subject: [PATCH 097/223] chore: add dev dependencies for cloud-rad ref docs (#144) --- packages/google-devtools-cloudbuild/package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 37f5bd68a2f9..57a788bf8ed0 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -36,7 +36,9 @@ "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^9.0.1", - "typescript": "^3.8.3" + "typescript": "^3.8.3", + "@microsoft/api-documenter": "^7.8.10", + "@microsoft/api-extractor": "^7.8.10" }, "scripts": { "predocs": "npm run compile", @@ -54,7 +56,9 @@ "predocs-test": "npm run docs", "docs-test": "linkinator docs", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "precompile": "gts clean", + "api-extractor": "api-extractor run --local", + "api-documenter": "api-documenter yaml --input-folder=temp" }, "license": "Apache-2.0", "engines": { From c64c5f75aaabd8060c214a3f383ff4eb580555af Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 22 Jul 2020 17:24:17 -0700 Subject: [PATCH 098/223] build: rename _toc to toc (#145) Source-Author: F. Hinkelmann Source-Date: Tue Jul 21 10:53:20 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 99c93fe09f8c1dca09dfc0301c8668e3a70dd796 Source-Link: https://github.com/googleapis/synthtool/commit/99c93fe09f8c1dca09dfc0301c8668e3a70dd796 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 98e18f5249f5..df8a7d414741 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "f2cc63e01175b49b91d32a22aab1d66896f4159b" + "sha": "bbc37b6f47b959e62a1982bb62523e351979de2e" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "21f1470ecd01424dc91c70f1a7c798e4e87d1eec" + "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" } } ], From f625e2f5b1e47402ede736fb5f39b0d9ddc2040a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 10:48:26 -0700 Subject: [PATCH 099/223] fix: inline markup spans must be separated from the surrounding text by non-word characters (#146) PiperOrigin-RevId: 322464556 Source-Author: Google APIs Source-Date: Tue Jul 21 16:17:21 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 58be915cf3b7148b764649da90add697f6367aa7 Source-Link: https://github.com/googleapis/googleapis/commit/58be915cf3b7148b764649da90add697f6367aa7 Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../protos/google/devtools/cloudbuild/v1/cloudbuild.proto | 4 ++-- .../google-devtools-cloudbuild/src/v1/cloud_build_client.ts | 2 +- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 40692c3e8f62..1f06623fc0b8 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -219,7 +219,7 @@ service CloudBuild { // This API is experimental. rpc UpdateWorkerPool(UpdateWorkerPoolRequest) returns (WorkerPool) {} - // List project's `WorkerPool`s. + // List project's `WorkerPools`. // // This API is experimental. rpc ListWorkerPools(ListWorkerPoolsRequest) @@ -1328,7 +1328,7 @@ message UpdateWorkerPoolRequest { WorkerPool worker_pool = 3; } -// Request to list `WorkerPool`s. +// Request to list `WorkerPools`. message ListWorkerPoolsRequest { // ID of the parent project. string parent = 1; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 0ac693ac771b..762212dc7e1d 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1310,7 +1310,7 @@ export class CloudBuildClient { > ): void; /** - * List project's `WorkerPool`s. + * List project's `WorkerPools`. * * This API is experimental. * diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index df8a7d414741..a5160b0fe54a 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -11,8 +11,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "17edd4b49024f85db4d543e34f541404b8a5fbaf", - "internalRef": "321573910" + "sha": "58be915cf3b7148b764649da90add697f6367aa7", + "internalRef": "322464556" } }, { From 647ce138c3547f63ccd5caee6b608bfc5716e996 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 23 Jul 2020 20:06:20 -0700 Subject: [PATCH 100/223] chore: move gitattributes files to node templates (#147) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/d43b90cc-a087-4c57-864c-1e4f93292dc6/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3 --- packages/google-devtools-cloudbuild/.gitattributes | 1 + packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.gitattributes b/packages/google-devtools-cloudbuild/.gitattributes index d4f4169b28bf..33739cb74e44 100644 --- a/packages/google-devtools-cloudbuild/.gitattributes +++ b/packages/google-devtools-cloudbuild/.gitattributes @@ -1,3 +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-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index a5160b0fe54a..386d134ee090 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "bbc37b6f47b959e62a1982bb62523e351979de2e" + "sha": "52b4770f0c262ce91306e31d68f3b47b0598751d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "99c93fe09f8c1dca09dfc0301c8668e3a70dd796" + "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" } } ], From 111be4fb4ee4f200d4a6c5cb75614ad94dd36937 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2020 09:48:16 -0700 Subject: [PATCH 101/223] chore: release 2.0.3 (#143) * chore: updated samples/package.json [ci skip] * chore: updated CHANGELOG.md [ci skip] * chore: updated package.json Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 8 ++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 73d3515f3c49..25a9624cdd61 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.0.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.2...v2.0.3) (2020-07-24) + + +### Bug Fixes + +* add missing cloudbuild RPCs to retry config, add Node 8 tests  ([#141](https://www.github.com/googleapis/nodejs-cloudbuild/issues/141)) ([e4b83e8](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e4b83e8a63f6ddba2ea158ab0ed9b4a50fa536bf)) +* inline markup spans must be separated from the surrounding text by non-word characters ([#146](https://www.github.com/googleapis/nodejs-cloudbuild/issues/146)) ([52b4770](https://www.github.com/googleapis/nodejs-cloudbuild/commit/52b4770f0c262ce91306e31d68f3b47b0598751d)) + ### [2.0.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.1...v2.0.2) (2020-07-09) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 57a788bf8ed0..f4df9e905668 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.2", + "version": "2.0.3", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index e50a4531de85..bdb44f05cd08 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.2" + "@google-cloud/cloudbuild": "^2.0.3" }, "devDependencies": { "c8": "^7.0.0", From 8ea25e62839e26c51c0ba848f6cd3f69b79130f8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 29 Jul 2020 17:06:35 -0700 Subject: [PATCH 102/223] chore(node): fix kokoro build path for cloud-rad (#148) Source-Author: F. Hinkelmann Source-Date: Wed Jul 29 00:28:42 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa Source-Link: https://github.com/googleapis/synthtool/commit/89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 386d134ee090..bd070ce3f915 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "52b4770f0c262ce91306e31d68f3b47b0598751d" + "sha": "192cd16ce3a788a7027b1716399289c6d1b4b0cb" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "3a00b7fea8c4c83eaff8eb207f530a2e3e8e1de3" + "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" } } ], From dca6253d24ac126a1522ad94e356aa6ff6f1fcb7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 30 Jul 2020 19:42:02 -0700 Subject: [PATCH 103/223] build: update protos --- packages/google-devtools-cloudbuild/protos/protos.d.ts | 2 +- packages/google-devtools-cloudbuild/protos/protos.js | 2 +- packages/google-devtools-cloudbuild/synth.metadata | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 100f8b765b5d..d1471e6b6167 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import * as Long from "long"; -import * as $protobuf from "protobufjs"; +import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 8cf7e703c6c7..d8ef4575392d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); + module.exports = factory(require("google-gax").protobufMinimal); })(this, function($protobuf) { "use strict"; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index bd070ce3f915..cf35e1756547 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "192cd16ce3a788a7027b1716399289c6d1b4b0cb" + "sha": "17227497a124ba2a43ba830835fe6841a1ff8252" } }, { From e10d0847d34ac60544ab3c7760e4a517963e38ba Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 31 Jul 2020 09:24:10 -0700 Subject: [PATCH 104/223] docs: add links to the CHANGELOG from the README.md for Java and Node (#150) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7b446397-88f3-4463-9e7d-d2ce7069989d/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5936421202fb53ed4641bcb824017dd393a3dbcc --- packages/google-devtools-cloudbuild/README.md | 3 +++ packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 0bebac774987..d24a8a5b3f24 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -14,6 +14,9 @@ Cloud Build API client for Node.js +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-cloudbuild/blob/master/CHANGELOG.md). + * [Cloud Build Node.js Client API Reference][client-docs] * [Cloud Build Documentation][product-docs] * [github.com/googleapis/nodejs-cloudbuild](https://github.com/googleapis/nodejs-cloudbuild) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index cf35e1756547..3c5e211ee59c 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "17227497a124ba2a43ba830835fe6841a1ff8252" + "sha": "cfd251012b6533d0f9d7b4995c41360cbd1482b1" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89d431fb2975fc4e0ed24995a6e6dfc8ff4c24fa" + "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" } } ], From 72d6017c34fb16a8f4db3975d0cad79e15ab023a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 1 Aug 2020 09:08:41 -0700 Subject: [PATCH 105/223] docs: update worker pool path comment (#151) PiperOrigin-RevId: 324209019 Source-Author: Google APIs Source-Date: Fri Jul 31 08:04:53 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: fbf9396664b766a08d92da9d4f31be019a847c39 Source-Link: https://github.com/googleapis/googleapis/commit/fbf9396664b766a08d92da9d4f31be019a847c39 --- .../protos/google/devtools/cloudbuild/v1/cloudbuild.proto | 2 +- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 1f06623fc0b8..4e3a0188db85 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1124,7 +1124,7 @@ message BuildOptions { LogStreamingOption log_streaming_option = 5; // Option to specify a `WorkerPool` for the build. - // Format: projects/{project}/workerPools/{workerPool} + // Format: projects/{project}/locations/{location}/workerPools/{workerPool} // // This field is experimental. string worker_pool = 7; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 3c5e211ee59c..0afe740aa630 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "cfd251012b6533d0f9d7b4995c41360cbd1482b1" + "sha": "ca44b34593cc63008d38c12bf296d579ef1f36d6" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "58be915cf3b7148b764649da90add697f6367aa7", - "internalRef": "322464556" + "sha": "fbf9396664b766a08d92da9d4f31be019a847c39", + "internalRef": "324209019" } }, { From 4e3236572ebdefbb85e4c03175285178f9eff49d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 8 Aug 2020 11:36:33 -0700 Subject: [PATCH 106/223] build: --credential-file-override is no longer required (#154) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4de22315-84b1-493d-8da2-dfa7688128f5/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/94421c47802f56a44c320257b2b4c190dc7d6b68 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0afe740aa630..de9c5b8e3e13 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "ca44b34593cc63008d38c12bf296d579ef1f36d6" + "sha": "f36b9fe32cdf06efb2c9f5149fde5f9c4755f3ed" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5936421202fb53ed4641bcb824017dd393a3dbcc" + "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" } } ], From dd3da441050db907ab210a390c0f6a2549d16916 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 11 Aug 2020 11:24:18 -0700 Subject: [PATCH 107/223] build: use gapic-generator-typescript v1.0.7. (#155) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5f7f9c6d-c75a-4c60-8bb8-0026a14cead7/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 325949033 Source-Link: https://github.com/googleapis/googleapis/commit/94006b3cb8d2fb44703cf535da15608eed6bf7db --- .../src/v1/cloud_build_client.ts | 8 +++++--- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 762212dc7e1d..e0f85a5e7dba 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -310,12 +310,14 @@ export class CloudBuildClient { } ); + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - this.descriptors.page[methodName] || - this.descriptors.stream[methodName] || - this.descriptors.longrunning[methodName] + descriptor ); this.innerApiCalls[methodName] = apiCall; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index de9c5b8e3e13..bff0ccf84574 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "f36b9fe32cdf06efb2c9f5149fde5f9c4755f3ed" + "sha": "808ac4633ca8bc66a5b90a8c477dea8e2e7b4b1a" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "fbf9396664b766a08d92da9d4f31be019a847c39", - "internalRef": "324209019" + "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", + "internalRef": "325949033" } }, { From 0f036f57199804b2669f6c26d8bbd7ab71d42982 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 12 Aug 2020 09:36:18 -0700 Subject: [PATCH 108/223] chore: update cloud rad kokoro build job (#156) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b742586e-df31-4aac-8092-78288e9ea8e7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/bd0deaa1113b588d70449535ab9cbf0f2bd0e72f --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index bff0ccf84574..fc16f6909285 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "808ac4633ca8bc66a5b90a8c477dea8e2e7b4b1a" + "sha": "091b9acd64b969529f078663d6b7753c5cb28a2d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "94421c47802f56a44c320257b2b4c190dc7d6b68" + "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" } } ], From a0887575c1a5dd03a17897c3733275f92c42ae53 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 13 Aug 2020 09:14:27 -0700 Subject: [PATCH 109/223] build: perform publish using Node 12 (#157) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/c36c6dbc-ab79-4f17-b70b-523b420b2a70/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5747555f7620113d9a2078a48f4c047a99d31b3e --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index fc16f6909285..133afc4d431d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "091b9acd64b969529f078663d6b7753c5cb28a2d" + "sha": "f63970c9204dcfbaf1f03a3da3db8b4dd686f9da" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "bd0deaa1113b588d70449535ab9cbf0f2bd0e72f" + "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" } } ], From 6e95bd059e87626832cd8eeee18c7e0b0fa080d3 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 19 Aug 2020 09:42:30 -0700 Subject: [PATCH 110/223] chore: start tracking obsolete files (#158) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7a1b0b96-8ddb-4836-a1a2-d2f73b7e6ffe/targets - [ ] To automatically regenerate this PR, check this box. --- .../google-devtools-cloudbuild/synth.metadata | 80 ++++++++++++++++++- 1 file changed, 76 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 133afc4d431d..42ddd12fdc80 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,22 +4,22 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "f63970c9204dcfbaf1f03a3da3db8b4dd686f9da" + "sha": "987ed341a211c7798dce046dedca5dbd36e17bcd" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "94006b3cb8d2fb44703cf535da15608eed6bf7db", - "internalRef": "325949033" + "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", + "internalRef": "327369997" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5747555f7620113d9a2078a48f4c047a99d31b3e" + "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" } } ], @@ -33,5 +33,77 @@ "generator": "bazel" } } + ], + "generatedFiles": [ + ".eslintignore", + ".eslintrc.json", + ".gitattributes", + ".github/ISSUE_TEMPLATE/bug_report.md", + ".github/ISSUE_TEMPLATE/feature_request.md", + ".github/ISSUE_TEMPLATE/support_request.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/publish.yml", + ".github/release-please.yml", + ".github/workflows/ci.yaml", + ".gitignore", + ".jsdoc.js", + ".kokoro/.gitattributes", + ".kokoro/common.cfg", + ".kokoro/continuous/node10/common.cfg", + ".kokoro/continuous/node10/docs.cfg", + ".kokoro/continuous/node10/lint.cfg", + ".kokoro/continuous/node10/samples-test.cfg", + ".kokoro/continuous/node10/system-test.cfg", + ".kokoro/continuous/node10/test.cfg", + ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/test.cfg", + ".kokoro/docs.sh", + ".kokoro/lint.sh", + ".kokoro/populate-secrets.sh", + ".kokoro/presubmit/node10/common.cfg", + ".kokoro/presubmit/node10/samples-test.cfg", + ".kokoro/presubmit/node10/system-test.cfg", + ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/test.cfg", + ".kokoro/publish.sh", + ".kokoro/release/docs-devsite.cfg", + ".kokoro/release/docs-devsite.sh", + ".kokoro/release/docs.cfg", + ".kokoro/release/docs.sh", + ".kokoro/release/publish.cfg", + ".kokoro/samples-test.sh", + ".kokoro/system-test.sh", + ".kokoro/test.bat", + ".kokoro/test.sh", + ".kokoro/trampoline.sh", + ".mocharc.js", + ".nycrc", + ".prettierignore", + ".prettierrc.js", + "CODE_OF_CONDUCT.md", + "CONTRIBUTING.md", + "LICENSE", + "README.md", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.2069879817", + "protos/google/devtools/cloudbuild/v1/cloudbuild.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.534932486", + "src/index.ts", + "src/v1/cloud_build_client.ts", + "src/v1/cloud_build_client_config.json", + "src/v1/cloud_build_proto_list.json", + "src/v1/index.ts", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_cloud_build_v1.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file From 14558bd1064e6d252d8e4a441f40436571add8be Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 21 Aug 2020 09:26:14 -0700 Subject: [PATCH 111/223] build: move system and samples test from Node 10 to Node 12 (#159) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/ba2d388f-b3b2-4ad7-a163-0c6b4d86894f/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/05de3e1e14a0b07eab8b474e669164dbd31f81fb --- .../google-devtools-cloudbuild/synth.metadata | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 42ddd12fdc80..eacf931057e4 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "987ed341a211c7798dce046dedca5dbd36e17bcd" + "sha": "03a876ff3dbbbd29cb9d5ad66847e69c886b3edf" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1a60ff2a3975c2f5054431588bd95db9c3b862ba" + "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" } } ], @@ -51,19 +51,19 @@ ".kokoro/common.cfg", ".kokoro/continuous/node10/common.cfg", ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/lint.cfg", - ".kokoro/continuous/node10/samples-test.cfg", - ".kokoro/continuous/node10/system-test.cfg", ".kokoro/continuous/node10/test.cfg", ".kokoro/continuous/node12/common.cfg", + ".kokoro/continuous/node12/lint.cfg", + ".kokoro/continuous/node12/samples-test.cfg", + ".kokoro/continuous/node12/system-test.cfg", ".kokoro/continuous/node12/test.cfg", ".kokoro/docs.sh", ".kokoro/lint.sh", ".kokoro/populate-secrets.sh", ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node10/samples-test.cfg", - ".kokoro/presubmit/node10/system-test.cfg", ".kokoro/presubmit/node12/common.cfg", + ".kokoro/presubmit/node12/samples-test.cfg", + ".kokoro/presubmit/node12/system-test.cfg", ".kokoro/presubmit/node12/test.cfg", ".kokoro/publish.sh", ".kokoro/release/docs-devsite.cfg", @@ -86,14 +86,12 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.2069879817", "protos/google/devtools/cloudbuild/v1/cloudbuild.proto", "protos/protos.d.ts", "protos/protos.js", "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.534932486", "src/index.ts", "src/v1/cloud_build_client.ts", "src/v1/cloud_build_client_config.json", From 8c7547fbc410782f5b0c93d01dd4f805a075aaa7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 27 Aug 2020 20:38:05 -0700 Subject: [PATCH 112/223] build: track flaky tests for "nightly", add new secrets for tagging (#160) Source-Author: Benjamin E. Coe Source-Date: Wed Aug 26 14:28:22 2020 -0700 Source-Repo: googleapis/synthtool Source-Sha: 8cf6d2834ad14318e64429c3b94f6443ae83daf9 Source-Link: https://github.com/googleapis/synthtool/commit/8cf6d2834ad14318e64429c3b94f6443ae83daf9 --- packages/google-devtools-cloudbuild/synth.metadata | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index eacf931057e4..0625b19bc3df 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "03a876ff3dbbbd29cb9d5ad66847e69c886b3edf" + "sha": "5d4a799235773186e0de62dd454456a55b8bcc90" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "05de3e1e14a0b07eab8b474e669164dbd31f81fb" + "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" } } ], @@ -42,7 +42,6 @@ ".github/ISSUE_TEMPLATE/feature_request.md", ".github/ISSUE_TEMPLATE/support_request.md", ".github/PULL_REQUEST_TEMPLATE.md", - ".github/publish.yml", ".github/release-please.yml", ".github/workflows/ci.yaml", ".gitignore", From 1ffaa0289caff9158d0695786de96cf3f346cdcc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 12 Sep 2020 14:06:06 -0700 Subject: [PATCH 113/223] build(test): recursively find test files; fail on unsupported dependency versions (#165) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/28f926df-4479-489a-b60f-ecf7782e1eb7/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/fdd03c161003ab97657cc0218f25c82c89ddf4b6 --- packages/google-devtools-cloudbuild/.mocharc.js | 3 ++- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.mocharc.js b/packages/google-devtools-cloudbuild/.mocharc.js index ff7b34fa5d18..0b600509bed2 100644 --- a/packages/google-devtools-cloudbuild/.mocharc.js +++ b/packages/google-devtools-cloudbuild/.mocharc.js @@ -14,7 +14,8 @@ const config = { "enable-source-maps": true, "throw-deprecation": true, - "timeout": 10000 + "timeout": 10000, + "recursive": true } if (process.env.MOCHA_THROW_DEPRECATION === 'false') { delete config['throw-deprecation']; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 0625b19bc3df..babbb66878f3 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "5d4a799235773186e0de62dd454456a55b8bcc90" + "sha": "956c248fa658604429f67b50a32d54727a8edfc6" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "8cf6d2834ad14318e64429c3b94f6443ae83daf9" + "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" } } ], From dcd1ddbdcd4140b2e8950da37b0d40a9bae28adb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 18 Sep 2020 09:47:47 -0700 Subject: [PATCH 114/223] feat!: updated third_party Cloud Build clients with new Build message, fix: revert removal of WorkerPool API (#166) * feat!: Updated third_party Cloud Build clients with new Build message fields: - `service_account`, which is available to members of our closed alpha - STACKDRIVER_ONLY and CLOUD_LOGGING_ONLY logging modes - `dynamic_substitutions` option BREAKING CHANGE: The WorkerPool API in the v1 surface has been long deprecated, so it has been deleted from the v1 surface. Alpha WorkerPool customers who want to call the WorkerPool API can use gcloud. PiperOrigin-RevId: 330504082 Source-Author: Google APIs Source-Date: Tue Sep 8 07:21:07 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 48ce8878cd4c54cf247de826ac53c1414b0345bd Source-Link: https://github.com/googleapis/googleapis/commit/48ce8878cd4c54cf247de826ac53c1414b0345bd * fix: revert removal of WorkerPool API PiperOrigin-RevId: 330974505 Source-Author: Google APIs Source-Date: Thu Sep 10 11:08:18 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: 3257ba52160dd8a9c7f83c34d13793de843bdb4a Source-Link: https://github.com/googleapis/googleapis/commit/3257ba52160dd8a9c7f83c34d13793de843bdb4a * feat!: Updated third_party Cloud Build clients with new Build message fields: - `service_account`, which is available to members of our closed alpha - CLOUD_LOGGING_ONLY logging modes - `dynamic_substitutions` option - resource annotations added PiperOrigin-RevId: 331027363 Source-Author: Google APIs Source-Date: Thu Sep 10 15:15:28 2020 -0700 Source-Repo: googleapis/googleapis Source-Sha: bc18612d35891d88bcac57c85d79db93f4f29028 Source-Link: https://github.com/googleapis/googleapis/commit/bc18612d35891d88bcac57c85d79db93f4f29028 --- .../devtools/cloudbuild/v1/cloudbuild.proto | 137 +- .../protos/protos.d.ts | 378 ++++- .../protos/protos.js | 1231 +++++++++++++++-- .../protos/protos.json | 190 ++- .../src/v1/cloud_build_client.ts | 247 ++++ .../google-devtools-cloudbuild/synth.metadata | 6 +- .../test/gapic_cloud_build_v1.ts | 327 ++++- 7 files changed, 2378 insertions(+), 138 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 4e3a0188db85..de8a1de3dcfe 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -19,9 +19,11 @@ package google.devtools.cloudbuild.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild"; @@ -29,6 +31,14 @@ option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; option objc_class_prefix = "GCB"; option ruby_package = "Google::Cloud::Build::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/Network" + pattern: "projects/{project}/global/networks/{network}" +}; +option (google.api.resource_definition) = { + type: "iam.googleapis.com/ServiceAccount" + pattern: "projects/{project}/serviceAccounts/{service_account}" +}; // Creates and manages builds on Google Cloud Platform. // @@ -52,6 +62,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/builds" body: "build" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/builds" + body: "*" + } }; option (google.api.method_signature) = "project_id,build"; option (google.longrunning.operation_info) = { @@ -67,6 +81,7 @@ service CloudBuild { rpc GetBuild(GetBuildRequest) returns (Build) { option (google.api.http) = { get: "/v1/projects/{project_id}/builds/{id}" + additional_bindings { get: "/v1/{name=projects/*/locations/*/builds/*}" } }; option (google.api.method_signature) = "project_id,id"; } @@ -78,6 +93,7 @@ service CloudBuild { rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse) { option (google.api.http) = { get: "/v1/projects/{project_id}/builds" + additional_bindings { get: "/v1/{parent=projects/*/locations/*}/builds" } }; option (google.api.method_signature) = "project_id,filter"; } @@ -87,6 +103,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/builds/{id}:cancel" body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/builds/*}:cancel" + body: "*" + } }; option (google.api.method_signature) = "project_id,id"; } @@ -122,6 +142,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/builds/{id}:retry" body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/builds/*}:retry" + body: "*" + } }; option (google.api.method_signature) = "project_id,id"; option (google.longrunning.operation_info) = { @@ -228,6 +252,12 @@ service CloudBuild { // Specifies a build to retry. message RetryBuildRequest { + // The name of the `Build` to retry. + // Format: `projects/{project}/locations/{location}/builds/{build}` + string name = 3 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -416,7 +446,7 @@ message BuildStep { // Output only. Stores timing information for pulling this build step's // builder image only. - TimeSpan pull_timing = 13; + TimeSpan pull_timing = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Time limit for executing this build step. If not defined, the step has no // time limit and will be allowed to continue to run until either it completes @@ -426,7 +456,7 @@ message BuildStep { // Output only. Status of the build step. At this time, build step status is // only updated on build completion; step status is not updated in real-time // as the build progresses. - Build.Status status = 12; + Build.Status status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Volume describes a Docker container volume which is mounted into build steps @@ -502,6 +532,12 @@ message ArtifactResult { // resolved from the specified branch or tag. // - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. message Build { + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/Build" + pattern: "projects/{project}/builds/{build}" + pattern: "projects/{project}/locations/{location}/builds/{build}" + }; + // Possible status of a build or build step. enum Status { // Status of the build is unknown. @@ -532,6 +568,11 @@ message Build { EXPIRED = 9; } + // Output only. The 'Build' name with format: + // `projects/{project}/locations/{location}/builds/{build}`, where {build} + // is a unique identifier generated by the service. + string name = 45 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Unique identifier of the build. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -539,10 +580,10 @@ message Build { string project_id = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Status of the build. - Status status = 2; + Status status = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Customer-readable message about the current status. - string status_detail = 24; + string status_detail = 24 [(google.api.field_behavior) = OUTPUT_ONLY]; // The location of the source files to build. Source source = 3; @@ -572,6 +613,8 @@ message Build { // granularity. If this amount of time elapses, work on the build will cease // and the build status will be `TIMEOUT`. // + // `timeout` starts ticking from `startTime`. + // // Default time is ten minutes. google.protobuf.Duration timeout = 12; @@ -605,11 +648,12 @@ message Build { string logs_bucket = 19; // Output only. A permanent fixed identifier for source. - SourceProvenance source_provenance = 21; + SourceProvenance source_provenance = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The ID of the `BuildTrigger` that triggered this build, if it // was triggered automatically. - string build_trigger_id = 22; + string build_trigger_id = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // Special options for this build. BuildOptions options = 23; @@ -636,6 +680,15 @@ message Build { // If the build does not specify source or images, // these keys will not be included. map timing = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // IAM service account whose credentials will be used at build runtime. + // Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. + // ACCOUNT can be email address or uniqueId of the service account. + // + // This field is in alpha and is not publicly available. + string service_account = 42 [(google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + }]; } // Artifacts produced by a build that should be uploaded upon @@ -656,7 +709,7 @@ message Artifacts { repeated string paths = 2; // Output only. Stores timing information for pushing all artifact objects. - TimeSpan timing = 3; + TimeSpan timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A list of images to be pushed upon the successful completion of all build @@ -769,6 +822,12 @@ message Secret { // Request to create a new build. message CreateBuildRequest { + // The parent resource where this build will be created. + // Format: `projects/{project}/locations/{location}` + string parent = 4 [(google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/Build" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -778,6 +837,12 @@ message CreateBuildRequest { // Request to get a build. message GetBuildRequest { + // The name of the `Build` to retrieve. + // Format: `projects/{project}/locations/{location}/builds/{build}` + string name = 4 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -787,6 +852,12 @@ message GetBuildRequest { // Request to list builds. message ListBuildsRequest { + // The parent of the collection of `Builds`. + // Format: `projects/{project}/locations/location` + string parent = 9 [(google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/Build" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -811,6 +882,12 @@ message ListBuildsResponse { // Request to cancel an ongoing build. message CancelBuildRequest { + // The name of the `Build` to retrieve. + // Format: `projects/{project}/locations/{location}/builds/{build}` + string name = 4 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/Build" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -821,6 +898,11 @@ message CancelBuildRequest { // Configuration for an automated build in response to source repository // changes. message BuildTrigger { + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/BuildTrigger" + pattern: "projects/{project}/triggers/{trigger}" + }; + // Output only. Unique identifier of the trigger. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -867,12 +949,11 @@ message BuildTrigger { google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // If true, the trigger will never result in a build. + // If true, the trigger will never automatically execute a build. bool disabled = 9; // Substitutions for Build resource. The keys must match the following - // regular expression: `^_[A-Z0-9_]+$`.The keys cannot conflict with the - // keys in bindings. + // regular expression: `^_[A-Z0-9_]+$`. map substitutions = 11; // ignored_files and included_files are file glob matches using @@ -948,8 +1029,8 @@ message PullRequestFilter { string branch = 2; } - // Whether to block builds on a "/gcbrun" comment from a repository admin or - // collaborator. + // Configure builds to run whether a repository owner or collaborator need to + // comment `/gcbrun`. CommentControl comment_control = 5; // If true, branches that do NOT match the git_ref will trigger a build. @@ -1050,7 +1131,9 @@ message BuildOptions { VERIFIED = 1; } - // Supported VM sizes. + // Supported Compute Engine machine types. + // For more information, see [Machine + // types](https://cloud.google.com/compute/docs/machine-types). enum MachineType { // Standard machine type. UNSPECIFIED = 0; @@ -1091,11 +1174,23 @@ message BuildOptions { // rely on the default logging behavior as it may change in the future. LOGGING_UNSPECIFIED = 0; - // Stackdriver logging and Cloud Storage logging are enabled. + // Cloud Logging and Cloud Storage logging are enabled. LEGACY = 1; // Only Cloud Storage logging is enabled. GCS_ONLY = 2; + + // This option is the same as CLOUD_LOGGING_ONLY. + STACKDRIVER_ONLY = 3 [deprecated = true]; + + // Only Cloud Logging is enabled. Note that logs for both the Cloud Console + // UI and Cloud SDK are based on Cloud Storage logs, so neither will provide + // logs if this option is chosen. + CLOUD_LOGGING_ONLY = 5; + + // Turn off all logging. No build logs will be captured. + // Next ID: 6 + NONE = 4; } // Requested hash for SourceProvenance. @@ -1117,8 +1212,18 @@ message BuildOptions { // Option to specify behavior when there is an error in the substitution // checks. + // + // NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot + // be overridden in the build configuration file. SubstitutionOption substitution_option = 4; + // Option to specify whether or not to apply bash style string + // operations to the substitutions. + // + // NOTE: this is always enabled for triggered builds and cannot be + // overridden in the build configuration file. + bool dynamic_substitutions = 17; + // Option to define build log streaming behavior to Google Cloud // Storage. LogStreamingOption log_streaming_option = 5; @@ -1129,8 +1234,8 @@ message BuildOptions { // This field is experimental. string worker_pool = 7; - // Option to specify the logging mode, which determines where the logs are - // stored. + // Option to specify the logging mode, which determines if and where build + // logs are stored. LoggingMode logging = 11; // A list of global environment variable definitions that will exist for all diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index d1471e6b6167..8ac99b7f5206 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -389,6 +389,9 @@ export namespace google { /** Properties of a RetryBuildRequest. */ interface IRetryBuildRequest { + /** RetryBuildRequest name */ + name?: (string|null); + /** RetryBuildRequest projectId */ projectId?: (string|null); @@ -405,6 +408,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IRetryBuildRequest); + /** RetryBuildRequest name. */ + public name: string; + /** RetryBuildRequest projectId. */ public projectId: string; @@ -1499,6 +1505,9 @@ export namespace google { /** Properties of a Build. */ interface IBuild { + /** Build name */ + name?: (string|null); + /** Build id */ id?: (string|null); @@ -1567,6 +1576,9 @@ export namespace google { /** Build timing */ timing?: ({ [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }|null); + + /** Build serviceAccount */ + serviceAccount?: (string|null); } /** Represents a Build. */ @@ -1578,6 +1590,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IBuild); + /** Build name. */ + public name: string; + /** Build id. */ public id: string; @@ -1647,6 +1662,9 @@ export namespace google { /** Build timing. */ public timing: { [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }; + /** Build serviceAccount. */ + public serviceAccount: string; + /** * Creates a new Build instance using the specified properties. * @param [properties] Properties to set @@ -2518,6 +2536,9 @@ export namespace google { /** Properties of a CreateBuildRequest. */ interface ICreateBuildRequest { + /** CreateBuildRequest parent */ + parent?: (string|null); + /** CreateBuildRequest projectId */ projectId?: (string|null); @@ -2534,6 +2555,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.ICreateBuildRequest); + /** CreateBuildRequest parent. */ + public parent: string; + /** CreateBuildRequest projectId. */ public projectId: string; @@ -2614,6 +2638,9 @@ export namespace google { /** Properties of a GetBuildRequest. */ interface IGetBuildRequest { + /** GetBuildRequest name */ + name?: (string|null); + /** GetBuildRequest projectId */ projectId?: (string|null); @@ -2630,6 +2657,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IGetBuildRequest); + /** GetBuildRequest name. */ + public name: string; + /** GetBuildRequest projectId. */ public projectId: string; @@ -2710,6 +2740,9 @@ export namespace google { /** Properties of a ListBuildsRequest. */ interface IListBuildsRequest { + /** ListBuildsRequest parent */ + parent?: (string|null); + /** ListBuildsRequest projectId */ projectId?: (string|null); @@ -2732,6 +2765,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IListBuildsRequest); + /** ListBuildsRequest parent. */ + public parent: string; + /** ListBuildsRequest projectId. */ public projectId: string; @@ -2914,6 +2950,9 @@ export namespace google { /** Properties of a CancelBuildRequest. */ interface ICancelBuildRequest { + /** CancelBuildRequest name */ + name?: (string|null); + /** CancelBuildRequest projectId */ projectId?: (string|null); @@ -2930,6 +2969,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.ICancelBuildRequest); + /** CancelBuildRequest name. */ + public name: string; + /** CancelBuildRequest projectId. */ public projectId: string; @@ -4114,6 +4156,9 @@ export namespace google { /** BuildOptions substitutionOption */ substitutionOption?: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null); + /** BuildOptions dynamicSubstitutions */ + dynamicSubstitutions?: (boolean|null); + /** BuildOptions logStreamingOption */ logStreamingOption?: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null); @@ -4157,6 +4202,9 @@ export namespace google { /** BuildOptions substitutionOption. */ public substitutionOption: (google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption); + /** BuildOptions dynamicSubstitutions. */ + public dynamicSubstitutions: boolean; + /** BuildOptions logStreamingOption. */ public logStreamingOption: (google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption); @@ -4278,7 +4326,10 @@ export namespace google { enum LoggingMode { LOGGING_UNSPECIFIED = 0, LEGACY = 1, - GCS_ONLY = 2 + GCS_ONLY = 2, + STACKDRIVER_ONLY = 3, + CLOUD_LOGGING_ONLY = 5, + NONE = 4 } } @@ -5563,6 +5614,232 @@ export namespace google { INPUT_ONLY = 4, IMMUTABLE = 5 } + + /** 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); + } + + /** 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; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } /** Namespace protobuf. */ @@ -7129,6 +7406,9 @@ export namespace google { /** FileOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } /** Represents a FileOptions. */ @@ -7301,6 +7581,9 @@ export namespace google { /** MessageOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } /** Represents a MessageOptions. */ @@ -7424,6 +7707,9 @@ export namespace google { /** 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. */ @@ -8964,6 +9250,96 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Timestamp. */ interface ITimestamp { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index d8ef4575392d..85e74bb07b7d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -635,6 +635,7 @@ * Properties of a RetryBuildRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IRetryBuildRequest + * @property {string|null} [name] RetryBuildRequest name * @property {string|null} [projectId] RetryBuildRequest projectId * @property {string|null} [id] RetryBuildRequest id */ @@ -654,6 +655,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * RetryBuildRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @instance + */ + RetryBuildRequest.prototype.name = ""; + /** * RetryBuildRequest projectId. * @member {string} projectId @@ -698,6 +707,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -732,6 +743,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -773,6 +787,9 @@ RetryBuildRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -794,6 +811,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.RetryBuildRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.RetryBuildRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.id != null) @@ -817,11 +836,14 @@ if (options.defaults) { object.projectId = ""; object.id = ""; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -3637,6 +3659,7 @@ * Properties of a Build. * @memberof google.devtools.cloudbuild.v1 * @interface IBuild + * @property {string|null} [name] Build name * @property {string|null} [id] Build id * @property {string|null} [projectId] Build projectId * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] Build status @@ -3660,6 +3683,7 @@ * @property {Array.|null} [tags] Build tags * @property {Array.|null} [secrets] Build secrets * @property {Object.|null} [timing] Build timing + * @property {string|null} [serviceAccount] Build serviceAccount */ /** @@ -3683,6 +3707,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * Build name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.name = ""; + /** * Build id. * @member {string} id @@ -3867,6 +3899,14 @@ */ Build.prototype.timing = $util.emptyObject; + /** + * Build serviceAccount. + * @member {string} serviceAccount + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.serviceAccount = ""; + /** * Creates a new Build instance using the specified properties. * @function create @@ -3945,6 +3985,10 @@ $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); if (message.queueTtl != null && Object.hasOwnProperty.call(message, "queueTtl")) $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 42, wireType 2 =*/338).string(message.serviceAccount); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); return writer; }; @@ -3979,6 +4023,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 45: + message.name = reader.string(); + break; case 1: message.id = reader.string(); break; @@ -4094,6 +4141,9 @@ } message.timing[key] = value; break; + case 42: + message.serviceAccount = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -4129,6 +4179,9 @@ Build.verify = function verify(message) { if (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.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; @@ -4262,6 +4315,9 @@ return "timing." + error; } } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; return null; }; @@ -4277,6 +4333,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.Build) return object; var message = new $root.google.devtools.cloudbuild.v1.Build(); + if (object.name != null) + message.name = String(object.name); if (object.id != null) message.id = String(object.id); if (object.projectId != null) @@ -4428,6 +4486,8 @@ message.timing[keys[i]] = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing[keys[i]]); } } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); return message; }; @@ -4472,6 +4532,8 @@ object.logUrl = ""; object.artifacts = null; object.queueTtl = null; + object.serviceAccount = ""; + object.name = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -4538,6 +4600,10 @@ object.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.toObject(message.artifacts, options); if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) object.queueTtl = $root.google.protobuf.Duration.toObject(message.queueTtl, options); + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -6480,6 +6546,7 @@ * Properties of a CreateBuildRequest. * @memberof google.devtools.cloudbuild.v1 * @interface ICreateBuildRequest + * @property {string|null} [parent] CreateBuildRequest parent * @property {string|null} [projectId] CreateBuildRequest projectId * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] CreateBuildRequest build */ @@ -6499,6 +6566,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CreateBuildRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @instance + */ + CreateBuildRequest.prototype.parent = ""; + /** * CreateBuildRequest projectId. * @member {string} projectId @@ -6543,6 +6618,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.build != null && Object.hasOwnProperty.call(message, "build")) $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); return writer; }; @@ -6577,6 +6654,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.parent = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -6618,6 +6698,9 @@ CreateBuildRequest.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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -6641,6 +6724,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.projectId != null) message.projectId = String(object.projectId); if (object.build != null) { @@ -6667,11 +6752,14 @@ if (options.defaults) { object.projectId = ""; object.build = null; + object.parent = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.build != null && message.hasOwnProperty("build")) object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; @@ -6695,6 +6783,7 @@ * Properties of a GetBuildRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IGetBuildRequest + * @property {string|null} [name] GetBuildRequest name * @property {string|null} [projectId] GetBuildRequest projectId * @property {string|null} [id] GetBuildRequest id */ @@ -6714,6 +6803,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * GetBuildRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @instance + */ + GetBuildRequest.prototype.name = ""; + /** * GetBuildRequest projectId. * @member {string} projectId @@ -6758,6 +6855,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -6792,6 +6891,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -6833,6 +6935,9 @@ GetBuildRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -6854,6 +6959,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.id != null) @@ -6877,11 +6984,14 @@ if (options.defaults) { object.projectId = ""; object.id = ""; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -6905,6 +7015,7 @@ * Properties of a ListBuildsRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IListBuildsRequest + * @property {string|null} [parent] ListBuildsRequest parent * @property {string|null} [projectId] ListBuildsRequest projectId * @property {number|null} [pageSize] ListBuildsRequest pageSize * @property {string|null} [pageToken] ListBuildsRequest pageToken @@ -6926,6 +7037,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ListBuildsRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @instance + */ + ListBuildsRequest.prototype.parent = ""; + /** * ListBuildsRequest projectId. * @member {string} projectId @@ -6990,6 +7109,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.parent); return writer; }; @@ -7024,6 +7145,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 9: + message.parent = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -7071,6 +7195,9 @@ ListBuildsRequest.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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -7098,6 +7225,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.projectId != null) message.projectId = String(object.projectId); if (object.pageSize != null) @@ -7127,6 +7256,7 @@ object.pageSize = 0; object.pageToken = ""; object.filter = ""; + object.parent = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; @@ -7136,6 +7266,8 @@ object.pageToken = message.pageToken; if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; @@ -7390,6 +7522,7 @@ * Properties of a CancelBuildRequest. * @memberof google.devtools.cloudbuild.v1 * @interface ICancelBuildRequest + * @property {string|null} [name] CancelBuildRequest name * @property {string|null} [projectId] CancelBuildRequest projectId * @property {string|null} [id] CancelBuildRequest id */ @@ -7409,6 +7542,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CancelBuildRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @instance + */ + CancelBuildRequest.prototype.name = ""; + /** * CancelBuildRequest projectId. * @member {string} projectId @@ -7453,6 +7594,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -7487,6 +7630,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -7528,6 +7674,9 @@ CancelBuildRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -7549,6 +7698,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.CancelBuildRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.id != null) @@ -7572,11 +7723,14 @@ if (options.defaults) { object.projectId = ""; object.id = ""; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -10385,6 +10539,7 @@ * @property {google.devtools.cloudbuild.v1.BuildOptions.MachineType|null} [machineType] BuildOptions machineType * @property {number|Long|null} [diskSizeGb] BuildOptions diskSizeGb * @property {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null} [substitutionOption] BuildOptions substitutionOption + * @property {boolean|null} [dynamicSubstitutions] BuildOptions dynamicSubstitutions * @property {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null} [logStreamingOption] BuildOptions logStreamingOption * @property {string|null} [workerPool] BuildOptions workerPool * @property {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null} [logging] BuildOptions logging @@ -10452,6 +10607,14 @@ */ BuildOptions.prototype.substitutionOption = 0; + /** + * BuildOptions dynamicSubstitutions. + * @member {boolean} dynamicSubstitutions + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.dynamicSubstitutions = false; + /** * BuildOptions logStreamingOption. * @member {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption} logStreamingOption @@ -10553,6 +10716,8 @@ if (message.volumes != null && message.volumes.length) for (var i = 0; i < message.volumes.length; ++i) $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.dynamicSubstitutions != null && Object.hasOwnProperty.call(message, "dynamicSubstitutions")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.dynamicSubstitutions); return writer; }; @@ -10609,6 +10774,9 @@ case 4: message.substitutionOption = reader.int32(); break; + case 17: + message.dynamicSubstitutions = reader.bool(); + break; case 5: message.logStreamingOption = reader.int32(); break; @@ -10709,6 +10877,9 @@ case 1: break; } + if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) + if (typeof message.dynamicSubstitutions !== "boolean") + return "dynamicSubstitutions: boolean expected"; if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) switch (message.logStreamingOption) { default: @@ -10728,6 +10899,9 @@ case 0: case 1: case 2: + case 3: + case 5: + case 4: break; } if (message.env != null && message.hasOwnProperty("env")) { @@ -10832,6 +11006,8 @@ message.substitutionOption = 1; break; } + if (object.dynamicSubstitutions != null) + message.dynamicSubstitutions = Boolean(object.dynamicSubstitutions); switch (object.logStreamingOption) { case "STREAM_DEFAULT": case 0: @@ -10861,6 +11037,18 @@ case 2: message.logging = 2; break; + case "STACKDRIVER_ONLY": + case 3: + message.logging = 3; + break; + case "CLOUD_LOGGING_ONLY": + case 5: + message.logging = 5; + break; + case "NONE": + case 4: + message.logging = 4; + break; } if (object.env) { if (!Array.isArray(object.env)) @@ -10920,6 +11108,7 @@ object.diskSizeGb = options.longs === String ? "0" : 0; object.workerPool = ""; object.logging = options.enums === String ? "LOGGING_UNSPECIFIED" : 0; + object.dynamicSubstitutions = false; } if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { object.sourceProvenanceHash = []; @@ -10958,6 +11147,8 @@ for (var j = 0; j < message.volumes.length; ++j) object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); } + if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) + object.dynamicSubstitutions = message.dynamicSubstitutions; return object; }; @@ -11039,12 +11230,18 @@ * @property {number} LOGGING_UNSPECIFIED=0 LOGGING_UNSPECIFIED value * @property {number} LEGACY=1 LEGACY value * @property {number} GCS_ONLY=2 GCS_ONLY value + * @property {number} STACKDRIVER_ONLY=3 STACKDRIVER_ONLY value + * @property {number} CLOUD_LOGGING_ONLY=5 CLOUD_LOGGING_ONLY value + * @property {number} NONE=4 NONE value */ BuildOptions.LoggingMode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "LOGGING_UNSPECIFIED"] = 0; values[valuesById[1] = "LEGACY"] = 1; values[valuesById[2] = "GCS_ONLY"] = 2; + values[valuesById[3] = "STACKDRIVER_ONLY"] = 3; + values[valuesById[5] = "CLOUD_LOGGING_ONLY"] = 5; + values[valuesById[4] = "NONE"] = 4; return values; })(); @@ -14242,37 +14439,30 @@ return values; })(); - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * 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 */ /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function ResourceDescriptor(properties) { + this.pattern = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14280,78 +14470,143 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Creates a new FileDescriptorSet instance using the specified properties. + * 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 = ""; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encode = function encode(message, writer) { + ResourceDescriptor.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(); + 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); return writer; }; /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FileDescriptorSet + * @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.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decode = function decode(reader, length) { + 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.protobuf.FileDescriptorSet(); + 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: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + 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; default: reader.skipType(tag & 7); @@ -14362,69 +14617,570 @@ }; /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @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 */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileDescriptorSet message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.protobuf.FileDescriptorSet + * @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 */ - FileDescriptorSet.verify = function verify(message) { + ResourceDescriptor.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; - } + 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"; return null; }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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]); - } + 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]); } - return message; - }; - + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + 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 = []; + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + /** * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject @@ -18435,6 +19191,7 @@ * @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 */ /** @@ -18447,6 +19204,7 @@ */ 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) @@ -18621,6 +19379,14 @@ */ 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 @@ -18688,6 +19454,9 @@ 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; }; @@ -18787,6 +19556,11 @@ 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; @@ -18897,6 +19671,15 @@ 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; }; @@ -18974,6 +19757,16 @@ 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; }; @@ -18990,8 +19783,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } if (options.defaults) { object.javaPackage = ""; object.javaOuterClassname = ""; @@ -19059,6 +19854,11 @@ 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; }; @@ -19103,6 +19903,7 @@ * @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 */ /** @@ -19161,6 +19962,14 @@ */ 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 @@ -19196,6 +20005,8 @@ 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; }; @@ -19247,6 +20058,9 @@ 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; @@ -19303,6 +20117,11 @@ 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; }; @@ -19336,6 +20155,11 @@ 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; }; @@ -19359,6 +20183,7 @@ 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; @@ -19373,6 +20198,8 @@ 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; }; @@ -19404,6 +20231,7 @@ * @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 */ /** @@ -19487,6 +20315,14 @@ */ 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 @@ -19532,6 +20368,8 @@ 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; }; @@ -19599,6 +20437,9 @@ } 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; @@ -19689,6 +20530,11 @@ 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; }; @@ -19783,6 +20629,11 @@ 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; }; @@ -19810,6 +20661,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; @@ -19833,6 +20685,8 @@ for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; @@ -23461,6 +24315,209 @@ return Empty; })(); + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + protobuf.Timestamp = (function() { /** diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index e992dfa659b5..f400c1805788 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -12,7 +12,9 @@ "java_multiple_files": true, "java_package": "com.google.cloudbuild.v1", "objc_class_prefix": "GCB", - "ruby_package": "Google::Cloud::Build::V1" + "ruby_package": "Google::Cloud::Build::V1", + "(google.api.resource_definition).type": "iam.googleapis.com/ServiceAccount", + "(google.api.resource_definition).pattern": "projects/{project}/serviceAccounts/{service_account}" }, "nested": { "CloudBuild": { @@ -27,6 +29,8 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/builds", "(google.api.http).body": "build", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/builds", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "project_id,build", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" @@ -37,6 +41,7 @@ "responseType": "Build", "options": { "(google.api.http).get": "/v1/projects/{project_id}/builds/{id}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/builds/*}", "(google.api.method_signature)": "project_id,id" } }, @@ -45,6 +50,7 @@ "responseType": "ListBuildsResponse", "options": { "(google.api.http).get": "/v1/projects/{project_id}/builds", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/builds", "(google.api.method_signature)": "project_id,filter" } }, @@ -54,6 +60,8 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/builds/{id}:cancel", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/builds/*}:cancel", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "project_id,id" } }, @@ -63,6 +71,8 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/builds/{id}:retry", "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/builds/*}:retry", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "project_id,id", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" @@ -145,6 +155,13 @@ }, "RetryBuildRequest": { "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, "projectId": { "type": "string", "id": 1, @@ -339,7 +356,10 @@ }, "pullTiming": { "type": "TimeSpan", - "id": 13 + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "timeout": { "type": "google.protobuf.Duration", @@ -347,7 +367,10 @@ }, "status": { "type": "Build.Status", - "id": 12 + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -408,7 +431,18 @@ } }, "Build": { + "options": { + "(google.api.resource).type": "cloudbuild.googleapis.com/Build", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/builds/{build}" + }, "fields": { + "name": { + "type": "string", + "id": 45, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "id": { "type": "string", "id": 1, @@ -425,11 +459,17 @@ }, "status": { "type": "Status", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "statusDetail": { "type": "string", - "id": 24 + "id": 24, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "source": { "type": "Source", @@ -491,11 +531,17 @@ }, "sourceProvenance": { "type": "SourceProvenance", - "id": 21 + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "buildTriggerId": { "type": "string", - "id": 22 + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "options": { "type": "BuildOptions", @@ -530,6 +576,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "serviceAccount": { + "type": "string", + "id": 42, + "options": { + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } } }, "nested": { @@ -574,7 +627,10 @@ }, "timing": { "type": "TimeSpan", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } } @@ -665,6 +721,13 @@ }, "CreateBuildRequest": { "fields": { + "parent": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/Build" + } + }, "projectId": { "type": "string", "id": 1, @@ -683,6 +746,13 @@ }, "GetBuildRequest": { "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, "projectId": { "type": "string", "id": 1, @@ -701,6 +771,13 @@ }, "ListBuildsRequest": { "fields": { + "parent": { + "type": "string", + "id": 9, + "options": { + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/Build" + } + }, "projectId": { "type": "string", "id": 1, @@ -737,6 +814,13 @@ }, "CancelBuildRequest": { "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/Build" + } + }, "projectId": { "type": "string", "id": 1, @@ -754,6 +838,10 @@ } }, "BuildTrigger": { + "options": { + "(google.api.resource).type": "cloudbuild.googleapis.com/BuildTrigger", + "(google.api.resource).pattern": "projects/{project}/triggers/{trigger}" + }, "oneofs": { "buildTemplate": { "oneof": [ @@ -1051,6 +1139,10 @@ "type": "SubstitutionOption", "id": 4 }, + "dynamicSubstitutions": { + "type": "bool", + "id": 17 + }, "logStreamingOption": { "type": "LogStreamingOption", "id": 5 @@ -1110,7 +1202,10 @@ "values": { "LOGGING_UNSPECIFIED": 0, "LEGACY": 1, - "GCS_ONLY": 2 + "GCS_ONLY": 2, + "STACKDRIVER_ONLY": 3, + "CLOUD_LOGGING_ONLY": 5, + "NONE": 4 } } } @@ -1283,7 +1378,7 @@ "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "FieldBehaviorProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true @@ -1407,6 +1502,72 @@ "INPUT_ONLY": 4, "IMMUTABLE": 5 } + }, + "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 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } } } }, @@ -2332,6 +2493,15 @@ "Empty": { "fields": {} }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, "Timestamp": { "fields": { "seconds": { diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index e0f85a5e7dba..4aaf8a01b08c 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -62,6 +62,7 @@ export class CloudBuildClient { batching: {}, }; innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; cloudBuildStub?: Promise<{[name: string]: Function}>; @@ -164,6 +165,27 @@ export class CloudBuildClient { : nodejsProtoPath ); + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + buildTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/triggers/{trigger}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + projectBuildPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/builds/{build}' + ), + projectLocationBuildPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/builds/{build}' + ), + serviceAccountPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/serviceAccounts/{service_account}' + ), + }; + // 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. @@ -411,6 +433,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Build` to retrieve. + * Format: `projects/{project}/locations/{location}/builds/{build}` * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id @@ -459,6 +484,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.getBuild(request, options, callback); @@ -499,6 +525,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Build` to retrieve. + * Format: `projects/{project}/locations/{location}/builds/{build}` * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id @@ -549,6 +578,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.cancelBuild(request, options, callback); @@ -1409,6 +1439,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent resource where this build will be created. + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project. * @param {google.devtools.cloudbuild.v1.Build} request.build @@ -1464,6 +1497,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.createBuild(request, options, callback); @@ -1571,6 +1605,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Build` to retry. + * Format: `projects/{project}/locations/{location}/builds/{build}` * @param {string} request.projectId * Required. ID of the project. * @param {string} request.id @@ -1626,6 +1663,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.retryBuild(request, options, callback); @@ -1843,6 +1881,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent of the collection of `Builds`. + * Format: `projects/{project}/locations/location` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize @@ -1909,6 +1950,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.listBuilds(request, options, callback); @@ -1929,6 +1971,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent of the collection of `Builds`. + * Format: `projects/{project}/locations/location` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize @@ -1954,6 +1999,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -1971,6 +2017,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent of the collection of `Builds`. + * Format: `projects/{project}/locations/location` * @param {string} request.projectId * Required. ID of the project. * @param {number} request.pageSize @@ -1996,6 +2045,7 @@ export class CloudBuildClient { 'x-goog-request-params' ] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); @@ -2201,6 +2251,203 @@ export class CloudBuildClient { callSettings ) as AsyncIterable; } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified buildTrigger resource name string. + * + * @param {string} project + * @param {string} trigger + * @returns {string} Resource name string. + */ + buildTriggerPath(project: string, trigger: string) { + return this.pathTemplates.buildTriggerPathTemplate.render({ + project: project, + trigger: trigger, + }); + } + + /** + * Parse the project from BuildTrigger resource. + * + * @param {string} buildTriggerName + * A fully-qualified path representing BuildTrigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromBuildTriggerName(buildTriggerName: string) { + return this.pathTemplates.buildTriggerPathTemplate.match(buildTriggerName) + .project; + } + + /** + * Parse the trigger from BuildTrigger resource. + * + * @param {string} buildTriggerName + * A fully-qualified path representing BuildTrigger resource. + * @returns {string} A string representing the trigger. + */ + matchTriggerFromBuildTriggerName(buildTriggerName: string) { + return this.pathTemplates.buildTriggerPathTemplate.match(buildTriggerName) + .trigger; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectBuild resource name string. + * + * @param {string} project + * @param {string} build + * @returns {string} Resource name string. + */ + projectBuildPath(project: string, build: string) { + return this.pathTemplates.projectBuildPathTemplate.render({ + project: project, + build: build, + }); + } + + /** + * Parse the project from ProjectBuild resource. + * + * @param {string} projectBuildName + * A fully-qualified path representing project_build resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectBuildName(projectBuildName: string) { + return this.pathTemplates.projectBuildPathTemplate.match(projectBuildName) + .project; + } + + /** + * Parse the build from ProjectBuild resource. + * + * @param {string} projectBuildName + * A fully-qualified path representing project_build resource. + * @returns {string} A string representing the build. + */ + matchBuildFromProjectBuildName(projectBuildName: string) { + return this.pathTemplates.projectBuildPathTemplate.match(projectBuildName) + .build; + } + + /** + * Return a fully-qualified projectLocationBuild resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} build + * @returns {string} Resource name string. + */ + projectLocationBuildPath(project: string, location: string, build: string) { + return this.pathTemplates.projectLocationBuildPathTemplate.render({ + project: project, + location: location, + build: build, + }); + } + + /** + * Parse the project from ProjectLocationBuild resource. + * + * @param {string} projectLocationBuildName + * A fully-qualified path representing project_location_build resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationBuildName(projectLocationBuildName: string) { + return this.pathTemplates.projectLocationBuildPathTemplate.match( + projectLocationBuildName + ).project; + } + + /** + * Parse the location from ProjectLocationBuild resource. + * + * @param {string} projectLocationBuildName + * A fully-qualified path representing project_location_build resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationBuildName(projectLocationBuildName: string) { + return this.pathTemplates.projectLocationBuildPathTemplate.match( + projectLocationBuildName + ).location; + } + + /** + * Parse the build from ProjectLocationBuild resource. + * + * @param {string} projectLocationBuildName + * A fully-qualified path representing project_location_build resource. + * @returns {string} A string representing the build. + */ + matchBuildFromProjectLocationBuildName(projectLocationBuildName: string) { + return this.pathTemplates.projectLocationBuildPathTemplate.match( + projectLocationBuildName + ).build; + } + + /** + * Return a fully-qualified serviceAccount resource name string. + * + * @param {string} project + * @param {string} service_account + * @returns {string} Resource name string. + */ + serviceAccountPath(project: string, serviceAccount: string) { + return this.pathTemplates.serviceAccountPathTemplate.render({ + project: project, + service_account: serviceAccount, + }); + } + + /** + * Parse the project from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the project. + */ + matchProjectFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match( + serviceAccountName + ).project; + } + + /** + * Parse the service_account from ServiceAccount resource. + * + * @param {string} serviceAccountName + * A fully-qualified path representing ServiceAccount resource. + * @returns {string} A string representing the service_account. + */ + matchServiceAccountFromServiceAccountName(serviceAccountName: string) { + return this.pathTemplates.serviceAccountPathTemplate.match( + serviceAccountName + ).service_account; + } /** * Terminate the GRPC channel and close the client. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index babbb66878f3..6e05fc68164f 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "956c248fa658604429f67b50a32d54727a8edfc6" + "sha": "81332f008c25cdf869a40fe43865500e3ab0594e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "4c5071b615d96ef9dfd6a63d8429090f1f2872bb", - "internalRef": "327369997" + "sha": "bc18612d35891d88bcac57c85d79db93f4f29028", + "internalRef": "331027363" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 231add23db82..f0e33f31c1de 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -237,7 +237,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -268,7 +269,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -316,7 +318,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -346,7 +349,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -377,7 +381,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -425,7 +430,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1352,7 +1358,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -1384,7 +1391,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -1439,7 +1447,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -1470,7 +1479,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -1543,7 +1553,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1575,7 +1586,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1630,7 +1642,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1661,7 +1674,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1930,7 +1944,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -1963,7 +1978,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -2013,7 +2029,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -2044,7 +2061,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2094,7 +2112,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( undefined, @@ -2140,7 +2159,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2179,7 +2199,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( undefined, @@ -2520,4 +2541,268 @@ describe('v1.CloudBuildClient', () => { ); }); }); + + describe('Path templates', () => { + describe('buildTrigger', () => { + const fakePath = '/rendered/path/buildTrigger'; + const expectedParameters = { + project: 'projectValue', + trigger: 'triggerValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.buildTriggerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.buildTriggerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('buildTriggerPath', () => { + const result = client.buildTriggerPath('projectValue', 'triggerValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.buildTriggerPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromBuildTriggerName', () => { + const result = client.matchProjectFromBuildTriggerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.buildTriggerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTriggerFromBuildTriggerName', () => { + const result = client.matchTriggerFromBuildTriggerName(fakePath); + assert.strictEqual(result, 'triggerValue'); + assert( + (client.pathTemplates.buildTriggerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('project', () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectBuild', () => { + const fakePath = '/rendered/path/projectBuild'; + const expectedParameters = { + project: 'projectValue', + build: 'buildValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectBuildPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectBuildPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectBuildPath', () => { + const result = client.projectBuildPath('projectValue', 'buildValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectBuildPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectBuildName', () => { + const result = client.matchProjectFromProjectBuildName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectBuildPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBuildFromProjectBuildName', () => { + const result = client.matchBuildFromProjectBuildName(fakePath); + assert.strictEqual(result, 'buildValue'); + assert( + (client.pathTemplates.projectBuildPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectLocationBuild', () => { + const fakePath = '/rendered/path/projectLocationBuild'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + build: 'buildValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationBuildPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationBuildPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationBuildPath', () => { + const result = client.projectLocationBuildPath( + 'projectValue', + 'locationValue', + 'buildValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectLocationBuildPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationBuildName', () => { + const result = client.matchProjectFromProjectLocationBuildName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationBuildName', () => { + const result = client.matchLocationFromProjectLocationBuildName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchBuildFromProjectLocationBuildName', () => { + const result = client.matchBuildFromProjectLocationBuildName(fakePath); + assert.strictEqual(result, 'buildValue'); + assert( + (client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('serviceAccount', () => { + const fakePath = '/rendered/path/serviceAccount'; + const expectedParameters = { + project: 'projectValue', + service_account: 'serviceAccountValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.serviceAccountPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.serviceAccountPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('serviceAccountPath', () => { + const result = client.serviceAccountPath( + 'projectValue', + 'serviceAccountValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.serviceAccountPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromServiceAccountName', () => { + const result = client.matchProjectFromServiceAccountName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchServiceAccountFromServiceAccountName', () => { + const result = client.matchServiceAccountFromServiceAccountName( + fakePath + ); + assert.strictEqual(result, 'serviceAccountValue'); + assert( + (client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); }); From ec95dccefb4d69cd6daaa46dcf190af517078f07 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 1 Oct 2020 05:03:15 -0700 Subject: [PATCH 115/223] chore: update bucket for cloud-rad (#169) Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com> Source-Author: F. Hinkelmann Source-Date: Wed Sep 30 14:13:57 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 079dcce498117f9570cebe6e6cff254b38ba3860 Source-Link: https://github.com/googleapis/synthtool/commit/079dcce498117f9570cebe6e6cff254b38ba3860 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 6e05fc68164f..40a10e12572d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "81332f008c25cdf869a40fe43865500e3ab0594e" + "sha": "b8d7a395bbcc2f6ff83b798ef678e2f27395802d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "fdd03c161003ab97657cc0218f25c82c89ddf4b6" + "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" } } ], From ad9002d213c47385310a2158efebdee38ce68f18 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 5 Oct 2020 10:42:21 -0700 Subject: [PATCH 116/223] build(node_library): migrate to Trampoline V2 (#170) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/5a972b54-1689-4186-80b6-fe1833110259/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9 --- packages/google-devtools-cloudbuild/synth.metadata | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 40a10e12572d..fc1e472b7086 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "b8d7a395bbcc2f6ff83b798ef678e2f27395802d" + "sha": "c8756118fbce8cd954d368c99fc9713016b2aa93" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "079dcce498117f9570cebe6e6cff254b38ba3860" + "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" } } ], @@ -75,10 +75,12 @@ ".kokoro/test.bat", ".kokoro/test.sh", ".kokoro/trampoline.sh", + ".kokoro/trampoline_v2.sh", ".mocharc.js", ".nycrc", ".prettierignore", ".prettierrc.js", + ".trampolinerc", "CODE_OF_CONDUCT.md", "CONTRIBUTING.md", "LICENSE", From f8c3cc6b4a243c58e17299fd983c4f41f0d9a970 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 16 Oct 2020 10:08:21 -0700 Subject: [PATCH 117/223] build: only check --engine-strict for production deps (#171) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/9b1f5306-e1f1-4834-baa7-c436ccd06c13/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/5451633881133e5573cc271a18e73b18caca8b1b --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index fc1e472b7086..c5b5041e610a 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "c8756118fbce8cd954d368c99fc9713016b2aa93" + "sha": "330535b80db80b254aacdc00fb736c1abf80cf0b" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "0c868d49b8e05bc1f299bc773df9eb4ef9ed96e9" + "sha": "5451633881133e5573cc271a18e73b18caca8b1b" } } ], From b31ddd3a98c08fb5d1cf0f15dce7bd00f143373d Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 21 Oct 2020 11:21:48 -0700 Subject: [PATCH 118/223] chore: clean up Node.js TOC for cloud-rad (#172) * chore: clean up Node.js TOC for cloud-rad Source-Author: F. Hinkelmann Source-Date: Wed Oct 21 09:26:04 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 Source-Link: https://github.com/googleapis/synthtool/commit/f96d3b455fe27c3dc7bc37c3c9cd27b1c6d269c8 * chore: fix Node.js TOC for cloud-rad Source-Author: F. Hinkelmann Source-Date: Wed Oct 21 12:01:24 2020 -0400 Source-Repo: googleapis/synthtool Source-Sha: 901ddd44e9ef7887ee681b9183bbdea99437fdcc Source-Link: https://github.com/googleapis/synthtool/commit/901ddd44e9ef7887ee681b9183bbdea99437fdcc --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index c5b5041e610a..663977719f6e 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "330535b80db80b254aacdc00fb736c1abf80cf0b" + "sha": "b0b228227086e8d5af82086c14a3f37913696c92" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "5451633881133e5573cc271a18e73b18caca8b1b" + "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" } } ], From 5c9133eebfe91717711a3b24e61ba26683f6ab23 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 27 Oct 2020 08:38:39 -0700 Subject: [PATCH 119/223] docs: updated code of conduct (includes update to actions) (#176) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1ba764cb-0d2b-415e-8df3-550cb9bd34aa/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/89c849ba5013e45e8fb688b138f33c2ec6083dc5 Source-Link: https://github.com/googleapis/synthtool/commit/a783321fd55f010709294455584a553f4b24b944 Source-Link: https://github.com/googleapis/synthtool/commit/b7413d38b763827c72c0360f0a3d286c84656eeb Source-Link: https://github.com/googleapis/synthtool/commit/5f6ef0ec5501d33c4667885b37a7685a30d41a76 --- .../CODE_OF_CONDUCT.md | 123 +++++++++++++----- .../google-devtools-cloudbuild/synth.metadata | 4 +- 2 files changed, 89 insertions(+), 38 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md b/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md index 46b2a08ea6d1..2add2547a812 100644 --- a/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md +++ b/packages/google-devtools-cloudbuild/CODE_OF_CONDUCT.md @@ -1,43 +1,94 @@ -# Contributor Code of Conduct + +# Code of Conduct -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. +## Our Pledge -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. +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 -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. +* 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. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) +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-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 663977719f6e..8bd8e61515af 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "b0b228227086e8d5af82086c14a3f37913696c92" + "sha": "a0704232697a890bae7d414aa3e6f055cc6e9a99" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "901ddd44e9ef7887ee681b9183bbdea99437fdcc" + "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" } } ], From 675b98bb15ba4fe29eee706946aa4477a6e6623a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 2 Nov 2020 13:40:08 -0800 Subject: [PATCH 120/223] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#177) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/bfc25924-7584-48c7-bead-23b659b9a9b8/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 8bd8e61515af..b5b65c983c7d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "a0704232697a890bae7d414aa3e6f055cc6e9a99" + "sha": "d8beda997a6dda21f2c52cb3f626c188dcbd979b" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "89c849ba5013e45e8fb688b138f33c2ec6083dc5" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From 4c61b50a7efe439c34f31a74522f350bc107aaaa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:38:04 +0000 Subject: [PATCH 121/223] chore: release 2.0.4 (#179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.3...v2.0.4) (2020-11-03) ### ⚠ BREAKING CHANGES * The WorkerPool API in the v1 surface has been long deprecated, so it has been deleted from the v1 surface. Alpha WorkerPool customers who want to call the WorkerPool API can use gcloud. ### Features * updated third_party Cloud Build clients with new Build message, fix: revert removal of WorkerPool API ([#166](https://www.github.com/googleapis/nodejs-cloudbuild/issues/166)) ([b8d7a39](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b8d7a395bbcc2f6ff83b798ef678e2f27395802d)) ### Bug Fixes * revert removal of WorkerPool API ([#178](https://www.github.com/googleapis/nodejs-cloudbuild/issues/178)) ([07400cb](https://www.github.com/googleapis/nodejs-cloudbuild/commit/07400cbcb05808762ab3c56c5827607cdefd43c0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 16 ++++++++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 25a9624cdd61..7d9c4161faaf 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +### [2.0.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.3...v2.0.4) (2020-11-03) + + +### ⚠ BREAKING CHANGES + +* The WorkerPool API in the v1 surface has been long deprecated, so it has been deleted from the v1 surface. Alpha WorkerPool customers who want to call the WorkerPool API can use gcloud. + +### Features + +* updated third_party Cloud Build clients with new Build message, fix: revert removal of WorkerPool API ([#166](https://www.github.com/googleapis/nodejs-cloudbuild/issues/166)) ([b8d7a39](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b8d7a395bbcc2f6ff83b798ef678e2f27395802d)) + + +### Bug Fixes + +* revert removal of WorkerPool API ([#178](https://www.github.com/googleapis/nodejs-cloudbuild/issues/178)) ([07400cb](https://www.github.com/googleapis/nodejs-cloudbuild/commit/07400cbcb05808762ab3c56c5827607cdefd43c0)) + ### [2.0.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.2...v2.0.3) (2020-07-24) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index f4df9e905668..e98171885746 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.3", + "version": "2.0.4", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index bdb44f05cd08..c9f148bf5e41 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.3" + "@google-cloud/cloudbuild": "^2.0.4" }, "devDependencies": { "c8": "^7.0.0", From 7d0e8772372afb912556523f6360a847317a0350 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 15:42:40 -0800 Subject: [PATCH 122/223] fix: do not modify options object, use defaultScopes (#181) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- .../google-devtools-cloudbuild/package.json | 2 +- .../google-devtools-cloudbuild/src/index.ts | 1 + .../src/v1/cloud_build_client.ts | 330 +++++++++++------- .../google-devtools-cloudbuild/synth.metadata | 16 +- .../system-test/fixtures/sample/src/index.ts | 9 +- .../system-test/install.ts | 18 +- 6 files changed, 225 insertions(+), 151 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index e98171885746..669befc1fdfe 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -65,6 +65,6 @@ "node": ">=10" }, "dependencies": { - "google-gax": "^2.1.0" + "google-gax": "^2.9.2" } } diff --git a/packages/google-devtools-cloudbuild/src/index.ts b/packages/google-devtools-cloudbuild/src/index.ts index ac851b099c54..878b23339290 100644 --- a/packages/google-devtools-cloudbuild/src/index.ts +++ b/packages/google-devtools-cloudbuild/src/index.ts @@ -19,6 +19,7 @@ import * as v1 from './v1'; const CloudBuildClient = v1.CloudBuildClient; +type CloudBuildClient = v1.CloudBuildClient; export {v1, CloudBuildClient}; export default {v1, CloudBuildClient}; diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 4aaf8a01b08c..c26760b8b8a6 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -69,8 +69,10 @@ export class CloudBuildClient { /** * Construct an instance of CloudBuildClient. * - * @param {object} [options] - The configuration object. See the subsequent - * parameters for more details. + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] * @param {string} [options.credentials.private_key] @@ -90,42 +92,33 @@ export class CloudBuildClient { * 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. + * TODO(@alexander-fenster): link to gax documentation. + * @param {boolean} fallback - Use HTTP fallback mode. + * In fallback mode, a special browser-compatible transport implementation is used + * instead of gRPC transport. In browser context (if the `window` object is defined) + * the fallback mode is enabled automatically; set `options.fallback` to `false` + * if you need to override this behavior. */ - constructor(opts?: ClientOptions) { - // Ensure that options include the service address and port. + // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof CloudBuildClient; const servicePath = - opts && opts.servicePath - ? opts.servicePath - : opts && opts.apiEndpoint - ? opts.apiEndpoint - : staticMembers.servicePath; - const port = opts && opts.port ? opts.port : staticMembers.port; + opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = opts?.fallback ?? typeof window !== 'undefined'; + opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); - if (!opts) { - opts = {servicePath, port}; + // 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; } - opts.servicePath = opts.servicePath || servicePath; - opts.port = opts.port || port; - - // users can override the config from client side, like retry codes name. - // The detailed structure of the clientConfig can be found here: https://github.com/googleapis/gax-nodejs/blob/master/src/gax.ts#L546 - // The way to override client config for Showcase API: - // - // const customConfig = {"interfaces": {"google.showcase.v1beta1.Echo": {"methods": {"Echo": {"retry_codes_name": "idempotent", "retry_params_name": "default"}}}}} - // const showcaseClient = new showcaseClient({ projectId, customConfig }); - opts.clientConfig = opts.clientConfig || {}; - // If we're running in browser, it's OK to omit `fallback` since - // google-gax has `browser` field in its `package.json`. - // For Electron (which does not respect `browser` field), - // pass `{fallback: true}` to the CloudBuildClient constructor. + // Choose either gRPC or proto-over-HTTP implementation of google-gax. this._gaxModule = opts.fallback ? gax.fallback : gax; - // Create a `gaxGrpc` object, with any grpc-specific options - // sent to the client. - opts.scopes = (this.constructor as typeof CloudBuildClient).scopes; + // 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. @@ -134,6 +127,11 @@ export class CloudBuildClient { // Save the auth object to the client, for use by other methods. this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; if (typeof process !== 'undefined' && 'versions' in process) { @@ -350,6 +348,7 @@ export class CloudBuildClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'cloudbuild.googleapis.com'; @@ -358,6 +357,7 @@ export class CloudBuildClient { /** * The DNS address for this API service - same as servicePath(), * exists for compatibility reasons. + * @returns {string} The DNS address for this service. */ static get apiEndpoint() { return 'cloudbuild.googleapis.com'; @@ -365,6 +365,7 @@ export class CloudBuildClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -373,6 +374,7 @@ export class CloudBuildClient { /** * 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']; @@ -382,8 +384,7 @@ export class CloudBuildClient { getProjectId(callback: Callback): void; /** * Return the project ID used by this class. - * @param {function(Error, string)} callback - the callback to - * be called with the current project Id. + * @returns {Promise} A promise that resolves to string containing the project ID. */ getProjectId( callback?: Callback @@ -444,7 +445,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.getBuild(request); */ getBuild( request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, @@ -536,7 +541,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.cancelBuild(request); */ cancelBuild( request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, @@ -632,7 +641,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.createBuildTrigger(request); */ createBuildTrigger( request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, @@ -727,7 +740,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.getBuildTrigger(request); */ getBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, @@ -822,7 +839,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.deleteBuildTrigger(request); */ deleteBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, @@ -922,7 +943,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.updateBuildTrigger(request); */ updateBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, @@ -1017,7 +1042,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.createWorkerPool(request); */ createWorkerPool( request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, @@ -1101,7 +1130,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.getWorkerPool(request); */ getWorkerPool( request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, @@ -1185,7 +1218,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.deleteWorkerPool(request); */ deleteWorkerPool( request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, @@ -1271,7 +1308,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.updateWorkerPool(request); */ updateWorkerPool( request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, @@ -1354,7 +1395,11 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * 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.listWorkerPools(request); */ listWorkerPools( request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, @@ -1449,8 +1494,15 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createBuild(request); + * const [response] = await operation.promise(); */ createBuild( request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, @@ -1503,18 +1555,19 @@ export class CloudBuildClient { return this.innerApiCalls.createBuild(request, options, callback); } /** - * Check the status of the long running operation returned by the createBuild() method. + * Check the status of the long running operation returned by `createBuild()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkCreateBuildProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkCreateBuildProgress( name: string @@ -1615,8 +1668,15 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.retryBuild(request); + * const [response] = await operation.promise(); */ retryBuild( request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, @@ -1669,18 +1729,19 @@ export class CloudBuildClient { return this.innerApiCalls.retryBuild(request, options, callback); } /** - * Check the status of the long running operation returned by the retryBuild() method. + * Check the status of the long running operation returned by `retryBuild()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkRetryBuildProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRetryBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkRetryBuildProgress( name: string @@ -1754,8 +1815,15 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.runBuildTrigger(request); + * const [response] = await operation.promise(); */ runBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, @@ -1807,18 +1875,19 @@ export class CloudBuildClient { return this.innerApiCalls.runBuildTrigger(request, options, callback); } /** - * Check the status of the long running operation returned by the runBuildTrigger() method. + * Check the status of the long running operation returned by `runBuildTrigger()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkRunBuildTriggerProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRunBuildTriggerProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkRunBuildTriggerProgress( name: string @@ -1896,19 +1965,14 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [Build]{@link google.devtools.cloudbuild.v1.Build}. - * The client library support auto-pagination by default: it will call the API as many + * 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [Build]{@link google.devtools.cloudbuild.v1.Build} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListBuildsRequest]{@link google.devtools.cloudbuild.v1.ListBuildsRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListBuildsResponse]{@link google.devtools.cloudbuild.v1.ListBuildsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listBuildsAsync()` + * 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. */ listBuilds( request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, @@ -1957,18 +2021,7 @@ export class CloudBuildClient { } /** - * Equivalent to {@link listBuilds}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listBuilds} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * 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 @@ -1986,6 +2039,13 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [Build]{@link google.devtools.cloudbuild.v1.Build} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBuildsAsync()` + * 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. */ listBuildsStream( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, @@ -2011,10 +2071,9 @@ export class CloudBuildClient { } /** - * Equivalent to {@link listBuilds}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listBuilds`, 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 @@ -2031,7 +2090,18 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Build]{@link google.devtools.cloudbuild.v1.Build}. The API will be called under the hood as needed, once per the page, + * 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.listBuildsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listBuildsAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, @@ -2104,19 +2174,14 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. * The first element of the array is Array of [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The client library support auto-pagination by default: it will call the API as many + * 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. - * - * When autoPaginate: false is specified through options, the array has three elements. - * The first element is Array of [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} that corresponds to - * the one page received from the API server. - * If the second element is not null it contains the request object of type [ListBuildTriggersRequest]{@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest} - * that can be used to obtain the next page of the results. - * If it is null, the next page does not exist. - * The third element contains the raw response received from the API server. Its type is - * [ListBuildTriggersResponse]{@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listBuildTriggersAsync()` + * 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. */ listBuildTriggers( request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, @@ -2164,18 +2229,7 @@ export class CloudBuildClient { } /** - * Equivalent to {@link listBuildTriggers}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listBuildTriggers} continuously - * and invokes the callback registered for 'data' event for each element in the - * responses. - * - * The returned object has 'end' method when no more elements are required. - * - * autoPaginate option will be ignored. - * - * @see {@link https://nodejs.org/api/stream.html} - * + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.projectId @@ -2188,6 +2242,13 @@ export class CloudBuildClient { * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} * An object stream which emits an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBuildTriggersAsync()` + * 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. */ listBuildTriggersStream( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, @@ -2212,10 +2273,9 @@ export class CloudBuildClient { } /** - * Equivalent to {@link listBuildTriggers}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listBuildTriggers`, 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.projectId @@ -2227,7 +2287,18 @@ export class CloudBuildClient { * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} - * An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols. + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. The API will be called under the hood as needed, once per the page, + * 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.listBuildTriggersAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listBuildTriggersAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, @@ -2450,9 +2521,10 @@ export class CloudBuildClient { } /** - * Terminate the GRPC channel and close the client. + * Terminate the gRPC channel and close the client. * * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { this.initialize(); diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index b5b65c983c7d..63816d3c1fd6 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,23 +3,15 @@ { "git": { "name": ".", - "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "d8beda997a6dda21f2c52cb3f626c188dcbd979b" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "bc18612d35891d88bcac57c85d79db93f4f29028", - "internalRef": "331027363" + "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", + "sha": "13186984ab8da50bdc04ecd7894b1cc2bb4cefa3" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -87,12 +79,14 @@ "README.md", "api-extractor.json", "linkinator.config.json", + "package-lock.json.1022933526", "protos/google/devtools/cloudbuild/v1/cloudbuild.proto", "protos/protos.d.ts", "protos/protos.js", "protos/protos.json", "renovate.json", "samples/README.md", + "samples/package-lock.json.3194863452", "src/index.ts", "src/v1/cloud_build_client.ts", "src/v1/cloud_build_client_config.json", diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts index f7a8fb06cead..664e51ea3637 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,15 @@ import {CloudBuildClient} from '@google-cloud/cloudbuild'; +// check that the client class type name can be used +function doStuffWithCloudBuildClient(client: CloudBuildClient) { + client.close(); +} + function main() { - new CloudBuildClient(); + // check that the client instance can be created + const cloudBuildClient = new CloudBuildClient(); + doStuffWithCloudBuildClient(cloudBuildClient); } main(); diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index 4c1ba3eb79af..39d90f771dea 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -20,32 +20,32 @@ import {packNTest} from 'pack-n-play'; import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; -describe('typescript consumer tests', () => { - it('should have correct type signature for typescript users', async function () { +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'TypeScript user can use the type definitions', ts: readFileSync( './system-test/fixtures/sample/src/index.ts' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); - it('should have correct type signature for javascript users', async function () { + it('JavaScript code', async function () { this.timeout(300000); const options = { - packageDir: process.cwd(), // path to your module. + packageDir: process.cwd(), sample: { - description: 'typescript based user can use the type definitions', + description: 'JavaScript user can use the library', ts: readFileSync( './system-test/fixtures/sample/src/index.js' ).toString(), }, }; - await packNTest(options); // will throw upon error. + await packNTest(options); }); }); From 84fea791af1f4b67ba521ef0534266b9a04dce36 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2020 09:33:11 -0800 Subject: [PATCH 123/223] chore: release 2.0.5 (#182) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 7d9c4161faaf..7184829381b6 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.5](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.4...v2.0.5) (2020-11-06) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#181](https://www.github.com/googleapis/nodejs-cloudbuild/issues/181)) ([c1a8c19](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c1a8c1948441cbc4643692f039c5a4ddbd178162)) + ### [2.0.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.3...v2.0.4) (2020-11-03) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 669befc1fdfe..4be174436dcf 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.4", + "version": "2.0.5", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index c9f148bf5e41..935f84bff90f 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.4" + "@google-cloud/cloudbuild": "^2.0.5" }, "devDependencies": { "c8": "^7.0.0", From 77ce344122662273fbab0c6ae8c896f7ac8573ef Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 19 Nov 2020 17:30:34 +0100 Subject: [PATCH 124/223] chore(deps): update dependency gts to v3 (#184) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 4be174436dcf..2e957416b49a 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -28,7 +28,7 @@ "@types/sinon": "^9.0.0", "c8": "^7.0.0", "chai": "^4.2.0", - "gts": "^2.0.0", + "gts": "^3.0.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", From d7d89a34dba7296b60ca1eb9ce91c21377616ba5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 23 Nov 2020 11:30:04 -0800 Subject: [PATCH 125/223] fix: check for fetch on window (#185) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/476ffeaa-089e-4134-85c9-ced1d9ce2cee/targets - [ ] To automatically regenerate this PR, check this box. --- .../protos/protos.json | 223 ++++++++++++++++-- .../src/v1/cloud_build_client.ts | 184 ++++++++------- .../google-devtools-cloudbuild/synth.metadata | 14 +- 3 files changed, 314 insertions(+), 107 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index f400c1805788..3547d6e25033 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -34,7 +34,28 @@ "(google.api.method_signature)": "project_id,build", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/builds", + "body": "build", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/builds", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,build" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Build", + "metadata_type": "BuildOperationMetadata" + } + } + ] }, "GetBuild": { "requestType": "GetBuildRequest", @@ -43,7 +64,20 @@ "(google.api.http).get": "/v1/projects/{project_id}/builds/{id}", "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/builds/*}", "(google.api.method_signature)": "project_id,id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/builds/{id}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/builds/*}" + } + } + }, + { + "(google.api.method_signature)": "project_id,id" + } + ] }, "ListBuilds": { "requestType": "ListBuildsRequest", @@ -52,7 +86,20 @@ "(google.api.http).get": "/v1/projects/{project_id}/builds", "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/builds", "(google.api.method_signature)": "project_id,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/builds", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/builds" + } + } + }, + { + "(google.api.method_signature)": "project_id,filter" + } + ] }, "CancelBuild": { "requestType": "CancelBuildRequest", @@ -63,7 +110,22 @@ "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/builds/*}:cancel", "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "project_id,id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/builds/{id}:cancel", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/builds/*}:cancel", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,id" + } + ] }, "RetryBuild": { "requestType": "RetryBuildRequest", @@ -76,7 +138,28 @@ "(google.api.method_signature)": "project_id,id", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/builds/{id}:retry", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/builds/*}:retry", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "project_id,id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Build", + "metadata_type": "BuildOperationMetadata" + } + } + ] }, "CreateBuildTrigger": { "requestType": "CreateBuildTriggerRequest", @@ -85,7 +168,18 @@ "(google.api.http).post": "/v1/projects/{project_id}/triggers", "(google.api.http).body": "trigger", "(google.api.method_signature)": "project_id,trigger" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/triggers", + "body": "trigger" + } + }, + { + "(google.api.method_signature)": "project_id,trigger" + } + ] }, "GetBuildTrigger": { "requestType": "GetBuildTriggerRequest", @@ -93,7 +187,17 @@ "options": { "(google.api.http).get": "/v1/projects/{project_id}/triggers/{trigger_id}", "(google.api.method_signature)": "project_id,trigger_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/triggers/{trigger_id}" + } + }, + { + "(google.api.method_signature)": "project_id,trigger_id" + } + ] }, "ListBuildTriggers": { "requestType": "ListBuildTriggersRequest", @@ -101,7 +205,17 @@ "options": { "(google.api.http).get": "/v1/projects/{project_id}/triggers", "(google.api.method_signature)": "project_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/projects/{project_id}/triggers" + } + }, + { + "(google.api.method_signature)": "project_id" + } + ] }, "DeleteBuildTrigger": { "requestType": "DeleteBuildTriggerRequest", @@ -109,7 +223,17 @@ "options": { "(google.api.http).delete": "/v1/projects/{project_id}/triggers/{trigger_id}", "(google.api.method_signature)": "project_id,trigger_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/projects/{project_id}/triggers/{trigger_id}" + } + }, + { + "(google.api.method_signature)": "project_id,trigger_id" + } + ] }, "UpdateBuildTrigger": { "requestType": "UpdateBuildTriggerRequest", @@ -118,7 +242,18 @@ "(google.api.http).patch": "/v1/projects/{project_id}/triggers/{trigger_id}", "(google.api.http).body": "trigger", "(google.api.method_signature)": "project_id,trigger_id,trigger" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/projects/{project_id}/triggers/{trigger_id}", + "body": "trigger" + } + }, + { + "(google.api.method_signature)": "project_id,trigger_id,trigger" + } + ] }, "RunBuildTrigger": { "requestType": "RunBuildTriggerRequest", @@ -129,7 +264,24 @@ "(google.api.method_signature)": "project_id,trigger_id,source", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/triggers/{trigger_id}:run", + "body": "source" + } + }, + { + "(google.api.method_signature)": "project_id,trigger_id,source" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Build", + "metadata_type": "BuildOperationMetadata" + } + } + ] }, "CreateWorkerPool": { "requestType": "CreateWorkerPoolRequest", @@ -2543,7 +2695,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations}", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] }, "GetOperation": { "requestType": "GetOperationRequest", @@ -2551,7 +2713,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteOperation": { "requestType": "DeleteOperationRequest", @@ -2559,7 +2731,17 @@ "options": { "(google.api.http).delete": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelOperation": { "requestType": "CancelOperationRequest", @@ -2568,7 +2750,18 @@ "(google.api.http).post": "/v1/{name=operations/**}:cancel", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "WaitOperation": { "requestType": "WaitOperationRequest", diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index c26760b8b8a6..778c822ac8a0 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -16,6 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** +/* global window */ import * as gax from 'google-gax'; import { Callback, @@ -31,6 +32,11 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +/** + * Client JSON configuration object, loaded from + * `src/v1/cloud_build_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './cloud_build_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -92,9 +98,9 @@ export class CloudBuildClient { * 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. - * TODO(@alexander-fenster): link to gax documentation. - * @param {boolean} fallback - Use HTTP fallback mode. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP fallback mode. * In fallback mode, a special browser-compatible transport implementation is used * instead of gRPC transport. In browser context (if the `window` object is defined) * the fallback mode is enabled automatically; set `options.fallback` to `false` @@ -107,7 +113,9 @@ export class CloudBuildClient { opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath; const port = opts?.port || staticMembers.port; const clientConfig = opts?.clientConfig ?? {}; - const fallback = opts?.fallback ?? typeof window !== 'undefined'; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. @@ -401,7 +409,7 @@ export class CloudBuildClient { // ------------------- getBuild( request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuild, @@ -411,7 +419,7 @@ export class CloudBuildClient { >; getBuild( request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IBuild, protos.google.devtools.cloudbuild.v1.IGetBuildRequest | null | undefined, @@ -454,7 +462,7 @@ export class CloudBuildClient { getBuild( request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IBuild, | protos.google.devtools.cloudbuild.v1.IGetBuildRequest @@ -475,12 +483,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -496,7 +504,7 @@ export class CloudBuildClient { } cancelBuild( request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuild, @@ -506,7 +514,7 @@ export class CloudBuildClient { >; cancelBuild( request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IBuild, | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest @@ -550,7 +558,7 @@ export class CloudBuildClient { cancelBuild( request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IBuild, | protos.google.devtools.cloudbuild.v1.ICancelBuildRequest @@ -573,12 +581,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -594,7 +602,7 @@ export class CloudBuildClient { } createBuildTrigger( request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuildTrigger, @@ -607,7 +615,7 @@ export class CloudBuildClient { >; createBuildTrigger( request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest @@ -650,7 +658,7 @@ export class CloudBuildClient { createBuildTrigger( request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest @@ -676,12 +684,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -696,7 +704,7 @@ export class CloudBuildClient { } getBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuildTrigger, @@ -706,7 +714,7 @@ export class CloudBuildClient { >; getBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest @@ -749,7 +757,7 @@ export class CloudBuildClient { getBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest @@ -772,12 +780,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -792,7 +800,7 @@ export class CloudBuildClient { } deleteBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -805,7 +813,7 @@ export class CloudBuildClient { >; deleteBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest @@ -848,7 +856,7 @@ export class CloudBuildClient { deleteBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest @@ -874,12 +882,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -894,7 +902,7 @@ export class CloudBuildClient { } updateBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuildTrigger, @@ -907,7 +915,7 @@ export class CloudBuildClient { >; updateBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest @@ -952,7 +960,7 @@ export class CloudBuildClient { updateBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IBuildTrigger, | protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest @@ -978,12 +986,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -998,7 +1006,7 @@ export class CloudBuildClient { } createWorkerPool( request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IWorkerPool, @@ -1008,7 +1016,7 @@ export class CloudBuildClient { >; createWorkerPool( request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest @@ -1051,7 +1059,7 @@ export class CloudBuildClient { createWorkerPool( request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest @@ -1074,12 +1082,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1087,7 +1095,7 @@ export class CloudBuildClient { } getWorkerPool( request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IWorkerPool, @@ -1097,7 +1105,7 @@ export class CloudBuildClient { >; getWorkerPool( request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest @@ -1139,7 +1147,7 @@ export class CloudBuildClient { getWorkerPool( request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest @@ -1162,12 +1170,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1175,7 +1183,7 @@ export class CloudBuildClient { } deleteWorkerPool( request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.protobuf.IEmpty, @@ -1185,7 +1193,7 @@ export class CloudBuildClient { >; deleteWorkerPool( request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.protobuf.IEmpty, | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest @@ -1227,7 +1235,7 @@ export class CloudBuildClient { deleteWorkerPool( request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.protobuf.IEmpty, | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest @@ -1250,12 +1258,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1263,7 +1271,7 @@ export class CloudBuildClient { } updateWorkerPool( request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IWorkerPool, @@ -1273,7 +1281,7 @@ export class CloudBuildClient { >; updateWorkerPool( request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest @@ -1317,7 +1325,7 @@ export class CloudBuildClient { updateWorkerPool( request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IWorkerPool, | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest @@ -1340,12 +1348,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1353,7 +1361,7 @@ export class CloudBuildClient { } listWorkerPools( request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, @@ -1363,7 +1371,7 @@ export class CloudBuildClient { >; listWorkerPools( request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest @@ -1404,7 +1412,7 @@ export class CloudBuildClient { listWorkerPools( request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest @@ -1427,12 +1435,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; this.initialize(); @@ -1441,7 +1449,7 @@ export class CloudBuildClient { createBuild( request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1454,7 +1462,7 @@ export class CloudBuildClient { >; createBuild( request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1507,7 +1515,7 @@ export class CloudBuildClient { createBuild( request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1535,12 +1543,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1593,7 +1601,7 @@ export class CloudBuildClient { } retryBuild( request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1606,7 +1614,7 @@ export class CloudBuildClient { >; retryBuild( request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1681,7 +1689,7 @@ export class CloudBuildClient { retryBuild( request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1709,12 +1717,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1767,7 +1775,7 @@ export class CloudBuildClient { } runBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1780,7 +1788,7 @@ export class CloudBuildClient { >; runBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1828,7 +1836,7 @@ export class CloudBuildClient { runBuildTrigger( request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.devtools.cloudbuild.v1.IBuild, @@ -1856,12 +1864,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1913,7 +1921,7 @@ export class CloudBuildClient { } listBuilds( request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuild[], @@ -1923,7 +1931,7 @@ export class CloudBuildClient { >; listBuilds( request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildsRequest, | protos.google.devtools.cloudbuild.v1.IListBuildsResponse @@ -1977,7 +1985,7 @@ export class CloudBuildClient { listBuilds( request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildsRequest, | protos.google.devtools.cloudbuild.v1.IListBuildsResponse @@ -2000,12 +2008,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2049,7 +2057,7 @@ export class CloudBuildClient { */ listBuildsStream( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2105,7 +2113,7 @@ export class CloudBuildClient { */ listBuildsAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2128,7 +2136,7 @@ export class CloudBuildClient { } listBuildTriggers( request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.devtools.cloudbuild.v1.IBuildTrigger[], @@ -2138,7 +2146,7 @@ export class CloudBuildClient { >; listBuildTriggers( request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse @@ -2186,7 +2194,7 @@ export class CloudBuildClient { listBuildTriggers( request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, | protos.google.devtools.cloudbuild.v1.IListBuildTriggersResponse @@ -2209,12 +2217,12 @@ export class CloudBuildClient { ] > | void { request = request || {}; - let options: gax.CallOptions; + let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; } else { - options = optionsOrCallback as gax.CallOptions; + options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2252,7 +2260,7 @@ export class CloudBuildClient { */ listBuildTriggersStream( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2302,7 +2310,7 @@ export class CloudBuildClient { */ listBuildTriggersAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 63816d3c1fd6..c5bbba1f342d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -3,8 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-cloudbuild.git", - "sha": "13186984ab8da50bdc04ecd7894b1cc2bb4cefa3" + "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", + "sha": "ee0ae5df4cf3e41b59d7be48da8ced268c15142f" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", + "internalRef": "343202295" } }, { @@ -79,14 +87,12 @@ "README.md", "api-extractor.json", "linkinator.config.json", - "package-lock.json.1022933526", "protos/google/devtools/cloudbuild/v1/cloudbuild.proto", "protos/protos.d.ts", "protos/protos.js", "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.3194863452", "src/index.ts", "src/v1/cloud_build_client.ts", "src/v1/cloud_build_client_config.json", From 35c5004053739ee90e386dd8ec86456573630fd8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 08:34:49 -0800 Subject: [PATCH 126/223] docs: spelling correction for "targetting" (#187) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4c7dd1d3-21d2-4d5c-80cf-c7fc00653dca/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/15013eff642a7e7e855aed5a29e6e83c39beba2a --- packages/google-devtools-cloudbuild/README.md | 2 +- .../google-devtools-cloudbuild/synth.metadata | 75 +------------------ 2 files changed, 3 insertions(+), 74 deletions(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index d24a8a5b3f24..f3d7290d834e 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -126,7 +126,7 @@ Our client libraries follow the [Node.js release schedule](https://nodejs.org/en Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. -Client libraries targetting some end-of-life versions of Node.js are available, and +Client libraries targeting some end-of-life versions of Node.js are available, and can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). The dist-tags follow the naming convention `legacy-(version)`. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index c5bbba1f342d..dea1c0cd112b 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "ee0ae5df4cf3e41b59d7be48da8ced268c15142f" + "sha": "115de7141262c119113759aee5ddc141d129b55d" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" } } ], @@ -33,76 +33,5 @@ "generator": "bazel" } } - ], - "generatedFiles": [ - ".eslintignore", - ".eslintrc.json", - ".gitattributes", - ".github/ISSUE_TEMPLATE/bug_report.md", - ".github/ISSUE_TEMPLATE/feature_request.md", - ".github/ISSUE_TEMPLATE/support_request.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/release-please.yml", - ".github/workflows/ci.yaml", - ".gitignore", - ".jsdoc.js", - ".kokoro/.gitattributes", - ".kokoro/common.cfg", - ".kokoro/continuous/node10/common.cfg", - ".kokoro/continuous/node10/docs.cfg", - ".kokoro/continuous/node10/test.cfg", - ".kokoro/continuous/node12/common.cfg", - ".kokoro/continuous/node12/lint.cfg", - ".kokoro/continuous/node12/samples-test.cfg", - ".kokoro/continuous/node12/system-test.cfg", - ".kokoro/continuous/node12/test.cfg", - ".kokoro/docs.sh", - ".kokoro/lint.sh", - ".kokoro/populate-secrets.sh", - ".kokoro/presubmit/node10/common.cfg", - ".kokoro/presubmit/node12/common.cfg", - ".kokoro/presubmit/node12/samples-test.cfg", - ".kokoro/presubmit/node12/system-test.cfg", - ".kokoro/presubmit/node12/test.cfg", - ".kokoro/publish.sh", - ".kokoro/release/docs-devsite.cfg", - ".kokoro/release/docs-devsite.sh", - ".kokoro/release/docs.cfg", - ".kokoro/release/docs.sh", - ".kokoro/release/publish.cfg", - ".kokoro/samples-test.sh", - ".kokoro/system-test.sh", - ".kokoro/test.bat", - ".kokoro/test.sh", - ".kokoro/trampoline.sh", - ".kokoro/trampoline_v2.sh", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - ".trampolinerc", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "README.md", - "api-extractor.json", - "linkinator.config.json", - "protos/google/devtools/cloudbuild/v1/cloudbuild.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1/cloud_build_client.ts", - "src/v1/cloud_build_client_config.json", - "src/v1/cloud_build_proto_list.json", - "src/v1/index.ts", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_cloud_build_v1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 68e3be09bb3ef5216c6c4e76df093f1dc6557c81 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Dec 2020 19:40:26 +0000 Subject: [PATCH 127/223] chore: release 2.0.6 (#186) :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.6](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.5...v2.0.6) (2020-11-25) ### Bug Fixes * check for fetch on window ([#185](https://www.github.com/googleapis/nodejs-cloudbuild/issues/185)) ([115de71](https://www.github.com/googleapis/nodejs-cloudbuild/commit/115de7141262c119113759aee5ddc141d129b55d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 7184829381b6..d9d6bb193171 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.6](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.5...v2.0.6) (2020-11-25) + + +### Bug Fixes + +* check for fetch on window ([#185](https://www.github.com/googleapis/nodejs-cloudbuild/issues/185)) ([115de71](https://www.github.com/googleapis/nodejs-cloudbuild/commit/115de7141262c119113759aee5ddc141d129b55d)) + ### [2.0.5](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.4...v2.0.5) (2020-11-06) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 2e957416b49a..37bbd9b37fef 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.5", + "version": "2.0.6", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 935f84bff90f..23ac8c051360 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.5" + "@google-cloud/cloudbuild": "^2.0.6" }, "devDependencies": { "c8": "^7.0.0", From 450abe989a4c33ac3d099ae7004fff9445317cbc Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:25 -0800 Subject: [PATCH 128/223] chore: generate GAPIC metadata JSON file (#188) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/4dafeee7-014d-47f6-a950-0e8b4e9c606e/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345596855 Source-Link: https://github.com/googleapis/googleapis/commit/d189e871205fea665a9648f7c4676f027495ccaf --- .../src/v1/gapic_metadata.json | 191 ++++++++++++++++++ .../google-devtools-cloudbuild/synth.metadata | 6 +- 2 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json diff --git a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json new file mode 100644 index 000000000000..2918f2968ea7 --- /dev/null +++ b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json @@ -0,0 +1,191 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.devtools.cloudbuild.v1", + "libraryPackage": "@google-cloud/cloudbuild", + "services": { + "CloudBuild": { + "clients": { + "grpc": { + "libraryClient": "CloudBuildClient", + "rpcs": { + "GetBuild": { + "methods": [ + "getBuild" + ] + }, + "CancelBuild": { + "methods": [ + "cancelBuild" + ] + }, + "CreateBuildTrigger": { + "methods": [ + "createBuildTrigger" + ] + }, + "GetBuildTrigger": { + "methods": [ + "getBuildTrigger" + ] + }, + "DeleteBuildTrigger": { + "methods": [ + "deleteBuildTrigger" + ] + }, + "UpdateBuildTrigger": { + "methods": [ + "updateBuildTrigger" + ] + }, + "CreateWorkerPool": { + "methods": [ + "createWorkerPool" + ] + }, + "GetWorkerPool": { + "methods": [ + "getWorkerPool" + ] + }, + "DeleteWorkerPool": { + "methods": [ + "deleteWorkerPool" + ] + }, + "UpdateWorkerPool": { + "methods": [ + "updateWorkerPool" + ] + }, + "ListWorkerPools": { + "methods": [ + "listWorkerPools" + ] + }, + "CreateBuild": { + "methods": [ + "createBuild" + ] + }, + "RetryBuild": { + "methods": [ + "retryBuild" + ] + }, + "RunBuildTrigger": { + "methods": [ + "runBuildTrigger" + ] + }, + "ListBuilds": { + "methods": [ + "listBuilds", + "listBuildsStream", + "listBuildsAsync" + ] + }, + "ListBuildTriggers": { + "methods": [ + "listBuildTriggers", + "listBuildTriggersStream", + "listBuildTriggersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CloudBuildClient", + "rpcs": { + "GetBuild": { + "methods": [ + "getBuild" + ] + }, + "CancelBuild": { + "methods": [ + "cancelBuild" + ] + }, + "CreateBuildTrigger": { + "methods": [ + "createBuildTrigger" + ] + }, + "GetBuildTrigger": { + "methods": [ + "getBuildTrigger" + ] + }, + "DeleteBuildTrigger": { + "methods": [ + "deleteBuildTrigger" + ] + }, + "UpdateBuildTrigger": { + "methods": [ + "updateBuildTrigger" + ] + }, + "CreateWorkerPool": { + "methods": [ + "createWorkerPool" + ] + }, + "GetWorkerPool": { + "methods": [ + "getWorkerPool" + ] + }, + "DeleteWorkerPool": { + "methods": [ + "deleteWorkerPool" + ] + }, + "UpdateWorkerPool": { + "methods": [ + "updateWorkerPool" + ] + }, + "ListWorkerPools": { + "methods": [ + "listWorkerPools" + ] + }, + "CreateBuild": { + "methods": [ + "createBuild" + ] + }, + "RetryBuild": { + "methods": [ + "retryBuild" + ] + }, + "RunBuildTrigger": { + "methods": [ + "runBuildTrigger" + ] + }, + "ListBuilds": { + "methods": [ + "listBuilds", + "listBuildsStream", + "listBuildsAsync" + ] + }, + "ListBuildTriggers": { + "methods": [ + "listBuildTriggers", + "listBuildTriggersStream", + "listBuildTriggersAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index dea1c0cd112b..24d000c497fd 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "115de7141262c119113759aee5ddc141d129b55d" + "sha": "81cb43656f495174b6c24d40999e1b23ccb2f947" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "2f019bf70bfe06f1e2af1b04011b0a2405190e43", - "internalRef": "343202295" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From 9cfdcc7c24652da8fe4f340abef0c98506c85dff Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:44:11 -0800 Subject: [PATCH 129/223] docs: add instructions for authenticating for system tests (#191) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cacd5a12-e156-415f-94a2-533984f6802a/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- .../google-devtools-cloudbuild/CONTRIBUTING.md | 15 +++++++++++++-- packages/google-devtools-cloudbuild/README.md | 3 +-- .../google-devtools-cloudbuild/synth.metadata | 4 ++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CONTRIBUTING.md b/packages/google-devtools-cloudbuild/CONTRIBUTING.md index f6c4cf010e34..8d259c5b9295 100644 --- a/packages/google-devtools-cloudbuild/CONTRIBUTING.md +++ b/packages/google-devtools-cloudbuild/CONTRIBUTING.md @@ -37,6 +37,15 @@ accept your pull requests. 1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling. 1. Submit a pull request. +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Cloud Build 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]. @@ -51,11 +60,9 @@ accept your pull requests. npm test # Run sample integration tests. - gcloud auth application-default login npm run samples-test # Run all system tests. - gcloud auth application-default login npm run system-test 1. Lint (and maybe fix) any changes: @@ -63,3 +70,7 @@ accept your pull requests. 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=cloudbuild.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index f3d7290d834e..114180a95518 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -107,8 +107,7 @@ async function quickstart( ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloudbuild/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloudbuild/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 24d000c497fd..95bdcd808db6 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "81cb43656f495174b6c24d40999e1b23ccb2f947" + "sha": "cad8486eddbab3ff89d992a9733bc4db12ccf610" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "15013eff642a7e7e855aed5a29e6e83c39beba2a" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 5238a6fbd69b64bab306fd97d4888a956a526869 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 19:30:20 -0800 Subject: [PATCH 130/223] chore: update dates (#194) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2be83204-9809-4d5a-be34-3de54e6e58cc/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 350388717 Source-Link: https://github.com/googleapis/googleapis/commit/dd1d2325b189d3bb69c4a6a802185cefbd8e592e --- packages/google-devtools-cloudbuild/.jsdoc.js | 4 +- .../devtools/cloudbuild/v1/cloudbuild.proto | 1 + .../protos/protos.d.ts | 14 +++- .../protos/protos.js | 80 ++++++++++++++++++- .../protos/protos.json | 14 +++- .../src/v1/cloud_build_client.ts | 2 +- .../src/v1/index.ts | 2 +- .../google-devtools-cloudbuild/synth.metadata | 6 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_cloud_build_v1.ts | 2 +- 12 files changed, 116 insertions(+), 15 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index 23f9f66e36bd..baff25d20b8b 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2020 Google LLC', + copyright: 'Copyright 2021 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/cloudbuild', diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index de8a1de3dcfe..689e87984b0a 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -26,6 +26,7 @@ import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; +option csharp_namespace = "Google.Cloud.CloudBuild.V1"; option go_package = "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild"; option java_multiple_files = true; option java_package = "com.google.cloudbuild.v1"; diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 8ac99b7f5206..de509fb9425d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -5635,6 +5635,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -5664,6 +5667,9 @@ export namespace google { /** 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 @@ -5743,6 +5749,12 @@ export namespace google { ORIGINALLY_SINGLE_PATTERN = 1, FUTURE_MULTI_PATTERN = 2 } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } /** Properties of a ResourceReference. */ diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 85e74bb07b7d..771edd97a75a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -14451,6 +14451,7 @@ * @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 */ /** @@ -14463,6 +14464,7 @@ */ 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) @@ -14517,6 +14519,14 @@ */ 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 @@ -14554,6 +14564,12 @@ 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; }; @@ -14608,6 +14624,16 @@ 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; @@ -14671,6 +14697,18 @@ 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; }; @@ -14715,6 +14753,23 @@ message.plural = String(object.plural); if (object.singular != null) message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; @@ -14731,8 +14786,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.pattern = []; + object.style = []; + } if (options.defaults) { object.type = ""; object.nameField = ""; @@ -14755,6 +14812,11 @@ object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } return object; }; @@ -14785,6 +14847,20 @@ 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; })(); diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 3547d6e25033..11e9bbe55904 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -8,6 +8,7 @@ "nested": { "v1": { "options": { + "csharp_namespace": "Google.Cloud.CloudBuild.V1", "go_package": "google.golang.org/genproto/googleapis/devtools/cloudbuild/v1;cloudbuild", "java_multiple_files": true, "java_package": "com.google.cloudbuild.v1", @@ -1697,6 +1698,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -1706,6 +1712,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -1725,7 +1737,7 @@ }, "protobuf": { "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "go_package": "google.golang.org/protobuf/types/descriptorpb", "java_package": "com.google.protobuf", "java_outer_classname": "DescriptorProtos", "csharp_namespace": "Google.Protobuf.Reflection", diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 778c822ac8a0..8ae460f6a027 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-devtools-cloudbuild/src/v1/index.ts b/packages/google-devtools-cloudbuild/src/v1/index.ts index 3313b92fe9a5..abc079495c8b 100644 --- a/packages/google-devtools-cloudbuild/src/v1/index.ts +++ b/packages/google-devtools-cloudbuild/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 95bdcd808db6..7a91dbde993c 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "cad8486eddbab3ff89d992a9733bc4db12ccf610" + "sha": "4af2a71a5b5bf995b869d4e6b29da81924bf0cab" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "dd1d2325b189d3bb69c4a6a802185cefbd8e592e", + "internalRef": "350388717" } }, { diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js index 74ebe459788c..f73fc138dce6 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts index 664e51ea3637..cf9f530e8005 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index 39d90f771dea..d2d61c0396fc 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index f0e33f31c1de..08420c3fb9fc 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. From e8f7a86473b7cd0d8e1dba82ad153692b8a7fc0f Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:40:13 -0800 Subject: [PATCH 131/223] refactor(nodejs): move build cop to flakybot (#197) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/0e11e365-f1b7-4b92-a9c3-48fa670eb1a0/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 7a91dbde993c..d780be1a0d06 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "4af2a71a5b5bf995b869d4e6b29da81924bf0cab" + "sha": "efc8fa0fa5e3d31f37f1ceb06e8e8801b367f744" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From ea83eb7f385124fdfc1f10c0247cca338a88727d Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Tue, 2 Feb 2021 15:55:52 -0800 Subject: [PATCH 132/223] chore: update CODEOWNERS config (#198) --- packages/google-devtools-cloudbuild/.repo-metadata.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index 77698d2f3d40..42da33015d28 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -9,5 +9,6 @@ "repo": "googleapis/nodejs-cloudbuild", "distribution_name": "@google-cloud/cloudbuild", "api_id": "cloudbuild.googleapis.com", - "requires_billing": true + "requires_billing": true, + "codeowner_team": "@googleapis/cicd" } From 0b8fd8c1cd33cad2f4a78fd95fd87fce36174d6c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 10:02:03 -0800 Subject: [PATCH 133/223] build: adds UNORDERED_LIST enum (#199) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/b97795fd-83e4-446d-82df-a81e380dba2c/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-devtools-cloudbuild/protos/protos.d.ts | 3 ++- packages/google-devtools-cloudbuild/protos/protos.js | 7 +++++++ packages/google-devtools-cloudbuild/protos/protos.json | 3 ++- packages/google-devtools-cloudbuild/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index de509fb9425d..cc6271c797a2 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -5612,7 +5612,8 @@ export namespace google { REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, - IMMUTABLE = 5 + IMMUTABLE = 5, + UNORDERED_LIST = 6 } /** Properties of a ResourceDescriptor. */ diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 771edd97a75a..1a6918ffcadd 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -14427,6 +14427,7 @@ * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -14436,6 +14437,7 @@ values[valuesById[3] = "OUTPUT_ONLY"] = 3; values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; return values; })(); @@ -20603,6 +20605,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -20703,6 +20706,10 @@ case 5: message[".google.api.fieldBehavior"][i] = 5; break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 11e9bbe55904..1c52e36a5406 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -1653,7 +1653,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index d780be1a0d06..99cbef0280c9 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "efc8fa0fa5e3d31f37f1ceb06e8e8801b367f744" + "sha": "9200e3f26cb5268caca6f171231ebdc1a57a3783" } }, { From 7cfd00022ac0b7065bddf8a387d4cf7830f96fec Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 4 Feb 2021 08:46:07 -0800 Subject: [PATCH 134/223] chore: use repo metadata to populate nodejs CODEOWNERS (#200) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/7dafd97e-012a-40d8-83de-75f08c081431/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/318e351e26ba65b2b3cfa3f61b3b64e3540c3525 --- packages/google-devtools-cloudbuild/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 99cbef0280c9..674916c7b4cc 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "9200e3f26cb5268caca6f171231ebdc1a57a3783" + "sha": "9b6306d70c8da87ac3c74314962d7955268b4b83" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" + "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" } } ], From 012e98857a4fbc93dd5fd2a0384244061b0e04ab Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:29 -0800 Subject: [PATCH 135/223] build: update gapic-generator-typescript to v1.2.10. (#201) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/462962a3-9240-4e8b-ac6c-093ca469e60b/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-devtools-cloudbuild/synth.metadata | 6 +++--- packages/google-devtools-cloudbuild/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 674916c7b4cc..68b3f437e87d 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "9b6306d70c8da87ac3c74314962d7955268b4b83" + "sha": "8f0b1e6220f66d8d2620f9647bf7d9765aab185e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "dd1d2325b189d3bb69c4a6a802185cefbd8e592e", - "internalRef": "350388717" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-devtools-cloudbuild/webpack.config.js b/packages/google-devtools-cloudbuild/webpack.config.js index 4ccaba44bd62..2760608e03da 100644 --- a/packages/google-devtools-cloudbuild/webpack.config.js +++ b/packages/google-devtools-cloudbuild/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. From 580715b9458b8d0c03f74c23f3292cb5221aa550 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:50:16 +0100 Subject: [PATCH 136/223] chore(deps): update dependency sinon to v10 (#203) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^9.0.1` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Renovate configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 37bbd9b37fef..179f9f10c6a0 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "linkinator": "^2.0.0", "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^9.0.1", + "sinon": "^10.0.0", "typescript": "^3.8.3", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 2333391ef028caa63c2fa8c460d66012622ad9df Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 30 Mar 2021 12:14:25 -0700 Subject: [PATCH 137/223] fix: Specify `build` as the body of a `CreateBuild` call. The Cloud Build API has always assumed this, but now we are actually specifying it. (#202) feat: Add `ReceiveTriggerWebhook` for webhooks activating specific triggers. feat: Add `SecretManager`-related resources and messages for corresponding integration. feat: Add `COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY` for corresponding comment control feat: Committer: @lozord PiperOrigin-RevId: 363244566 Source-Author: Google APIs Source-Date: Tue Mar 16 12:32:12 2021 -0700 Source-Repo: googleapis/googleapis Source-Sha: 913f5553d5ff5940cddd8245313136449b2a3571 Source-Link: https://github.com/googleapis/googleapis/commit/913f5553d5ff5940cddd8245313136449b2a3571 Co-authored-by: Megan O'Keefe <3137106+askmeegs@users.noreply.github.com> --- .../devtools/cloudbuild/v1/cloudbuild.proto | 136 +- .../protos/protos.d.ts | 616 +- .../protos/protos.js | 6707 ++++++++++------- .../protos/protos.json | 125 +- .../src/v1/cloud_build_client.ts | 268 +- .../src/v1/cloud_build_client_config.json | 4 + .../src/v1/gapic_metadata.json | 10 + .../google-devtools-cloudbuild/synth.metadata | 6 +- .../test/gapic_cloud_build_v1.ts | 257 + 9 files changed, 5481 insertions(+), 2648 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 689e87984b0a..b5a3c09d2486 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// 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. @@ -19,6 +19,7 @@ package google.devtools.cloudbuild.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/duration.proto"; @@ -40,6 +41,18 @@ option (google.api.resource_definition) = { type: "iam.googleapis.com/ServiceAccount" pattern: "projects/{project}/serviceAccounts/{service_account}" }; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/Secret" + pattern: "projects/{project}/secrets/{secret}" +}; +option (google.api.resource_definition) = { + type: "secretmanager.googleapis.com/SecretVersion" + pattern: "projects/{project}/secrets/{secret}/versions/{version}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKey" + pattern: "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}" +}; // Creates and manages builds on Google Cloud Platform. // @@ -65,7 +78,7 @@ service CloudBuild { body: "build" additional_bindings { post: "/v1/{parent=projects/*/locations/*}/builds" - body: "*" + body: "build" } }; option (google.api.method_signature) = "project_id,build"; @@ -223,6 +236,16 @@ service CloudBuild { }; } + // ReceiveTriggerWebhook [Experimental] is called when the API receives a + // webhook request targeted at a specific trigger. + rpc ReceiveTriggerWebhook(ReceiveTriggerWebhookRequest) + returns (ReceiveTriggerWebhookResponse) { + option (google.api.http) = { + post: "/v1/projects/{project_id}/triggers/{trigger}:webhook" + body: "body" + }; + } + // Creates a `WorkerPool` to run the builds, and returns the new worker pool. // // This API is experimental. @@ -274,8 +297,8 @@ message RunBuildTriggerRequest { // Required. ID of the trigger. string trigger_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Source to build against this trigger. - RepoSource source = 3 [(google.api.field_behavior) = REQUIRED]; + // Source to build against this trigger. + RepoSource source = 3; } // Location of the source in an archive file in Google Cloud Storage. @@ -302,7 +325,7 @@ message RepoSource { // project ID requesting the build is assumed. string project_id = 1; - // Required. Name of the Cloud Source Repository. + // Name of the Cloud Source Repository. string repo_name = 2; // A revision within the Cloud Source Repository must be specified in @@ -525,6 +548,7 @@ message ArtifactResult { // build is created: // // - $PROJECT_ID: the project ID of the build. +// - $PROJECT_NUMBER: the project number of the build. // - $BUILD_ID: the autogenerated ID of the build. // - $REPO_NAME: the source repository name specified by RepoSource. // - $BRANCH_NAME: the branch name specified by RepoSource. @@ -669,6 +693,10 @@ message Build { repeated string tags = 31; // Secrets to decrypt using Cloud Key Management Service. + // Note: Secret Manager is the recommended technique + // for managing sensitive data with Cloud Build. Use `available_secrets` to + // configure builds to access secrets from Secret Manager. For instructions, + // see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets repeated Secret secrets = 32; // Output only. Stores timing information for phases of the build. Valid keys @@ -686,10 +714,13 @@ message Build { // Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. // ACCOUNT can be email address or uniqueId of the service account. // - // This field is in alpha and is not publicly available. + // This field is in beta. string service_account = 42 [(google.api.resource_reference) = { type: "iam.googleapis.com/ServiceAccount" }]; + + // Secrets and secret environment variables. + Secrets available_secrets = 47; } // Artifacts produced by a build that should be uploaded upon @@ -806,8 +837,53 @@ message Hash { bytes value = 2; } +// Secrets and secret environment variables. +message Secrets { + // Secrets in Secret Manager and associated secret environment variable. + repeated SecretManagerSecret secret_manager = 1; + + // Secrets encrypted with KMS key and the associated secret environment + // variable. + repeated InlineSecret inline = 2; +} + +// Pairs a set of secret environment variables mapped to encrypted +// values with the Cloud KMS key to use to decrypt the value. +message InlineSecret { + // Resource name of Cloud KMS crypto key to decrypt the encrypted value. + // In format: projects/*/locations/*/keyRings/*/cryptoKeys/* + string kms_key_name = 1 [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKey" + }]; + + // Map of environment variable name to its encrypted value. + // + // Secret environment variables must be unique across all of a build's + // secrets, and must be used by at least one build step. Values can be at most + // 64 KB in size. There can be at most 100 secret values across all of a + // build's secrets. + map env_map = 2; +} + +// Pairs a secret environment variable with a SecretVersion in Secret Manager. +message SecretManagerSecret { + // Resource name of the SecretVersion. In format: + // projects/*/secrets/*/versions/* + string version_name = 1 [(google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + }]; + + // Environment variable name to associate with the secret. + // Secret environment variables must be unique across all of a build's + // secrets, and must be used by at least one build step. + string env = 2; +} + // Pairs a set of secret environment variables containing encrypted // values with the Cloud KMS key to use to decrypt the value. +// Note: Use `kmsKeyName` with `available_secrets` instead of using +// `kmsKeyName` with `secret`. For instructions see: +// https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. message Secret { // Cloud KMS key name to use to decrypt these envs. string kms_key_name = 1; @@ -865,7 +941,15 @@ message ListBuildsRequest { // Number of results to return in the list. int32 page_size = 2; - // Token to provide to skip to a particular spot in the list. + // The page token for the next page of Builds. + // + // If unspecified, the first page of results is returned. + // + // If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + // In this case, the token should be discarded, and pagination should be + // restarted from the first page of results. + // + // See https://google.aip.dev/158 for more. string page_token = 3; // The raw filter text to constrain the results. @@ -878,12 +962,13 @@ message ListBuildsResponse { repeated Build builds = 1; // Token to receive the next page of results. + // This will be absent if the end of the response list has been reached. string next_page_token = 2; } // Request to cancel an ongoing build. message CancelBuildRequest { - // The name of the `Build` to retrieve. + // The name of the `Build` to cancel. // Format: `projects/{project}/locations/{location}/builds/{build}` string name = 4 [(google.api.resource_reference) = { type: "cloudbuild.googleapis.com/Build" @@ -941,8 +1026,8 @@ message BuildTrigger { // Contents of the build template. Build build = 4; - // Path, from the source root, to a file whose contents is used for the - // template. + // Path, from the source root, to the build configuration file + // (i.e. cloudbuild.yaml). string filename = 8; } @@ -1018,6 +1103,10 @@ message PullRequestFilter { // Enforce that repository owners or collaborators must comment on Pull // Requests before builds are triggered. COMMENTS_ENABLED = 1; + + // Enforce that repository owners or collaborators must comment on external + // contributors' Pull Requests before builds are triggered. + COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2; } // Target refs to match. @@ -1144,6 +1233,12 @@ message BuildOptions { // Highcpu machine with 32 CPUs. N1_HIGHCPU_32 = 2; + + // Highcpu e2 machine with 8 CPUs. + E2_HIGHCPU_8 = 5; + + // Highcpu e2 machine with 32 CPUs. + E2_HIGHCPU_32 = 6; } // Specifies the behavior when there is an error in the substitution checks. @@ -1190,7 +1285,6 @@ message BuildOptions { CLOUD_LOGGING_ONLY = 5; // Turn off all logging. No build logs will be captured. - // Next ID: 6 NONE = 4; } @@ -1265,6 +1359,26 @@ message BuildOptions { repeated Volume volumes = 14; } +// ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by +// the ReceiveTriggerWebhook method. +message ReceiveTriggerWebhookRequest { + // HTTP request body. + google.api.HttpBody body = 1; + + // Project in which the specified trigger lives + string project_id = 2; + + // Name of the trigger to run the payload against + string trigger = 3; + + // Secret token used for authorization if an OAuth token isn't provided. + string secret = 4; +} + +// ReceiveTriggerWebhookResponse [Experimental] is the response object for the +// ReceiveTriggerWebhook method. +message ReceiveTriggerWebhookResponse {} + // Configuration for a WorkerPool to run the builds. // // Workers are machines that Cloud Build uses to run your builds. By default, diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index cc6271c797a2..e03d94b01d80 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -200,6 +200,20 @@ export namespace google { */ public runBuildTrigger(request: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest): Promise; + /** + * Calls ReceiveTriggerWebhook. + * @param request ReceiveTriggerWebhookRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReceiveTriggerWebhookResponse + */ + public receiveTriggerWebhook(request: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhookCallback): void; + + /** + * Calls ReceiveTriggerWebhook. + * @param request ReceiveTriggerWebhookRequest message or plain object + * @returns Promise + */ + public receiveTriggerWebhook(request: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest): Promise; + /** * Calls CreateWorkerPool. * @param request CreateWorkerPoolRequest message or plain object @@ -350,6 +364,13 @@ export namespace google { */ type RunBuildTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#receiveTriggerWebhook}. + * @param error Error, if any + * @param [response] ReceiveTriggerWebhookResponse + */ + type ReceiveTriggerWebhookCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse) => void; + /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. * @param error Error, if any @@ -1579,6 +1600,9 @@ export namespace google { /** Build serviceAccount */ serviceAccount?: (string|null); + + /** Build availableSecrets */ + availableSecrets?: (google.devtools.cloudbuild.v1.ISecrets|null); } /** Represents a Build. */ @@ -1665,6 +1689,9 @@ export namespace google { /** Build serviceAccount. */ public serviceAccount: string; + /** Build availableSecrets. */ + public availableSecrets?: (google.devtools.cloudbuild.v1.ISecrets|null); + /** * Creates a new Build instance using the specified properties. * @param [properties] Properties to set @@ -2437,6 +2464,294 @@ export namespace google { } } + /** Properties of a Secrets. */ + interface ISecrets { + + /** Secrets secretManager */ + secretManager?: (google.devtools.cloudbuild.v1.ISecretManagerSecret[]|null); + + /** Secrets inline */ + inline?: (google.devtools.cloudbuild.v1.IInlineSecret[]|null); + } + + /** Represents a Secrets. */ + class Secrets implements ISecrets { + + /** + * Constructs a new Secrets. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ISecrets); + + /** Secrets secretManager. */ + public secretManager: google.devtools.cloudbuild.v1.ISecretManagerSecret[]; + + /** Secrets inline. */ + public inline: google.devtools.cloudbuild.v1.IInlineSecret[]; + + /** + * Creates a new Secrets instance using the specified properties. + * @param [properties] Properties to set + * @returns Secrets instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ISecrets): google.devtools.cloudbuild.v1.Secrets; + + /** + * Encodes the specified Secrets message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secrets.verify|verify} messages. + * @param message Secrets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ISecrets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Secrets message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secrets.verify|verify} messages. + * @param message Secrets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ISecrets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Secrets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Secrets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Secrets; + + /** + * Decodes a Secrets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Secrets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Secrets; + + /** + * Verifies a Secrets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Secrets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Secrets + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Secrets; + + /** + * Creates a plain object from a Secrets message. Also converts values to other types if specified. + * @param message Secrets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Secrets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Secrets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an InlineSecret. */ + interface IInlineSecret { + + /** InlineSecret kmsKeyName */ + kmsKeyName?: (string|null); + + /** InlineSecret envMap */ + envMap?: ({ [k: string]: Uint8Array }|null); + } + + /** Represents an InlineSecret. */ + class InlineSecret implements IInlineSecret { + + /** + * Constructs a new InlineSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IInlineSecret); + + /** InlineSecret kmsKeyName. */ + public kmsKeyName: string; + + /** InlineSecret envMap. */ + public envMap: { [k: string]: Uint8Array }; + + /** + * Creates a new InlineSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns InlineSecret instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IInlineSecret): google.devtools.cloudbuild.v1.InlineSecret; + + /** + * Encodes the specified InlineSecret message. Does not implicitly {@link google.devtools.cloudbuild.v1.InlineSecret.verify|verify} messages. + * @param message InlineSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IInlineSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InlineSecret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.InlineSecret.verify|verify} messages. + * @param message InlineSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IInlineSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InlineSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InlineSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.InlineSecret; + + /** + * Decodes an InlineSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InlineSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.InlineSecret; + + /** + * Verifies an InlineSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InlineSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InlineSecret + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.InlineSecret; + + /** + * Creates a plain object from an InlineSecret message. Also converts values to other types if specified. + * @param message InlineSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.InlineSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InlineSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SecretManagerSecret. */ + interface ISecretManagerSecret { + + /** SecretManagerSecret versionName */ + versionName?: (string|null); + + /** SecretManagerSecret env */ + env?: (string|null); + } + + /** Represents a SecretManagerSecret. */ + class SecretManagerSecret implements ISecretManagerSecret { + + /** + * Constructs a new SecretManagerSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ISecretManagerSecret); + + /** SecretManagerSecret versionName. */ + public versionName: string; + + /** SecretManagerSecret env. */ + public env: string; + + /** + * Creates a new SecretManagerSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerSecret instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ISecretManagerSecret): google.devtools.cloudbuild.v1.SecretManagerSecret; + + /** + * Encodes the specified SecretManagerSecret message. Does not implicitly {@link google.devtools.cloudbuild.v1.SecretManagerSecret.verify|verify} messages. + * @param message SecretManagerSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ISecretManagerSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerSecret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.SecretManagerSecret.verify|verify} messages. + * @param message SecretManagerSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ISecretManagerSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretManagerSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.SecretManagerSecret; + + /** + * Decodes a SecretManagerSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretManagerSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.SecretManagerSecret; + + /** + * Verifies a SecretManagerSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretManagerSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretManagerSecret + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.SecretManagerSecret; + + /** + * Creates a plain object from a SecretManagerSecret message. Also converts values to other types if specified. + * @param message SecretManagerSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.SecretManagerSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretManagerSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Secret. */ interface ISecret { @@ -3441,7 +3756,8 @@ export namespace google { /** CommentControl enum. */ enum CommentControl { COMMENTS_DISABLED = 0, - COMMENTS_ENABLED = 1 + COMMENTS_ENABLED = 1, + COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY = 2 } } @@ -4306,7 +4622,9 @@ export namespace google { enum MachineType { UNSPECIFIED = 0, N1_HIGHCPU_8 = 1, - N1_HIGHCPU_32 = 2 + N1_HIGHCPU_32 = 2, + E2_HIGHCPU_8 = 5, + E2_HIGHCPU_32 = 6 } /** SubstitutionOption enum. */ @@ -4333,6 +4651,198 @@ export namespace google { } } + /** Properties of a ReceiveTriggerWebhookRequest. */ + interface IReceiveTriggerWebhookRequest { + + /** ReceiveTriggerWebhookRequest body */ + body?: (google.api.IHttpBody|null); + + /** ReceiveTriggerWebhookRequest projectId */ + projectId?: (string|null); + + /** ReceiveTriggerWebhookRequest trigger */ + trigger?: (string|null); + + /** ReceiveTriggerWebhookRequest secret */ + secret?: (string|null); + } + + /** Represents a ReceiveTriggerWebhookRequest. */ + class ReceiveTriggerWebhookRequest implements IReceiveTriggerWebhookRequest { + + /** + * Constructs a new ReceiveTriggerWebhookRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest); + + /** ReceiveTriggerWebhookRequest body. */ + public body?: (google.api.IHttpBody|null); + + /** ReceiveTriggerWebhookRequest projectId. */ + public projectId: string; + + /** ReceiveTriggerWebhookRequest trigger. */ + public trigger: string; + + /** ReceiveTriggerWebhookRequest secret. */ + public secret: string; + + /** + * Creates a new ReceiveTriggerWebhookRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveTriggerWebhookRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest; + + /** + * Encodes the specified ReceiveTriggerWebhookRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.verify|verify} messages. + * @param message ReceiveTriggerWebhookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveTriggerWebhookRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.verify|verify} messages. + * @param message ReceiveTriggerWebhookRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveTriggerWebhookRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveTriggerWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest; + + /** + * Decodes a ReceiveTriggerWebhookRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveTriggerWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest; + + /** + * Verifies a ReceiveTriggerWebhookRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveTriggerWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveTriggerWebhookRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest; + + /** + * Creates a plain object from a ReceiveTriggerWebhookRequest message. Also converts values to other types if specified. + * @param message ReceiveTriggerWebhookRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveTriggerWebhookRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReceiveTriggerWebhookResponse. */ + interface IReceiveTriggerWebhookResponse { + } + + /** Represents a ReceiveTriggerWebhookResponse. */ + class ReceiveTriggerWebhookResponse implements IReceiveTriggerWebhookResponse { + + /** + * Constructs a new ReceiveTriggerWebhookResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse); + + /** + * Creates a new ReceiveTriggerWebhookResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReceiveTriggerWebhookResponse instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse; + + /** + * Encodes the specified ReceiveTriggerWebhookResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse.verify|verify} messages. + * @param message ReceiveTriggerWebhookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReceiveTriggerWebhookResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse.verify|verify} messages. + * @param message ReceiveTriggerWebhookResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReceiveTriggerWebhookResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReceiveTriggerWebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse; + + /** + * Decodes a ReceiveTriggerWebhookResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReceiveTriggerWebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse; + + /** + * Verifies a ReceiveTriggerWebhookResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReceiveTriggerWebhookResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReceiveTriggerWebhookResponse + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse; + + /** + * Creates a plain object from a ReceiveTriggerWebhookResponse message. Also converts values to other types if specified. + * @param message ReceiveTriggerWebhookResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReceiveTriggerWebhookResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a WorkerPool. */ interface IWorkerPool { @@ -5616,6 +6126,108 @@ export namespace google { UNORDERED_LIST = 6 } + /** Properties of a HttpBody. */ + interface IHttpBody { + + /** HttpBody contentType */ + contentType?: (string|null); + + /** HttpBody data */ + data?: (Uint8Array|string|null); + + /** HttpBody extensions */ + extensions?: (google.protobuf.IAny[]|null); + } + + /** Represents a HttpBody. */ + class HttpBody implements IHttpBody { + + /** + * Constructs a new HttpBody. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpBody); + + /** HttpBody contentType. */ + public contentType: string; + + /** HttpBody data. */ + public data: (Uint8Array|string); + + /** HttpBody extensions. */ + public extensions: google.protobuf.IAny[]; + + /** + * Creates a new HttpBody instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpBody instance + */ + public static create(properties?: google.api.IHttpBody): google.api.HttpBody; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpBody + * @throws {Error} If the payload is not 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.HttpBody; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpBody + * @throws {Error} If the payload 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.HttpBody; + + /** + * Verifies a HttpBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpBody + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpBody; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @param message HttpBody + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpBody to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 1a6918ffcadd..033032535d2e 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -461,6 +461,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#receiveTriggerWebhook}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef ReceiveTriggerWebhookCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} [response] ReceiveTriggerWebhookResponse + */ + + /** + * Calls ReceiveTriggerWebhook. + * @function receiveTriggerWebhook + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest} request ReceiveTriggerWebhookRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhookCallback} callback Node-style callback called with the error, if any, and ReceiveTriggerWebhookResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.receiveTriggerWebhook = function receiveTriggerWebhook(request, callback) { + return this.rpcCall(receiveTriggerWebhook, $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest, $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse, request, callback); + }, "name", { value: "ReceiveTriggerWebhook" }); + + /** + * Calls ReceiveTriggerWebhook. + * @function receiveTriggerWebhook + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest} request ReceiveTriggerWebhookRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. * @memberof google.devtools.cloudbuild.v1.CloudBuild @@ -3684,6 +3717,7 @@ * @property {Array.|null} [secrets] Build secrets * @property {Object.|null} [timing] Build timing * @property {string|null} [serviceAccount] Build serviceAccount + * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets */ /** @@ -3907,6 +3941,14 @@ */ Build.prototype.serviceAccount = ""; + /** + * Build availableSecrets. + * @member {google.devtools.cloudbuild.v1.ISecrets|null|undefined} availableSecrets + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.availableSecrets = null; + /** * Creates a new Build instance using the specified properties. * @function create @@ -3989,6 +4031,8 @@ writer.uint32(/* id 42, wireType 2 =*/338).string(message.serviceAccount); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); + if (message.availableSecrets != null && Object.hasOwnProperty.call(message, "availableSecrets")) + $root.google.devtools.cloudbuild.v1.Secrets.encode(message.availableSecrets, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); return writer; }; @@ -4144,6 +4188,9 @@ case 42: message.serviceAccount = reader.string(); break; + case 47: + message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4318,6 +4365,11 @@ if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) if (!$util.isString(message.serviceAccount)) return "serviceAccount: string expected"; + if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) { + var error = $root.google.devtools.cloudbuild.v1.Secrets.verify(message.availableSecrets); + if (error) + return "availableSecrets." + error; + } return null; }; @@ -4488,6 +4540,11 @@ } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); + if (object.availableSecrets != null) { + if (typeof object.availableSecrets !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.availableSecrets: object expected"); + message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.fromObject(object.availableSecrets); + } return message; }; @@ -4534,6 +4591,7 @@ object.queueTtl = null; object.serviceAccount = ""; object.name = ""; + object.availableSecrets = null; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -4604,6 +4662,8 @@ object.serviceAccount = message.serviceAccount; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) + object.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.toObject(message.availableSecrets, options); return object; }; @@ -6292,26 +6352,27 @@ return Hash; })(); - v1.Secret = (function() { + v1.Secrets = (function() { /** - * Properties of a Secret. + * Properties of a Secrets. * @memberof google.devtools.cloudbuild.v1 - * @interface ISecret - * @property {string|null} [kmsKeyName] Secret kmsKeyName - * @property {Object.|null} [secretEnv] Secret secretEnv + * @interface ISecrets + * @property {Array.|null} [secretManager] Secrets secretManager + * @property {Array.|null} [inline] Secrets inline */ /** - * Constructs a new Secret. + * Constructs a new Secrets. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a Secret. - * @implements ISecret + * @classdesc Represents a Secrets. + * @implements ISecrets * @constructor - * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ISecrets=} [properties] Properties to set */ - function Secret(properties) { - this.secretEnv = {}; + function Secrets(properties) { + this.secretManager = []; + this.inline = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6319,108 +6380,94 @@ } /** - * Secret kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.devtools.cloudbuild.v1.Secret + * Secrets secretManager. + * @member {Array.} secretManager + * @memberof google.devtools.cloudbuild.v1.Secrets * @instance */ - Secret.prototype.kmsKeyName = ""; + Secrets.prototype.secretManager = $util.emptyArray; /** - * Secret secretEnv. - * @member {Object.} secretEnv - * @memberof google.devtools.cloudbuild.v1.Secret + * Secrets inline. + * @member {Array.} inline + * @memberof google.devtools.cloudbuild.v1.Secrets * @instance */ - Secret.prototype.secretEnv = $util.emptyObject; + Secrets.prototype.inline = $util.emptyArray; /** - * Creates a new Secret instance using the specified properties. + * Creates a new Secrets instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static - * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Secret} Secret instance + * @param {google.devtools.cloudbuild.v1.ISecrets=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Secrets} Secrets instance */ - Secret.create = function create(properties) { - return new Secret(properties); + Secrets.create = function create(properties) { + return new Secrets(properties); }; /** - * Encodes the specified Secret message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * Encodes the specified Secrets message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secrets.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static - * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecrets} message Secrets message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Secret.encode = function encode(message, writer) { + Secrets.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - if (message.secretEnv != null && Object.hasOwnProperty.call(message, "secretEnv")) - for (var keys = Object.keys(message.secretEnv), 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).bytes(message.secretEnv[keys[i]]).ldelim(); + if (message.secretManager != null && message.secretManager.length) + for (var i = 0; i < message.secretManager.length; ++i) + $root.google.devtools.cloudbuild.v1.SecretManagerSecret.encode(message.secretManager[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.inline != null && message.inline.length) + for (var i = 0; i < message.inline.length; ++i) + $root.google.devtools.cloudbuild.v1.InlineSecret.encode(message.inline[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. + * Encodes the specified Secrets message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secrets.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static - * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecrets} message Secrets message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Secret.encodeDelimited = function encodeDelimited(message, writer) { + Secrets.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Secret message from the specified reader or buffer. + * Decodes a Secrets message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Secret} Secret + * @returns {google.devtools.cloudbuild.v1.Secrets} Secrets * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Secret.decode = function decode(reader, length) { + Secrets.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secret(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secrets(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.kmsKeyName = reader.string(); + if (!(message.secretManager && message.secretManager.length)) + message.secretManager = []; + message.secretManager.push($root.google.devtools.cloudbuild.v1.SecretManagerSecret.decode(reader, reader.uint32())); break; - case 3: - if (message.secretEnv === $util.emptyObject) - message.secretEnv = {}; - 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.bytes(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.secretEnv[key] = value; + case 2: + if (!(message.inline && message.inline.length)) + message.inline = []; + message.inline.push($root.google.devtools.cloudbuild.v1.InlineSecret.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -6431,135 +6478,152 @@ }; /** - * Decodes a Secret message from the specified reader or buffer, length delimited. + * Decodes a Secrets message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Secret} Secret + * @returns {google.devtools.cloudbuild.v1.Secrets} Secrets * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Secret.decodeDelimited = function decodeDelimited(reader) { + Secrets.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Secret message. + * Verifies a Secrets message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Secret.verify = function verify(message) { + Secrets.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { - if (!$util.isObject(message.secretEnv)) - return "secretEnv: object expected"; - var key = Object.keys(message.secretEnv); - for (var i = 0; i < key.length; ++i) - if (!(message.secretEnv[key[i]] && typeof message.secretEnv[key[i]].length === "number" || $util.isString(message.secretEnv[key[i]]))) - return "secretEnv: buffer{k:string} expected"; + if (message.secretManager != null && message.hasOwnProperty("secretManager")) { + if (!Array.isArray(message.secretManager)) + return "secretManager: array expected"; + for (var i = 0; i < message.secretManager.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.SecretManagerSecret.verify(message.secretManager[i]); + if (error) + return "secretManager." + error; + } + } + if (message.inline != null && message.hasOwnProperty("inline")) { + if (!Array.isArray(message.inline)) + return "inline: array expected"; + for (var i = 0; i < message.inline.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.InlineSecret.verify(message.inline[i]); + if (error) + return "inline." + error; + } } return null; }; /** - * Creates a Secret message from a plain object. Also converts values to their respective internal types. + * Creates a Secrets message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Secret} Secret + * @returns {google.devtools.cloudbuild.v1.Secrets} Secrets */ - Secret.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Secret) + Secrets.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Secrets) return object; - var message = new $root.google.devtools.cloudbuild.v1.Secret(); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.secretEnv) { - if (typeof object.secretEnv !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Secret.secretEnv: object expected"); - message.secretEnv = {}; - for (var keys = Object.keys(object.secretEnv), i = 0; i < keys.length; ++i) - if (typeof object.secretEnv[keys[i]] === "string") - $util.base64.decode(object.secretEnv[keys[i]], message.secretEnv[keys[i]] = $util.newBuffer($util.base64.length(object.secretEnv[keys[i]])), 0); - else if (object.secretEnv[keys[i]].length) - message.secretEnv[keys[i]] = object.secretEnv[keys[i]]; + var message = new $root.google.devtools.cloudbuild.v1.Secrets(); + if (object.secretManager) { + if (!Array.isArray(object.secretManager)) + throw TypeError(".google.devtools.cloudbuild.v1.Secrets.secretManager: array expected"); + message.secretManager = []; + for (var i = 0; i < object.secretManager.length; ++i) { + if (typeof object.secretManager[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Secrets.secretManager: object expected"); + message.secretManager[i] = $root.google.devtools.cloudbuild.v1.SecretManagerSecret.fromObject(object.secretManager[i]); + } + } + if (object.inline) { + if (!Array.isArray(object.inline)) + throw TypeError(".google.devtools.cloudbuild.v1.Secrets.inline: array expected"); + message.inline = []; + for (var i = 0; i < object.inline.length; ++i) { + if (typeof object.inline[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Secrets.inline: object expected"); + message.inline[i] = $root.google.devtools.cloudbuild.v1.InlineSecret.fromObject(object.inline[i]); + } } return message; }; /** - * Creates a plain object from a Secret message. Also converts values to other types if specified. + * Creates a plain object from a Secrets message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @static - * @param {google.devtools.cloudbuild.v1.Secret} message Secret + * @param {google.devtools.cloudbuild.v1.Secrets} message Secrets * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Secret.toObject = function toObject(message, options) { + Secrets.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.secretEnv = {}; - if (options.defaults) - object.kmsKeyName = ""; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - var keys2; - if (message.secretEnv && (keys2 = Object.keys(message.secretEnv)).length) { - object.secretEnv = {}; - for (var j = 0; j < keys2.length; ++j) - object.secretEnv[keys2[j]] = options.bytes === String ? $util.base64.encode(message.secretEnv[keys2[j]], 0, message.secretEnv[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.secretEnv[keys2[j]]) : message.secretEnv[keys2[j]]; + if (options.arrays || options.defaults) { + object.secretManager = []; + object.inline = []; + } + if (message.secretManager && message.secretManager.length) { + object.secretManager = []; + for (var j = 0; j < message.secretManager.length; ++j) + object.secretManager[j] = $root.google.devtools.cloudbuild.v1.SecretManagerSecret.toObject(message.secretManager[j], options); + } + if (message.inline && message.inline.length) { + object.inline = []; + for (var j = 0; j < message.inline.length; ++j) + object.inline[j] = $root.google.devtools.cloudbuild.v1.InlineSecret.toObject(message.inline[j], options); } return object; }; /** - * Converts this Secret to JSON. + * Converts this Secrets to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Secret + * @memberof google.devtools.cloudbuild.v1.Secrets * @instance * @returns {Object.} JSON object */ - Secret.prototype.toJSON = function toJSON() { + Secrets.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Secret; + return Secrets; })(); - v1.CreateBuildRequest = (function() { + v1.InlineSecret = (function() { /** - * Properties of a CreateBuildRequest. + * Properties of an InlineSecret. * @memberof google.devtools.cloudbuild.v1 - * @interface ICreateBuildRequest - * @property {string|null} [parent] CreateBuildRequest parent - * @property {string|null} [projectId] CreateBuildRequest projectId - * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] CreateBuildRequest build + * @interface IInlineSecret + * @property {string|null} [kmsKeyName] InlineSecret kmsKeyName + * @property {Object.|null} [envMap] InlineSecret envMap */ /** - * Constructs a new CreateBuildRequest. + * Constructs a new InlineSecret. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a CreateBuildRequest. - * @implements ICreateBuildRequest + * @classdesc Represents an InlineSecret. + * @implements IInlineSecret * @constructor - * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IInlineSecret=} [properties] Properties to set */ - function CreateBuildRequest(properties) { + function InlineSecret(properties) { + this.envMap = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6567,101 +6631,108 @@ } /** - * CreateBuildRequest parent. - * @member {string} parent - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest - * @instance - */ - CreateBuildRequest.prototype.parent = ""; - - /** - * CreateBuildRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * InlineSecret kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @instance */ - CreateBuildRequest.prototype.projectId = ""; + InlineSecret.prototype.kmsKeyName = ""; /** - * CreateBuildRequest build. - * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * InlineSecret envMap. + * @member {Object.} envMap + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @instance */ - CreateBuildRequest.prototype.build = null; + InlineSecret.prototype.envMap = $util.emptyObject; /** - * Creates a new CreateBuildRequest instance using the specified properties. + * Creates a new InlineSecret instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest instance + * @param {google.devtools.cloudbuild.v1.IInlineSecret=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.InlineSecret} InlineSecret instance */ - CreateBuildRequest.create = function create(properties) { - return new CreateBuildRequest(properties); + InlineSecret.create = function create(properties) { + return new InlineSecret(properties); }; /** - * Encodes the specified CreateBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * Encodes the specified InlineSecret message. Does not implicitly {@link google.devtools.cloudbuild.v1.InlineSecret.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IInlineSecret} message InlineSecret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBuildRequest.encode = function encode(message, writer) { + InlineSecret.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + if (message.envMap != null && Object.hasOwnProperty.call(message, "envMap")) + for (var keys = Object.keys(message.envMap), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).bytes(message.envMap[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CreateBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. + * Encodes the specified InlineSecret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.InlineSecret.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IInlineSecret} message InlineSecret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + InlineSecret.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBuildRequest message from the specified reader or buffer. + * Decodes an InlineSecret message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + * @returns {google.devtools.cloudbuild.v1.InlineSecret} InlineSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBuildRequest.decode = function decode(reader, length) { + InlineSecret.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.InlineSecret(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.parent = reader.string(); - break; case 1: - message.projectId = reader.string(); + message.kmsKeyName = reader.string(); break; case 2: - message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + if (message.envMap === $util.emptyObject) + message.envMap = {}; + 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.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.envMap[key] = value; break; default: reader.skipType(tag & 7); @@ -6672,131 +6743,134 @@ }; /** - * Decodes a CreateBuildRequest message from the specified reader or buffer, length delimited. + * Decodes an InlineSecret message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + * @returns {google.devtools.cloudbuild.v1.InlineSecret} InlineSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBuildRequest.decodeDelimited = function decodeDelimited(reader) { + InlineSecret.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBuildRequest message. + * Verifies an InlineSecret message. * @function verify - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBuildRequest.verify = function verify(message) { + InlineSecret.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.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.build != null && message.hasOwnProperty("build")) { - var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); - if (error) - return "build." + error; - } - return null; - }; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.envMap != null && message.hasOwnProperty("envMap")) { + if (!$util.isObject(message.envMap)) + return "envMap: object expected"; + var key = Object.keys(message.envMap); + for (var i = 0; i < key.length; ++i) + if (!(message.envMap[key[i]] && typeof message.envMap[key[i]].length === "number" || $util.isString(message.envMap[key[i]]))) + return "envMap: buffer{k:string} expected"; + } + return null; + }; /** - * Creates a CreateBuildRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InlineSecret message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest + * @returns {google.devtools.cloudbuild.v1.InlineSecret} InlineSecret */ - CreateBuildRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildRequest) + InlineSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.InlineSecret) return object; - var message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.build != null) { - if (typeof object.build !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildRequest.build: object expected"); - message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); + var message = new $root.google.devtools.cloudbuild.v1.InlineSecret(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.envMap) { + if (typeof object.envMap !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.InlineSecret.envMap: object expected"); + message.envMap = {}; + for (var keys = Object.keys(object.envMap), i = 0; i < keys.length; ++i) + if (typeof object.envMap[keys[i]] === "string") + $util.base64.decode(object.envMap[keys[i]], message.envMap[keys[i]] = $util.newBuffer($util.base64.length(object.envMap[keys[i]])), 0); + else if (object.envMap[keys[i]].length) + message.envMap[keys[i]] = object.envMap[keys[i]]; } return message; }; /** - * Creates a plain object from a CreateBuildRequest message. Also converts values to other types if specified. + * Creates a plain object from an InlineSecret message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @static - * @param {google.devtools.cloudbuild.v1.CreateBuildRequest} message CreateBuildRequest + * @param {google.devtools.cloudbuild.v1.InlineSecret} message InlineSecret * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBuildRequest.toObject = function toObject(message, options) { + InlineSecret.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectId = ""; - object.build = null; - object.parent = ""; + if (options.objects || options.defaults) + object.envMap = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + var keys2; + if (message.envMap && (keys2 = Object.keys(message.envMap)).length) { + object.envMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.envMap[keys2[j]] = options.bytes === String ? $util.base64.encode(message.envMap[keys2[j]], 0, message.envMap[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.envMap[keys2[j]]) : message.envMap[keys2[j]]; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.build != null && message.hasOwnProperty("build")) - object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; return object; }; /** - * Converts this CreateBuildRequest to JSON. + * Converts this InlineSecret to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @memberof google.devtools.cloudbuild.v1.InlineSecret * @instance * @returns {Object.} JSON object */ - CreateBuildRequest.prototype.toJSON = function toJSON() { + InlineSecret.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateBuildRequest; + return InlineSecret; })(); - v1.GetBuildRequest = (function() { + v1.SecretManagerSecret = (function() { /** - * Properties of a GetBuildRequest. + * Properties of a SecretManagerSecret. * @memberof google.devtools.cloudbuild.v1 - * @interface IGetBuildRequest - * @property {string|null} [name] GetBuildRequest name - * @property {string|null} [projectId] GetBuildRequest projectId - * @property {string|null} [id] GetBuildRequest id + * @interface ISecretManagerSecret + * @property {string|null} [versionName] SecretManagerSecret versionName + * @property {string|null} [env] SecretManagerSecret env */ /** - * Constructs a new GetBuildRequest. + * Constructs a new SecretManagerSecret. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a GetBuildRequest. - * @implements IGetBuildRequest + * @classdesc Represents a SecretManagerSecret. + * @implements ISecretManagerSecret * @constructor - * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ISecretManagerSecret=} [properties] Properties to set */ - function GetBuildRequest(properties) { + function SecretManagerSecret(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6804,101 +6878,88 @@ } /** - * GetBuildRequest name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest - * @instance - */ - GetBuildRequest.prototype.name = ""; - - /** - * GetBuildRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * SecretManagerSecret versionName. + * @member {string} versionName + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @instance */ - GetBuildRequest.prototype.projectId = ""; + SecretManagerSecret.prototype.versionName = ""; /** - * GetBuildRequest id. - * @member {string} id - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * SecretManagerSecret env. + * @member {string} env + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @instance */ - GetBuildRequest.prototype.id = ""; + SecretManagerSecret.prototype.env = ""; /** - * Creates a new GetBuildRequest instance using the specified properties. + * Creates a new SecretManagerSecret instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest instance + * @param {google.devtools.cloudbuild.v1.ISecretManagerSecret=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.SecretManagerSecret} SecretManagerSecret instance */ - GetBuildRequest.create = function create(properties) { - return new GetBuildRequest(properties); + SecretManagerSecret.create = function create(properties) { + return new SecretManagerSecret(properties); }; /** - * Encodes the specified GetBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * Encodes the specified SecretManagerSecret message. Does not implicitly {@link google.devtools.cloudbuild.v1.SecretManagerSecret.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecretManagerSecret} message SecretManagerSecret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBuildRequest.encode = function encode(message, writer) { + SecretManagerSecret.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + if (message.versionName != null && Object.hasOwnProperty.call(message, "versionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.versionName); + if (message.env != null && Object.hasOwnProperty.call(message, "env")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.env); return writer; }; /** - * Encodes the specified GetBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. + * Encodes the specified SecretManagerSecret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.SecretManagerSecret.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecretManagerSecret} message SecretManagerSecret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + SecretManagerSecret.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBuildRequest message from the specified reader or buffer. + * Decodes a SecretManagerSecret message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + * @returns {google.devtools.cloudbuild.v1.SecretManagerSecret} SecretManagerSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBuildRequest.decode = function decode(reader, length) { + SecretManagerSecret.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.SecretManagerSecret(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; case 1: - message.projectId = reader.string(); + message.versionName = reader.string(); break; case 2: - message.id = reader.string(); + message.env = reader.string(); break; default: reader.skipType(tag & 7); @@ -6909,128 +6970,118 @@ }; /** - * Decodes a GetBuildRequest message from the specified reader or buffer, length delimited. + * Decodes a SecretManagerSecret message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + * @returns {google.devtools.cloudbuild.v1.SecretManagerSecret} SecretManagerSecret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBuildRequest.decodeDelimited = function decodeDelimited(reader) { + SecretManagerSecret.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBuildRequest message. + * Verifies a SecretManagerSecret message. * @function verify - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBuildRequest.verify = function verify(message) { + SecretManagerSecret.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; + if (message.versionName != null && message.hasOwnProperty("versionName")) + if (!$util.isString(message.versionName)) + return "versionName: string expected"; + if (message.env != null && message.hasOwnProperty("env")) + if (!$util.isString(message.env)) + return "env: string expected"; return null; }; /** - * Creates a GetBuildRequest message from a plain object. Also converts values to their respective internal types. + * Creates a SecretManagerSecret message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest + * @returns {google.devtools.cloudbuild.v1.SecretManagerSecret} SecretManagerSecret */ - GetBuildRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildRequest) + SecretManagerSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.SecretManagerSecret) return object; - var message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.id != null) - message.id = String(object.id); + var message = new $root.google.devtools.cloudbuild.v1.SecretManagerSecret(); + if (object.versionName != null) + message.versionName = String(object.versionName); + if (object.env != null) + message.env = String(object.env); return message; }; /** - * Creates a plain object from a GetBuildRequest message. Also converts values to other types if specified. + * Creates a plain object from a SecretManagerSecret message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @static - * @param {google.devtools.cloudbuild.v1.GetBuildRequest} message GetBuildRequest + * @param {google.devtools.cloudbuild.v1.SecretManagerSecret} message SecretManagerSecret * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBuildRequest.toObject = function toObject(message, options) { + SecretManagerSecret.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.id = ""; - object.name = ""; + object.versionName = ""; + object.env = ""; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.versionName != null && message.hasOwnProperty("versionName")) + object.versionName = message.versionName; + if (message.env != null && message.hasOwnProperty("env")) + object.env = message.env; return object; }; /** - * Converts this GetBuildRequest to JSON. + * Converts this SecretManagerSecret to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret * @instance * @returns {Object.} JSON object */ - GetBuildRequest.prototype.toJSON = function toJSON() { + SecretManagerSecret.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBuildRequest; + return SecretManagerSecret; })(); - v1.ListBuildsRequest = (function() { + v1.Secret = (function() { /** - * Properties of a ListBuildsRequest. + * Properties of a Secret. * @memberof google.devtools.cloudbuild.v1 - * @interface IListBuildsRequest - * @property {string|null} [parent] ListBuildsRequest parent - * @property {string|null} [projectId] ListBuildsRequest projectId - * @property {number|null} [pageSize] ListBuildsRequest pageSize - * @property {string|null} [pageToken] ListBuildsRequest pageToken - * @property {string|null} [filter] ListBuildsRequest filter + * @interface ISecret + * @property {string|null} [kmsKeyName] Secret kmsKeyName + * @property {Object.|null} [secretEnv] Secret secretEnv */ /** - * Constructs a new ListBuildsRequest. + * Constructs a new Secret. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListBuildsRequest. - * @implements IListBuildsRequest + * @classdesc Represents a Secret. + * @implements ISecret * @constructor - * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set */ - function ListBuildsRequest(properties) { + function Secret(properties) { + this.secretEnv = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7038,127 +7089,108 @@ } /** - * ListBuildsRequest parent. - * @member {string} parent - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest - * @instance - */ - ListBuildsRequest.prototype.parent = ""; - - /** - * ListBuildsRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest - * @instance - */ - ListBuildsRequest.prototype.projectId = ""; - - /** - * ListBuildsRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest - * @instance - */ - ListBuildsRequest.prototype.pageSize = 0; - - /** - * ListBuildsRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * Secret kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.devtools.cloudbuild.v1.Secret * @instance */ - ListBuildsRequest.prototype.pageToken = ""; + Secret.prototype.kmsKeyName = ""; /** - * ListBuildsRequest filter. - * @member {string} filter - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * Secret secretEnv. + * @member {Object.} secretEnv + * @memberof google.devtools.cloudbuild.v1.Secret * @instance */ - ListBuildsRequest.prototype.filter = ""; + Secret.prototype.secretEnv = $util.emptyObject; /** - * Creates a new ListBuildsRequest instance using the specified properties. + * Creates a new Secret instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest instance + * @param {google.devtools.cloudbuild.v1.ISecret=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Secret} Secret instance */ - ListBuildsRequest.create = function create(properties) { - return new ListBuildsRequest(properties); + Secret.create = function create(properties) { + return new Secret(properties); }; /** - * Encodes the specified ListBuildsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * Encodes the specified Secret message. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildsRequest.encode = function encode(message, writer) { + Secret.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.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 8, wireType 2 =*/66).string(message.filter); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.parent); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + if (message.secretEnv != null && Object.hasOwnProperty.call(message, "secretEnv")) + for (var keys = Object.keys(message.secretEnv), 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).bytes(message.secretEnv[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ListBuildsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. + * Encodes the specified Secret message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Secret.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ISecret} message Secret message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildsRequest.encodeDelimited = function encodeDelimited(message, writer) { + Secret.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBuildsRequest message from the specified reader or buffer. + * Decodes a Secret message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + * @returns {google.devtools.cloudbuild.v1.Secret} Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildsRequest.decode = function decode(reader, length) { + Secret.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Secret(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 9: - message.parent = reader.string(); - break; case 1: - message.projectId = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); + message.kmsKeyName = reader.string(); break; case 3: - message.pageToken = reader.string(); - break; - case 8: - message.filter = reader.string(); + if (message.secretEnv === $util.emptyObject) + message.secretEnv = {}; + 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.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.secretEnv[key] = value; break; default: reader.skipType(tag & 7); @@ -7169,142 +7201,135 @@ }; /** - * Decodes a ListBuildsRequest message from the specified reader or buffer, length delimited. + * Decodes a Secret message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + * @returns {google.devtools.cloudbuild.v1.Secret} Secret * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildsRequest.decodeDelimited = function decodeDelimited(reader) { + Secret.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBuildsRequest message. + * Verifies a Secret message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBuildsRequest.verify = function verify(message) { + Secret.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.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!$util.isObject(message.secretEnv)) + return "secretEnv: object expected"; + var key = Object.keys(message.secretEnv); + for (var i = 0; i < key.length; ++i) + if (!(message.secretEnv[key[i]] && typeof message.secretEnv[key[i]].length === "number" || $util.isString(message.secretEnv[key[i]]))) + return "secretEnv: buffer{k:string} expected"; + } return null; }; /** - * Creates a ListBuildsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Secret message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest + * @returns {google.devtools.cloudbuild.v1.Secret} Secret */ - ListBuildsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsRequest) + Secret.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Secret) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.projectId != null) - message.projectId = String(object.projectId); - 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); + var message = new $root.google.devtools.cloudbuild.v1.Secret(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + if (object.secretEnv) { + if (typeof object.secretEnv !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Secret.secretEnv: object expected"); + message.secretEnv = {}; + for (var keys = Object.keys(object.secretEnv), i = 0; i < keys.length; ++i) + if (typeof object.secretEnv[keys[i]] === "string") + $util.base64.decode(object.secretEnv[keys[i]], message.secretEnv[keys[i]] = $util.newBuffer($util.base64.length(object.secretEnv[keys[i]])), 0); + else if (object.secretEnv[keys[i]].length) + message.secretEnv[keys[i]] = object.secretEnv[keys[i]]; + } return message; }; /** - * Creates a plain object from a ListBuildsRequest message. Also converts values to other types if specified. + * Creates a plain object from a Secret message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @static - * @param {google.devtools.cloudbuild.v1.ListBuildsRequest} message ListBuildsRequest + * @param {google.devtools.cloudbuild.v1.Secret} message Secret * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBuildsRequest.toObject = function toObject(message, options) { + Secret.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectId = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.parent = ""; + if (options.objects || options.defaults) + object.secretEnv = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + var keys2; + if (message.secretEnv && (keys2 = Object.keys(message.secretEnv)).length) { + object.secretEnv = {}; + for (var j = 0; j < keys2.length; ++j) + object.secretEnv[keys2[j]] = options.bytes === String ? $util.base64.encode(message.secretEnv[keys2[j]], 0, message.secretEnv[keys2[j]].length) : options.bytes === Array ? Array.prototype.slice.call(message.secretEnv[keys2[j]]) : message.secretEnv[keys2[j]]; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; return object; }; /** - * Converts this ListBuildsRequest to JSON. + * Converts this Secret to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @memberof google.devtools.cloudbuild.v1.Secret * @instance * @returns {Object.} JSON object */ - ListBuildsRequest.prototype.toJSON = function toJSON() { + Secret.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBuildsRequest; + return Secret; })(); - v1.ListBuildsResponse = (function() { + v1.CreateBuildRequest = (function() { /** - * Properties of a ListBuildsResponse. + * Properties of a CreateBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IListBuildsResponse - * @property {Array.|null} [builds] ListBuildsResponse builds - * @property {string|null} [nextPageToken] ListBuildsResponse nextPageToken + * @interface ICreateBuildRequest + * @property {string|null} [parent] CreateBuildRequest parent + * @property {string|null} [projectId] CreateBuildRequest projectId + * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] CreateBuildRequest build */ /** - * Constructs a new ListBuildsResponse. + * Constructs a new CreateBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListBuildsResponse. - * @implements IListBuildsResponse + * @classdesc Represents a CreateBuildRequest. + * @implements ICreateBuildRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set */ - function ListBuildsResponse(properties) { - this.builds = []; + function CreateBuildRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7312,91 +7337,101 @@ } /** - * ListBuildsResponse builds. - * @member {Array.} builds - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * CreateBuildRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @instance */ - ListBuildsResponse.prototype.builds = $util.emptyArray; + CreateBuildRequest.prototype.parent = ""; /** - * ListBuildsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * CreateBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @instance */ - ListBuildsResponse.prototype.nextPageToken = ""; + CreateBuildRequest.prototype.projectId = ""; /** - * Creates a new ListBuildsResponse instance using the specified properties. + * CreateBuildRequest build. + * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @instance + */ + CreateBuildRequest.prototype.build = null; + + /** + * Creates a new CreateBuildRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest instance */ - ListBuildsResponse.create = function create(properties) { - return new ListBuildsResponse(properties); + CreateBuildRequest.create = function create(properties) { + return new CreateBuildRequest(properties); }; /** - * Encodes the specified ListBuildsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * Encodes the specified CreateBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildsResponse.encode = function encode(message, writer) { + CreateBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.builds != null && message.builds.length) - for (var i = 0; i < message.builds.length; ++i) - $root.google.devtools.cloudbuild.v1.Build.encode(message.builds[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.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); return writer; }; /** - * Encodes the specified ListBuildsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. + * Encodes the specified CreateBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateBuildRequest} message CreateBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildsResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBuildsResponse message from the specified reader or buffer. + * Decodes a CreateBuildRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildsResponse.decode = function decode(reader, length) { + CreateBuildRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.builds && message.builds.length)) - message.builds = []; - message.builds.push($root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32())); + case 4: + message.parent = reader.string(); + break; + case 1: + message.projectId = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -7407,135 +7442,131 @@ }; /** - * Decodes a ListBuildsResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateBuildRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildsResponse.decodeDelimited = function decodeDelimited(reader) { + CreateBuildRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBuildsResponse message. + * Verifies a CreateBuildRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBuildsResponse.verify = function verify(message) { + CreateBuildRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.builds != null && message.hasOwnProperty("builds")) { - if (!Array.isArray(message.builds)) - return "builds: array expected"; - for (var i = 0; i < message.builds.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.builds[i]); - if (error) - return "builds." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.build != null && message.hasOwnProperty("build")) { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); + if (error) + return "build." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBuildsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBuildRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildRequest} CreateBuildRequest */ - ListBuildsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsResponse) + CreateBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); - if (object.builds) { - if (!Array.isArray(object.builds)) - throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: array expected"); - message.builds = []; - for (var i = 0; i < object.builds.length; ++i) { - if (typeof object.builds[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: object expected"); - message.builds[i] = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.builds[i]); - } + var message = new $root.google.devtools.cloudbuild.v1.CreateBuildRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildRequest.build: object expected"); + message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBuildsResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateBuildRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.ListBuildsResponse} message ListBuildsResponse + * @param {google.devtools.cloudbuild.v1.CreateBuildRequest} message CreateBuildRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBuildsResponse.toObject = function toObject(message, options) { + CreateBuildRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.builds = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.builds && message.builds.length) { - object.builds = []; - for (var j = 0; j < message.builds.length; ++j) - object.builds[j] = $root.google.devtools.cloudbuild.v1.Build.toObject(message.builds[j], options); + if (options.defaults) { + object.projectId = ""; + object.build = null; + object.parent = ""; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.build != null && message.hasOwnProperty("build")) + object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; /** - * Converts this ListBuildsResponse to JSON. + * Converts this CreateBuildRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest * @instance * @returns {Object.} JSON object */ - ListBuildsResponse.prototype.toJSON = function toJSON() { + CreateBuildRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBuildsResponse; + return CreateBuildRequest; })(); - v1.CancelBuildRequest = (function() { + v1.GetBuildRequest = (function() { /** - * Properties of a CancelBuildRequest. + * Properties of a GetBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface ICancelBuildRequest - * @property {string|null} [name] CancelBuildRequest name - * @property {string|null} [projectId] CancelBuildRequest projectId - * @property {string|null} [id] CancelBuildRequest id + * @interface IGetBuildRequest + * @property {string|null} [name] GetBuildRequest name + * @property {string|null} [projectId] GetBuildRequest projectId + * @property {string|null} [id] GetBuildRequest id */ /** - * Constructs a new CancelBuildRequest. + * Constructs a new GetBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a CancelBuildRequest. - * @implements ICancelBuildRequest + * @classdesc Represents a GetBuildRequest. + * @implements IGetBuildRequest * @constructor - * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set */ - function CancelBuildRequest(properties) { + function GetBuildRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7543,51 +7574,51 @@ } /** - * CancelBuildRequest name. + * GetBuildRequest name. * @member {string} name - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @instance */ - CancelBuildRequest.prototype.name = ""; + GetBuildRequest.prototype.name = ""; /** - * CancelBuildRequest projectId. + * GetBuildRequest projectId. * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @instance */ - CancelBuildRequest.prototype.projectId = ""; + GetBuildRequest.prototype.projectId = ""; /** - * CancelBuildRequest id. + * GetBuildRequest id. * @member {string} id - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @instance */ - CancelBuildRequest.prototype.id = ""; + GetBuildRequest.prototype.id = ""; /** - * Creates a new CancelBuildRequest instance using the specified properties. + * Creates a new GetBuildRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest instance + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest instance */ - CancelBuildRequest.create = function create(properties) { - return new CancelBuildRequest(properties); + GetBuildRequest.create = function create(properties) { + return new GetBuildRequest(properties); }; /** - * Encodes the specified CancelBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * Encodes the specified GetBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelBuildRequest.encode = function encode(message, writer) { + GetBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) @@ -7600,33 +7631,33 @@ }; /** - * Encodes the specified CancelBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. + * Encodes the specified GetBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IGetBuildRequest} message GetBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CancelBuildRequest message from the specified reader or buffer. + * Decodes a GetBuildRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelBuildRequest.decode = function decode(reader, length) { + GetBuildRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7648,30 +7679,30 @@ }; /** - * Decodes a CancelBuildRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBuildRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelBuildRequest.decodeDelimited = function decodeDelimited(reader) { + GetBuildRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CancelBuildRequest message. + * Verifies a GetBuildRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CancelBuildRequest.verify = function verify(message) { + GetBuildRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -7687,17 +7718,17 @@ }; /** - * Creates a CancelBuildRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBuildRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildRequest} GetBuildRequest */ - CancelBuildRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.CancelBuildRequest) + GetBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + var message = new $root.google.devtools.cloudbuild.v1.GetBuildRequest(); if (object.name != null) message.name = String(object.name); if (object.projectId != null) @@ -7708,15 +7739,15 @@ }; /** - * Creates a plain object from a CancelBuildRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBuildRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.CancelBuildRequest} message CancelBuildRequest + * @param {google.devtools.cloudbuild.v1.GetBuildRequest} message GetBuildRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CancelBuildRequest.toObject = function toObject(message, options) { + GetBuildRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -7735,53 +7766,41 @@ }; /** - * Converts this CancelBuildRequest to JSON. + * Converts this GetBuildRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest * @instance * @returns {Object.} JSON object */ - CancelBuildRequest.prototype.toJSON = function toJSON() { + GetBuildRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CancelBuildRequest; + return GetBuildRequest; })(); - v1.BuildTrigger = (function() { + v1.ListBuildsRequest = (function() { /** - * Properties of a BuildTrigger. + * Properties of a ListBuildsRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IBuildTrigger - * @property {string|null} [id] BuildTrigger id - * @property {string|null} [description] BuildTrigger description - * @property {string|null} [name] BuildTrigger name - * @property {Array.|null} [tags] BuildTrigger tags - * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [triggerTemplate] BuildTrigger triggerTemplate - * @property {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null} [github] BuildTrigger github - * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildTrigger build - * @property {string|null} [filename] BuildTrigger filename - * @property {google.protobuf.ITimestamp|null} [createTime] BuildTrigger createTime - * @property {boolean|null} [disabled] BuildTrigger disabled - * @property {Object.|null} [substitutions] BuildTrigger substitutions - * @property {Array.|null} [ignoredFiles] BuildTrigger ignoredFiles - * @property {Array.|null} [includedFiles] BuildTrigger includedFiles + * @interface IListBuildsRequest + * @property {string|null} [parent] ListBuildsRequest parent + * @property {string|null} [projectId] ListBuildsRequest projectId + * @property {number|null} [pageSize] ListBuildsRequest pageSize + * @property {string|null} [pageToken] ListBuildsRequest pageToken + * @property {string|null} [filter] ListBuildsRequest filter */ /** - * Constructs a new BuildTrigger. + * Constructs a new ListBuildsRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a BuildTrigger. - * @implements IBuildTrigger + * @classdesc Represents a ListBuildsRequest. + * @implements IListBuildsRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set */ - function BuildTrigger(properties) { - this.tags = []; - this.substitutions = {}; - this.ignoredFiles = []; - this.includedFiles = []; + function ListBuildsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7789,277 +7808,130 @@ } /** - * BuildTrigger id. - * @member {string} id - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.id = ""; - - /** - * BuildTrigger description. - * @member {string} description - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.description = ""; - - /** - * BuildTrigger name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.name = ""; - - /** - * BuildTrigger tags. - * @member {Array.} tags - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.tags = $util.emptyArray; - - /** - * BuildTrigger triggerTemplate. - * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} triggerTemplate - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.triggerTemplate = null; - - /** - * BuildTrigger github. - * @member {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null|undefined} github - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.github = null; - - /** - * BuildTrigger build. - * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.build = null; - - /** - * BuildTrigger filename. - * @member {string} filename - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.filename = ""; - - /** - * BuildTrigger createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.cloudbuild.v1.BuildTrigger - * @instance - */ - BuildTrigger.prototype.createTime = null; - - /** - * BuildTrigger disabled. - * @member {boolean} disabled - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * ListBuildsRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance */ - BuildTrigger.prototype.disabled = false; + ListBuildsRequest.prototype.parent = ""; /** - * BuildTrigger substitutions. - * @member {Object.} substitutions - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * ListBuildsRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance */ - BuildTrigger.prototype.substitutions = $util.emptyObject; + ListBuildsRequest.prototype.projectId = ""; /** - * BuildTrigger ignoredFiles. - * @member {Array.} ignoredFiles - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * ListBuildsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance */ - BuildTrigger.prototype.ignoredFiles = $util.emptyArray; + ListBuildsRequest.prototype.pageSize = 0; /** - * BuildTrigger includedFiles. - * @member {Array.} includedFiles - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * ListBuildsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance */ - BuildTrigger.prototype.includedFiles = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListBuildsRequest.prototype.pageToken = ""; /** - * BuildTrigger buildTemplate. - * @member {"build"|"filename"|undefined} buildTemplate - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * ListBuildsRequest filter. + * @member {string} filter + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance */ - Object.defineProperty(BuildTrigger.prototype, "buildTemplate", { - get: $util.oneOfGetter($oneOfFields = ["build", "filename"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListBuildsRequest.prototype.filter = ""; /** - * Creates a new BuildTrigger instance using the specified properties. + * Creates a new ListBuildsRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger instance + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest instance */ - BuildTrigger.create = function create(properties) { - return new BuildTrigger(properties); + ListBuildsRequest.create = function create(properties) { + return new ListBuildsRequest(properties); }; /** - * Encodes the specified BuildTrigger message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * Encodes the specified ListBuildsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildTrigger.encode = function encode(message, writer) { + ListBuildsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.build != null && Object.hasOwnProperty.call(message, "build")) - $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.triggerTemplate != null && Object.hasOwnProperty.call(message, "triggerTemplate")) - $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.triggerTemplate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.filename); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 9, wireType 0 =*/72).bool(message.disabled); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); - if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) - for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) - writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); - if (message.github != null && Object.hasOwnProperty.call(message, "github")) - $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.encode(message.github, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.ignoredFiles != null && message.ignoredFiles.length) - for (var i = 0; i < message.ignoredFiles.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.ignoredFiles[i]); - if (message.includedFiles != null && message.includedFiles.length) - for (var i = 0; i < message.includedFiles.length; ++i) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.includedFiles[i]); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.name); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + 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 8, wireType 2 =*/66).string(message.filter); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.parent); return writer; }; /** - * Encodes the specified BuildTrigger message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * Encodes the specified ListBuildsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildsRequest} message ListBuildsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildTrigger.encodeDelimited = function encodeDelimited(message, writer) { + ListBuildsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildTrigger message from the specified reader or buffer. + * Decodes a ListBuildsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildTrigger.decode = function decode(reader, length) { + ListBuildsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 10: - message.description = reader.string(); - break; - case 21: - message.name = reader.string(); - break; - case 19: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); + case 9: + message.parent = reader.string(); break; - case 7: - message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + case 1: + message.projectId = reader.string(); break; - case 13: - message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); + case 2: + message.pageSize = reader.int32(); break; - case 4: - message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + case 3: + message.pageToken = reader.string(); break; case 8: - message.filename = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.filter = reader.string(); break; - case 9: - message.disabled = reader.bool(); - break; - case 11: - if (message.substitutions === $util.emptyObject) - message.substitutions = {}; - 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.substitutions[key] = value; - break; - case 15: - if (!(message.ignoredFiles && message.ignoredFiles.length)) - message.ignoredFiles = []; - message.ignoredFiles.push(reader.string()); - break; - case 16: - if (!(message.includedFiles && message.includedFiles.length)) - message.includedFiles = []; - message.includedFiles.push(reader.string()); - break; - default: - reader.skipType(tag & 7); + default: + reader.skipType(tag & 7); break; } } @@ -8067,293 +7939,142 @@ }; /** - * Decodes a BuildTrigger message from the specified reader or buffer, length delimited. + * Decodes a ListBuildsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildTrigger.decodeDelimited = function decodeDelimited(reader) { + ListBuildsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildTrigger message. + * Verifies a ListBuildsRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildTrigger.verify = function verify(message) { + ListBuildsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) { - var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.triggerTemplate); - if (error) - return "triggerTemplate." + error; - } - if (message.github != null && message.hasOwnProperty("github")) { - var error = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.verify(message.github); - if (error) - return "github." + error; - } - if (message.build != null && message.hasOwnProperty("build")) { - properties.buildTemplate = 1; - { - var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); - if (error) - return "build." + error; - } - } - if (message.filename != null && message.hasOwnProperty("filename")) { - if (properties.buildTemplate === 1) - return "buildTemplate: multiple values"; - properties.buildTemplate = 1; - if (!$util.isString(message.filename)) - return "filename: string expected"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - if (message.substitutions != null && message.hasOwnProperty("substitutions")) { - if (!$util.isObject(message.substitutions)) - return "substitutions: object expected"; - var key = Object.keys(message.substitutions); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.substitutions[key[i]])) - return "substitutions: string{k:string} expected"; - } - if (message.ignoredFiles != null && message.hasOwnProperty("ignoredFiles")) { - if (!Array.isArray(message.ignoredFiles)) - return "ignoredFiles: array expected"; - for (var i = 0; i < message.ignoredFiles.length; ++i) - if (!$util.isString(message.ignoredFiles[i])) - return "ignoredFiles: string[] expected"; - } - if (message.includedFiles != null && message.hasOwnProperty("includedFiles")) { - if (!Array.isArray(message.includedFiles)) - return "includedFiles: array expected"; - for (var i = 0; i < message.includedFiles.length; ++i) - if (!$util.isString(message.includedFiles[i])) - return "includedFiles: string[] expected"; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: 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 BuildTrigger message from a plain object. Also converts values to their respective internal types. + * Creates a ListBuildsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger + * @returns {google.devtools.cloudbuild.v1.ListBuildsRequest} ListBuildsRequest */ - BuildTrigger.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.BuildTrigger) + ListBuildsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(); - if (object.id != null) - message.id = String(object.id); - if (object.description != null) - message.description = String(object.description); - if (object.name != null) - message.name = String(object.name); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.triggerTemplate != null) { - if (typeof object.triggerTemplate !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.triggerTemplate: object expected"); - message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.triggerTemplate); - } - if (object.github != null) { - if (typeof object.github !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.github: object expected"); - message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.fromObject(object.github); - } - if (object.build != null) { - if (typeof object.build !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.build: object expected"); - message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); - } - if (object.filename != null) - message.filename = String(object.filename); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - if (object.substitutions) { - if (typeof object.substitutions !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.substitutions: object expected"); - message.substitutions = {}; - for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) - message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); - } - if (object.ignoredFiles) { - if (!Array.isArray(object.ignoredFiles)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.ignoredFiles: array expected"); - message.ignoredFiles = []; - for (var i = 0; i < object.ignoredFiles.length; ++i) - message.ignoredFiles[i] = String(object.ignoredFiles[i]); - } - if (object.includedFiles) { - if (!Array.isArray(object.includedFiles)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.includedFiles: array expected"); - message.includedFiles = []; - for (var i = 0; i < object.includedFiles.length; ++i) - message.includedFiles[i] = String(object.includedFiles[i]); - } + var message = new $root.google.devtools.cloudbuild.v1.ListBuildsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.projectId != null) + message.projectId = String(object.projectId); + 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 BuildTrigger message. Also converts values to other types if specified. + * Creates a plain object from a ListBuildsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @static - * @param {google.devtools.cloudbuild.v1.BuildTrigger} message BuildTrigger + * @param {google.devtools.cloudbuild.v1.ListBuildsRequest} message ListBuildsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildTrigger.toObject = function toObject(message, options) { + ListBuildsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.ignoredFiles = []; - object.includedFiles = []; - object.tags = []; - } - if (options.objects || options.defaults) - object.substitutions = {}; if (options.defaults) { - object.id = ""; - object.createTime = null; - object.triggerTemplate = null; - object.disabled = false; - object.description = ""; - object.github = null; - object.name = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.build != null && message.hasOwnProperty("build")) { - object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); - if (options.oneofs) - object.buildTemplate = "build"; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) - object.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.triggerTemplate, options); - if (message.filename != null && message.hasOwnProperty("filename")) { - object.filename = message.filename; - if (options.oneofs) - object.buildTemplate = "filename"; + object.projectId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.parent = ""; } - if (message.disabled != null && message.hasOwnProperty("disabled")) - object.disabled = message.disabled; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { - object.substitutions = {}; - for (var j = 0; j < keys2.length; ++j) - object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; - } - if (message.github != null && message.hasOwnProperty("github")) - object.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.toObject(message.github, options); - if (message.ignoredFiles && message.ignoredFiles.length) { - object.ignoredFiles = []; - for (var j = 0; j < message.ignoredFiles.length; ++j) - object.ignoredFiles[j] = message.ignoredFiles[j]; - } - if (message.includedFiles && message.includedFiles.length) { - object.includedFiles = []; - for (var j = 0; j < message.includedFiles.length; ++j) - object.includedFiles[j] = message.includedFiles[j]; - } - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; /** - * Converts this BuildTrigger to JSON. + * Converts this ListBuildsRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest * @instance * @returns {Object.} JSON object */ - BuildTrigger.prototype.toJSON = function toJSON() { + ListBuildsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BuildTrigger; + return ListBuildsRequest; })(); - v1.GitHubEventsConfig = (function() { + v1.ListBuildsResponse = (function() { /** - * Properties of a GitHubEventsConfig. + * Properties of a ListBuildsResponse. * @memberof google.devtools.cloudbuild.v1 - * @interface IGitHubEventsConfig - * @property {number|Long|null} [installationId] GitHubEventsConfig installationId - * @property {string|null} [owner] GitHubEventsConfig owner - * @property {string|null} [name] GitHubEventsConfig name - * @property {google.devtools.cloudbuild.v1.IPullRequestFilter|null} [pullRequest] GitHubEventsConfig pullRequest - * @property {google.devtools.cloudbuild.v1.IPushFilter|null} [push] GitHubEventsConfig push + * @interface IListBuildsResponse + * @property {Array.|null} [builds] ListBuildsResponse builds + * @property {string|null} [nextPageToken] ListBuildsResponse nextPageToken */ /** - * Constructs a new GitHubEventsConfig. + * Constructs a new ListBuildsResponse. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a GitHubEventsConfig. - * @implements IGitHubEventsConfig + * @classdesc Represents a ListBuildsResponse. + * @implements IListBuildsResponse * @constructor - * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set */ - function GitHubEventsConfig(properties) { + function ListBuildsResponse(properties) { + this.builds = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8361,141 +8082,91 @@ } /** - * GitHubEventsConfig installationId. - * @member {number|Long} installationId - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig - * @instance - */ - GitHubEventsConfig.prototype.installationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * GitHubEventsConfig owner. - * @member {string} owner - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig - * @instance - */ - GitHubEventsConfig.prototype.owner = ""; - - /** - * GitHubEventsConfig name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig - * @instance - */ - GitHubEventsConfig.prototype.name = ""; - - /** - * GitHubEventsConfig pullRequest. - * @member {google.devtools.cloudbuild.v1.IPullRequestFilter|null|undefined} pullRequest - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig - * @instance - */ - GitHubEventsConfig.prototype.pullRequest = null; - - /** - * GitHubEventsConfig push. - * @member {google.devtools.cloudbuild.v1.IPushFilter|null|undefined} push - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * ListBuildsResponse builds. + * @member {Array.} builds + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @instance */ - GitHubEventsConfig.prototype.push = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListBuildsResponse.prototype.builds = $util.emptyArray; /** - * GitHubEventsConfig event. - * @member {"pullRequest"|"push"|undefined} event - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * ListBuildsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @instance */ - Object.defineProperty(GitHubEventsConfig.prototype, "event", { - get: $util.oneOfGetter($oneOfFields = ["pullRequest", "push"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListBuildsResponse.prototype.nextPageToken = ""; /** - * Creates a new GitHubEventsConfig instance using the specified properties. + * Creates a new ListBuildsResponse instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static - * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig instance + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse instance */ - GitHubEventsConfig.create = function create(properties) { - return new GitHubEventsConfig(properties); + ListBuildsResponse.create = function create(properties) { + return new ListBuildsResponse(properties); }; /** - * Encodes the specified GitHubEventsConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * Encodes the specified ListBuildsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static - * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GitHubEventsConfig.encode = function encode(message, writer) { + ListBuildsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.installationId != null && Object.hasOwnProperty.call(message, "installationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.installationId); - if (message.pullRequest != null && Object.hasOwnProperty.call(message, "pullRequest")) - $root.google.devtools.cloudbuild.v1.PullRequestFilter.encode(message.pullRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.push != null && Object.hasOwnProperty.call(message, "push")) - $root.google.devtools.cloudbuild.v1.PushFilter.encode(message.push, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.owner); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + if (message.builds != null && message.builds.length) + for (var i = 0; i < message.builds.length; ++i) + $root.google.devtools.cloudbuild.v1.Build.encode(message.builds[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 GitHubEventsConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * Encodes the specified ListBuildsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static - * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildsResponse} message ListBuildsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GitHubEventsConfig.encodeDelimited = function encodeDelimited(message, writer) { + ListBuildsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GitHubEventsConfig message from the specified reader or buffer. + * Decodes a ListBuildsResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GitHubEventsConfig.decode = function decode(reader, length) { + ListBuildsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installationId = reader.int64(); - break; - case 6: - message.owner = reader.string(); - break; - case 7: - message.name = reader.string(); - break; - case 4: - message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.decode(reader, reader.uint32()); + if (!(message.builds && message.builds.length)) + message.builds = []; + message.builds.push($root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32())); break; - case 5: - message.push = $root.google.devtools.cloudbuild.v1.PushFilter.decode(reader, reader.uint32()); + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -8506,179 +8177,135 @@ }; /** - * Decodes a GitHubEventsConfig message from the specified reader or buffer, length delimited. + * Decodes a ListBuildsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GitHubEventsConfig.decodeDelimited = function decodeDelimited(reader) { + ListBuildsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GitHubEventsConfig message. + * Verifies a ListBuildsResponse message. * @function verify - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GitHubEventsConfig.verify = function verify(message) { + ListBuildsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.installationId != null && message.hasOwnProperty("installationId")) - if (!$util.isInteger(message.installationId) && !(message.installationId && $util.isInteger(message.installationId.low) && $util.isInteger(message.installationId.high))) - return "installationId: integer|Long expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { - properties.event = 1; - { - var error = $root.google.devtools.cloudbuild.v1.PullRequestFilter.verify(message.pullRequest); - if (error) - return "pullRequest." + error; - } - } - if (message.push != null && message.hasOwnProperty("push")) { - if (properties.event === 1) - return "event: multiple values"; - properties.event = 1; - { - var error = $root.google.devtools.cloudbuild.v1.PushFilter.verify(message.push); + if (message.builds != null && message.hasOwnProperty("builds")) { + if (!Array.isArray(message.builds)) + return "builds: array expected"; + for (var i = 0; i < message.builds.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.builds[i]); if (error) - return "push." + error; + return "builds." + error; } } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GitHubEventsConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ListBuildsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig + * @returns {google.devtools.cloudbuild.v1.ListBuildsResponse} ListBuildsResponse */ - GitHubEventsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.GitHubEventsConfig) + ListBuildsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildsResponse) return object; - var message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); - if (object.installationId != null) - if ($util.Long) - (message.installationId = $util.Long.fromValue(object.installationId)).unsigned = false; - else if (typeof object.installationId === "string") - message.installationId = parseInt(object.installationId, 10); - else if (typeof object.installationId === "number") - message.installationId = object.installationId; - else if (typeof object.installationId === "object") - message.installationId = new $util.LongBits(object.installationId.low >>> 0, object.installationId.high >>> 0).toNumber(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.name != null) - message.name = String(object.name); - if (object.pullRequest != null) { - if (typeof object.pullRequest !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.pullRequest: object expected"); - message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.fromObject(object.pullRequest); - } - if (object.push != null) { - if (typeof object.push !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.push: object expected"); - message.push = $root.google.devtools.cloudbuild.v1.PushFilter.fromObject(object.push); + var message = new $root.google.devtools.cloudbuild.v1.ListBuildsResponse(); + if (object.builds) { + if (!Array.isArray(object.builds)) + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: array expected"); + message.builds = []; + for (var i = 0; i < object.builds.length; ++i) { + if (typeof object.builds[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildsResponse.builds: object expected"); + message.builds[i] = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.builds[i]); + } } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GitHubEventsConfig message. Also converts values to other types if specified. + * Creates a plain object from a ListBuildsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @static - * @param {google.devtools.cloudbuild.v1.GitHubEventsConfig} message GitHubEventsConfig + * @param {google.devtools.cloudbuild.v1.ListBuildsResponse} message ListBuildsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GitHubEventsConfig.toObject = function toObject(message, options) { + ListBuildsResponse.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.installationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.installationId = options.longs === String ? "0" : 0; - object.owner = ""; - object.name = ""; - } - if (message.installationId != null && message.hasOwnProperty("installationId")) - if (typeof message.installationId === "number") - object.installationId = options.longs === String ? String(message.installationId) : message.installationId; - else - object.installationId = options.longs === String ? $util.Long.prototype.toString.call(message.installationId) : options.longs === Number ? new $util.LongBits(message.installationId.low >>> 0, message.installationId.high >>> 0).toNumber() : message.installationId; - if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { - object.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.toObject(message.pullRequest, options); - if (options.oneofs) - object.event = "pullRequest"; - } - if (message.push != null && message.hasOwnProperty("push")) { - object.push = $root.google.devtools.cloudbuild.v1.PushFilter.toObject(message.push, options); - if (options.oneofs) - object.event = "push"; + if (options.arrays || options.defaults) + object.builds = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.builds && message.builds.length) { + object.builds = []; + for (var j = 0; j < message.builds.length; ++j) + object.builds[j] = $root.google.devtools.cloudbuild.v1.Build.toObject(message.builds[j], options); } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GitHubEventsConfig to JSON. + * Converts this ListBuildsResponse to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse * @instance * @returns {Object.} JSON object */ - GitHubEventsConfig.prototype.toJSON = function toJSON() { + ListBuildsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GitHubEventsConfig; + return ListBuildsResponse; })(); - v1.PullRequestFilter = (function() { + v1.CancelBuildRequest = (function() { /** - * Properties of a PullRequestFilter. + * Properties of a CancelBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IPullRequestFilter - * @property {string|null} [branch] PullRequestFilter branch - * @property {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null} [commentControl] PullRequestFilter commentControl - * @property {boolean|null} [invertRegex] PullRequestFilter invertRegex + * @interface ICancelBuildRequest + * @property {string|null} [name] CancelBuildRequest name + * @property {string|null} [projectId] CancelBuildRequest projectId + * @property {string|null} [id] CancelBuildRequest id */ /** - * Constructs a new PullRequestFilter. + * Constructs a new CancelBuildRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a PullRequestFilter. - * @implements IPullRequestFilter + * @classdesc Represents a CancelBuildRequest. + * @implements ICancelBuildRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set */ - function PullRequestFilter(properties) { + function CancelBuildRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8686,115 +8313,101 @@ } /** - * PullRequestFilter branch. - * @member {string} branch - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter - * @instance - */ - PullRequestFilter.prototype.branch = ""; - - /** - * PullRequestFilter commentControl. - * @member {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl} commentControl - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * CancelBuildRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @instance */ - PullRequestFilter.prototype.commentControl = 0; + CancelBuildRequest.prototype.name = ""; /** - * PullRequestFilter invertRegex. - * @member {boolean} invertRegex - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * CancelBuildRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @instance */ - PullRequestFilter.prototype.invertRegex = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CancelBuildRequest.prototype.projectId = ""; /** - * PullRequestFilter gitRef. - * @member {"branch"|undefined} gitRef - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * CancelBuildRequest id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @instance */ - Object.defineProperty(PullRequestFilter.prototype, "gitRef", { - get: $util.oneOfGetter($oneOfFields = ["branch"]), - set: $util.oneOfSetter($oneOfFields) - }); + CancelBuildRequest.prototype.id = ""; /** - * Creates a new PullRequestFilter instance using the specified properties. + * Creates a new CancelBuildRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter instance + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest instance */ - PullRequestFilter.create = function create(properties) { - return new PullRequestFilter(properties); + CancelBuildRequest.create = function create(properties) { + return new CancelBuildRequest(properties); }; /** - * Encodes the specified PullRequestFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * Encodes the specified CancelBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PullRequestFilter.encode = function encode(message, writer) { + CancelBuildRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); - if (message.commentControl != null && Object.hasOwnProperty.call(message, "commentControl")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.commentControl); - if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.invertRegex); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; /** - * Encodes the specified PullRequestFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. + * Encodes the specified CancelBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CancelBuildRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICancelBuildRequest} message CancelBuildRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PullRequestFilter.encodeDelimited = function encodeDelimited(message, writer) { + CancelBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PullRequestFilter message from the specified reader or buffer. + * Decodes a CancelBuildRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PullRequestFilter.decode = function decode(reader, length) { + CancelBuildRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.branch = reader.string(); + case 4: + message.name = reader.string(); break; - case 5: - message.commentControl = reader.int32(); + case 1: + message.projectId = reader.string(); break; - case 6: - message.invertRegex = reader.bool(); + case 2: + message.id = reader.string(); break; default: reader.skipType(tag & 7); @@ -8805,158 +8418,140 @@ }; /** - * Decodes a PullRequestFilter message from the specified reader or buffer, length delimited. + * Decodes a CancelBuildRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PullRequestFilter.decodeDelimited = function decodeDelimited(reader) { + CancelBuildRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PullRequestFilter message. + * Verifies a CancelBuildRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PullRequestFilter.verify = function verify(message) { + CancelBuildRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.branch != null && message.hasOwnProperty("branch")) { - properties.gitRef = 1; - if (!$util.isString(message.branch)) - return "branch: string expected"; - } - if (message.commentControl != null && message.hasOwnProperty("commentControl")) - switch (message.commentControl) { - default: - return "commentControl: enum value expected"; - case 0: - case 1: - break; - } - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) - if (typeof message.invertRegex !== "boolean") - return "invertRegex: boolean expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; return null; }; /** - * Creates a PullRequestFilter message from a plain object. Also converts values to their respective internal types. + * Creates a CancelBuildRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter + * @returns {google.devtools.cloudbuild.v1.CancelBuildRequest} CancelBuildRequest */ - PullRequestFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.PullRequestFilter) + CancelBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CancelBuildRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); - if (object.branch != null) - message.branch = String(object.branch); - switch (object.commentControl) { - case "COMMENTS_DISABLED": - case 0: - message.commentControl = 0; - break; - case "COMMENTS_ENABLED": - case 1: - message.commentControl = 1; - break; - } - if (object.invertRegex != null) - message.invertRegex = Boolean(object.invertRegex); + var message = new $root.google.devtools.cloudbuild.v1.CancelBuildRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.id != null) + message.id = String(object.id); return message; }; /** - * Creates a plain object from a PullRequestFilter message. Also converts values to other types if specified. + * Creates a plain object from a CancelBuildRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @static - * @param {google.devtools.cloudbuild.v1.PullRequestFilter} message PullRequestFilter + * @param {google.devtools.cloudbuild.v1.CancelBuildRequest} message CancelBuildRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PullRequestFilter.toObject = function toObject(message, options) { + CancelBuildRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.commentControl = options.enums === String ? "COMMENTS_DISABLED" : 0; - object.invertRegex = false; - } - if (message.branch != null && message.hasOwnProperty("branch")) { - object.branch = message.branch; - if (options.oneofs) - object.gitRef = "branch"; + object.projectId = ""; + object.id = ""; + object.name = ""; } - if (message.commentControl != null && message.hasOwnProperty("commentControl")) - object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) - object.invertRegex = message.invertRegex; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this PullRequestFilter to JSON. + * Converts this CancelBuildRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest * @instance * @returns {Object.} JSON object */ - PullRequestFilter.prototype.toJSON = function toJSON() { + CancelBuildRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * CommentControl enum. - * @name google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl - * @enum {number} - * @property {number} COMMENTS_DISABLED=0 COMMENTS_DISABLED value - * @property {number} COMMENTS_ENABLED=1 COMMENTS_ENABLED value - */ - PullRequestFilter.CommentControl = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMMENTS_DISABLED"] = 0; - values[valuesById[1] = "COMMENTS_ENABLED"] = 1; - return values; - })(); - - return PullRequestFilter; + return CancelBuildRequest; })(); - v1.PushFilter = (function() { + v1.BuildTrigger = (function() { /** - * Properties of a PushFilter. + * Properties of a BuildTrigger. * @memberof google.devtools.cloudbuild.v1 - * @interface IPushFilter - * @property {string|null} [branch] PushFilter branch - * @property {string|null} [tag] PushFilter tag - * @property {boolean|null} [invertRegex] PushFilter invertRegex + * @interface IBuildTrigger + * @property {string|null} [id] BuildTrigger id + * @property {string|null} [description] BuildTrigger description + * @property {string|null} [name] BuildTrigger name + * @property {Array.|null} [tags] BuildTrigger tags + * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [triggerTemplate] BuildTrigger triggerTemplate + * @property {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null} [github] BuildTrigger github + * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildTrigger build + * @property {string|null} [filename] BuildTrigger filename + * @property {google.protobuf.ITimestamp|null} [createTime] BuildTrigger createTime + * @property {boolean|null} [disabled] BuildTrigger disabled + * @property {Object.|null} [substitutions] BuildTrigger substitutions + * @property {Array.|null} [ignoredFiles] BuildTrigger ignoredFiles + * @property {Array.|null} [includedFiles] BuildTrigger includedFiles */ /** - * Constructs a new PushFilter. + * Constructs a new BuildTrigger. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a PushFilter. - * @implements IPushFilter + * @classdesc Represents a BuildTrigger. + * @implements IBuildTrigger * @constructor - * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set */ - function PushFilter(properties) { + function BuildTrigger(properties) { + this.tags = []; + this.substitutions = {}; + this.ignoredFiles = []; + this.includedFiles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8964,115 +8559,274 @@ } /** - * PushFilter branch. - * @member {string} branch - * @memberof google.devtools.cloudbuild.v1.PushFilter + * BuildTrigger id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ - PushFilter.prototype.branch = ""; + BuildTrigger.prototype.id = ""; /** - * PushFilter tag. - * @member {string} tag - * @memberof google.devtools.cloudbuild.v1.PushFilter + * BuildTrigger description. + * @member {string} description + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ - PushFilter.prototype.tag = ""; + BuildTrigger.prototype.description = ""; /** - * PushFilter invertRegex. - * @member {boolean} invertRegex - * @memberof google.devtools.cloudbuild.v1.PushFilter + * BuildTrigger name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ - PushFilter.prototype.invertRegex = false; + BuildTrigger.prototype.name = ""; + + /** + * BuildTrigger tags. + * @member {Array.} tags + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.tags = $util.emptyArray; + + /** + * BuildTrigger triggerTemplate. + * @member {google.devtools.cloudbuild.v1.IRepoSource|null|undefined} triggerTemplate + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.triggerTemplate = null; + + /** + * BuildTrigger github. + * @member {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null|undefined} github + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.github = null; + + /** + * BuildTrigger build. + * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.build = null; + + /** + * BuildTrigger filename. + * @member {string} filename + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.filename = ""; + + /** + * BuildTrigger createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.createTime = null; + + /** + * BuildTrigger disabled. + * @member {boolean} disabled + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.disabled = false; + + /** + * BuildTrigger substitutions. + * @member {Object.} substitutions + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.substitutions = $util.emptyObject; + + /** + * BuildTrigger ignoredFiles. + * @member {Array.} ignoredFiles + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.ignoredFiles = $util.emptyArray; + + /** + * BuildTrigger includedFiles. + * @member {Array.} includedFiles + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.includedFiles = $util.emptyArray; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * PushFilter gitRef. - * @member {"branch"|"tag"|undefined} gitRef - * @memberof google.devtools.cloudbuild.v1.PushFilter + * BuildTrigger buildTemplate. + * @member {"build"|"filename"|undefined} buildTemplate + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ - Object.defineProperty(PushFilter.prototype, "gitRef", { - get: $util.oneOfGetter($oneOfFields = ["branch", "tag"]), + Object.defineProperty(BuildTrigger.prototype, "buildTemplate", { + get: $util.oneOfGetter($oneOfFields = ["build", "filename"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new PushFilter instance using the specified properties. + * Creates a new BuildTrigger instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static - * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter instance + * @param {google.devtools.cloudbuild.v1.IBuildTrigger=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger instance */ - PushFilter.create = function create(properties) { - return new PushFilter(properties); + BuildTrigger.create = function create(properties) { + return new BuildTrigger(properties); }; /** - * Encodes the specified PushFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. + * Encodes the specified BuildTrigger message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static - * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PushFilter.encode = function encode(message, writer) { + BuildTrigger.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); - if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.invertRegex); - return writer; - }; - - /** - * Encodes the specified PushFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.PushFilter - * @static - * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PushFilter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.build != null && Object.hasOwnProperty.call(message, "build")) + $root.google.devtools.cloudbuild.v1.Build.encode(message.build, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.triggerTemplate != null && Object.hasOwnProperty.call(message, "triggerTemplate")) + $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.triggerTemplate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.filename != null && Object.hasOwnProperty.call(message, "filename")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.filename); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.disabled); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.description); + if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) + for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); + if (message.github != null && Object.hasOwnProperty.call(message, "github")) + $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.encode(message.github, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.ignoredFiles != null && message.ignoredFiles.length) + for (var i = 0; i < message.ignoredFiles.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.ignoredFiles[i]); + if (message.includedFiles != null && message.includedFiles.length) + for (var i = 0; i < message.includedFiles.length; ++i) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.includedFiles[i]); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.name); + return writer; }; /** - * Decodes a PushFilter message from the specified reader or buffer. + * Encodes the specified BuildTrigger message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.IBuildTrigger} message BuildTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildTrigger message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PushFilter.decode = function decode(reader, length) { + BuildTrigger.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PushFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.branch = reader.string(); + case 1: + message.id = reader.string(); break; - case 3: - message.tag = reader.string(); + case 10: + message.description = reader.string(); + break; + case 21: + message.name = reader.string(); + break; + case 19: + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + case 7: + message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + case 13: + message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); break; case 4: - message.invertRegex = reader.bool(); + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + case 8: + message.filename = reader.string(); + break; + case 5: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.disabled = reader.bool(); + break; + case 11: + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + 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.substitutions[key] = value; + break; + case 15: + if (!(message.ignoredFiles && message.ignoredFiles.length)) + message.ignoredFiles = []; + message.ignoredFiles.push(reader.string()); + break; + case 16: + if (!(message.includedFiles && message.includedFiles.length)) + message.includedFiles = []; + message.includedFiles.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -9083,135 +8837,293 @@ }; /** - * Decodes a PushFilter message from the specified reader or buffer, length delimited. + * Decodes a BuildTrigger message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PushFilter.decodeDelimited = function decodeDelimited(reader) { + BuildTrigger.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PushFilter message. + * Verifies a BuildTrigger message. * @function verify - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PushFilter.verify = function verify(message) { + BuildTrigger.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.branch != null && message.hasOwnProperty("branch")) { - properties.gitRef = 1; - if (!$util.isString(message.branch)) - return "branch: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; } - if (message.tag != null && message.hasOwnProperty("tag")) { - if (properties.gitRef === 1) - return "gitRef: multiple values"; - properties.gitRef = 1; - if (!$util.isString(message.tag)) - return "tag: string expected"; + if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) { + var error = $root.google.devtools.cloudbuild.v1.RepoSource.verify(message.triggerTemplate); + if (error) + return "triggerTemplate." + error; + } + if (message.github != null && message.hasOwnProperty("github")) { + var error = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.verify(message.github); + if (error) + return "github." + error; + } + if (message.build != null && message.hasOwnProperty("build")) { + properties.buildTemplate = 1; + { + var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); + if (error) + return "build." + error; + } + } + if (message.filename != null && message.hasOwnProperty("filename")) { + if (properties.buildTemplate === 1) + return "buildTemplate: multiple values"; + properties.buildTemplate = 1; + if (!$util.isString(message.filename)) + return "filename: string expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + if (typeof message.disabled !== "boolean") + return "disabled: boolean expected"; + if (message.substitutions != null && message.hasOwnProperty("substitutions")) { + if (!$util.isObject(message.substitutions)) + return "substitutions: object expected"; + var key = Object.keys(message.substitutions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.substitutions[key[i]])) + return "substitutions: string{k:string} expected"; + } + if (message.ignoredFiles != null && message.hasOwnProperty("ignoredFiles")) { + if (!Array.isArray(message.ignoredFiles)) + return "ignoredFiles: array expected"; + for (var i = 0; i < message.ignoredFiles.length; ++i) + if (!$util.isString(message.ignoredFiles[i])) + return "ignoredFiles: string[] expected"; + } + if (message.includedFiles != null && message.hasOwnProperty("includedFiles")) { + if (!Array.isArray(message.includedFiles)) + return "includedFiles: array expected"; + for (var i = 0; i < message.includedFiles.length; ++i) + if (!$util.isString(message.includedFiles[i])) + return "includedFiles: string[] expected"; } - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) - if (typeof message.invertRegex !== "boolean") - return "invertRegex: boolean expected"; return null; }; /** - * Creates a PushFilter message from a plain object. Also converts values to their respective internal types. + * Creates a BuildTrigger message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter + * @returns {google.devtools.cloudbuild.v1.BuildTrigger} BuildTrigger */ - PushFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.PushFilter) + BuildTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildTrigger) return object; - var message = new $root.google.devtools.cloudbuild.v1.PushFilter(); - if (object.branch != null) - message.branch = String(object.branch); - if (object.tag != null) - message.tag = String(object.tag); - if (object.invertRegex != null) - message.invertRegex = Boolean(object.invertRegex); - return message; - }; - - /** - * Creates a plain object from a PushFilter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.cloudbuild.v1.PushFilter - * @static - * @param {google.devtools.cloudbuild.v1.PushFilter} message PushFilter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PushFilter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.invertRegex = false; - if (message.branch != null && message.hasOwnProperty("branch")) { - object.branch = message.branch; - if (options.oneofs) - object.gitRef = "branch"; - } - if (message.tag != null && message.hasOwnProperty("tag")) { - object.tag = message.tag; + var message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(); + if (object.id != null) + message.id = String(object.id); + if (object.description != null) + message.description = String(object.description); + if (object.name != null) + message.name = String(object.name); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.triggerTemplate != null) { + if (typeof object.triggerTemplate !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.triggerTemplate: object expected"); + message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.triggerTemplate); + } + if (object.github != null) { + if (typeof object.github !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.github: object expected"); + message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.fromObject(object.github); + } + if (object.build != null) { + if (typeof object.build !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.build: object expected"); + message.build = $root.google.devtools.cloudbuild.v1.Build.fromObject(object.build); + } + if (object.filename != null) + message.filename = String(object.filename); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.disabled != null) + message.disabled = Boolean(object.disabled); + if (object.substitutions) { + if (typeof object.substitutions !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.substitutions: object expected"); + message.substitutions = {}; + for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) + message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); + } + if (object.ignoredFiles) { + if (!Array.isArray(object.ignoredFiles)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.ignoredFiles: array expected"); + message.ignoredFiles = []; + for (var i = 0; i < object.ignoredFiles.length; ++i) + message.ignoredFiles[i] = String(object.ignoredFiles[i]); + } + if (object.includedFiles) { + if (!Array.isArray(object.includedFiles)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.includedFiles: array expected"); + message.includedFiles = []; + for (var i = 0; i < object.includedFiles.length; ++i) + message.includedFiles[i] = String(object.includedFiles[i]); + } + return message; + }; + + /** + * Creates a plain object from a BuildTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {google.devtools.cloudbuild.v1.BuildTrigger} message BuildTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredFiles = []; + object.includedFiles = []; + object.tags = []; + } + if (options.objects || options.defaults) + object.substitutions = {}; + if (options.defaults) { + object.id = ""; + object.createTime = null; + object.triggerTemplate = null; + object.disabled = false; + object.description = ""; + object.github = null; + object.name = ""; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.build != null && message.hasOwnProperty("build")) { + object.build = $root.google.devtools.cloudbuild.v1.Build.toObject(message.build, options); if (options.oneofs) - object.gitRef = "tag"; + object.buildTemplate = "build"; } - if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) - object.invertRegex = message.invertRegex; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.triggerTemplate != null && message.hasOwnProperty("triggerTemplate")) + object.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.triggerTemplate, options); + if (message.filename != null && message.hasOwnProperty("filename")) { + object.filename = message.filename; + if (options.oneofs) + object.buildTemplate = "filename"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) + object.disabled = message.disabled; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { + object.substitutions = {}; + for (var j = 0; j < keys2.length; ++j) + object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; + } + if (message.github != null && message.hasOwnProperty("github")) + object.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.toObject(message.github, options); + if (message.ignoredFiles && message.ignoredFiles.length) { + object.ignoredFiles = []; + for (var j = 0; j < message.ignoredFiles.length; ++j) + object.ignoredFiles[j] = message.ignoredFiles[j]; + } + if (message.includedFiles && message.includedFiles.length) { + object.includedFiles = []; + for (var j = 0; j < message.includedFiles.length; ++j) + object.includedFiles[j] = message.includedFiles[j]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this PushFilter to JSON. + * Converts this BuildTrigger to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.PushFilter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance * @returns {Object.} JSON object */ - PushFilter.prototype.toJSON = function toJSON() { + BuildTrigger.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return PushFilter; + return BuildTrigger; })(); - v1.CreateBuildTriggerRequest = (function() { + v1.GitHubEventsConfig = (function() { /** - * Properties of a CreateBuildTriggerRequest. + * Properties of a GitHubEventsConfig. * @memberof google.devtools.cloudbuild.v1 - * @interface ICreateBuildTriggerRequest - * @property {string|null} [projectId] CreateBuildTriggerRequest projectId - * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] CreateBuildTriggerRequest trigger + * @interface IGitHubEventsConfig + * @property {number|Long|null} [installationId] GitHubEventsConfig installationId + * @property {string|null} [owner] GitHubEventsConfig owner + * @property {string|null} [name] GitHubEventsConfig name + * @property {google.devtools.cloudbuild.v1.IPullRequestFilter|null} [pullRequest] GitHubEventsConfig pullRequest + * @property {google.devtools.cloudbuild.v1.IPushFilter|null} [push] GitHubEventsConfig push */ /** - * Constructs a new CreateBuildTriggerRequest. + * Constructs a new GitHubEventsConfig. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a CreateBuildTriggerRequest. - * @implements ICreateBuildTriggerRequest + * @classdesc Represents a GitHubEventsConfig. + * @implements IGitHubEventsConfig * @constructor - * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set */ - function CreateBuildTriggerRequest(properties) { + function GitHubEventsConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9219,88 +9131,141 @@ } /** - * CreateBuildTriggerRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * GitHubEventsConfig installationId. + * @member {number|Long} installationId + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @instance */ - CreateBuildTriggerRequest.prototype.projectId = ""; + GitHubEventsConfig.prototype.installationId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * CreateBuildTriggerRequest trigger. - * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * GitHubEventsConfig owner. + * @member {string} owner + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @instance */ - CreateBuildTriggerRequest.prototype.trigger = null; + GitHubEventsConfig.prototype.owner = ""; /** - * Creates a new CreateBuildTriggerRequest instance using the specified properties. + * GitHubEventsConfig name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.name = ""; + + /** + * GitHubEventsConfig pullRequest. + * @member {google.devtools.cloudbuild.v1.IPullRequestFilter|null|undefined} pullRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.pullRequest = null; + + /** + * GitHubEventsConfig push. + * @member {google.devtools.cloudbuild.v1.IPushFilter|null|undefined} push + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + GitHubEventsConfig.prototype.push = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GitHubEventsConfig event. + * @member {"pullRequest"|"push"|undefined} event + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @instance + */ + Object.defineProperty(GitHubEventsConfig.prototype, "event", { + get: $util.oneOfGetter($oneOfFields = ["pullRequest", "push"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GitHubEventsConfig instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest instance + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig instance */ - CreateBuildTriggerRequest.create = function create(properties) { - return new CreateBuildTriggerRequest(properties); + GitHubEventsConfig.create = function create(properties) { + return new GitHubEventsConfig(properties); }; /** - * Encodes the specified CreateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. + * Encodes the specified GitHubEventsConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBuildTriggerRequest.encode = function encode(message, writer) { + GitHubEventsConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest - * @static - * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode + if (message.installationId != null && Object.hasOwnProperty.call(message, "installationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.installationId); + if (message.pullRequest != null && Object.hasOwnProperty.call(message, "pullRequest")) + $root.google.devtools.cloudbuild.v1.PullRequestFilter.encode(message.pullRequest, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.push != null && Object.hasOwnProperty.call(message, "push")) + $root.google.devtools.cloudbuild.v1.PushFilter.encode(message.push, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.owner); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.name); + return writer; + }; + + /** + * Encodes the specified GitHubEventsConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GitHubEventsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {google.devtools.cloudbuild.v1.IGitHubEventsConfig} message GitHubEventsConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + GitHubEventsConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer. + * Decodes a GitHubEventsConfig message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBuildTriggerRequest.decode = function decode(reader, length) { + GitHubEventsConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.projectId = reader.string(); + message.installationId = reader.int64(); break; - case 2: - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + case 6: + message.owner = reader.string(); + break; + case 7: + message.name = reader.string(); + break; + case 4: + message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.decode(reader, reader.uint32()); + break; + case 5: + message.push = $root.google.devtools.cloudbuild.v1.PushFilter.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9311,122 +9276,179 @@ }; /** - * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a GitHubEventsConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + GitHubEventsConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateBuildTriggerRequest message. + * Verifies a GitHubEventsConfig message. * @function verify - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateBuildTriggerRequest.verify = function verify(message) { + GitHubEventsConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); - if (error) - return "trigger." + error; + var properties = {}; + if (message.installationId != null && message.hasOwnProperty("installationId")) + if (!$util.isInteger(message.installationId) && !(message.installationId && $util.isInteger(message.installationId.low) && $util.isInteger(message.installationId.high))) + return "installationId: integer|Long expected"; + if (message.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { + properties.event = 1; + { + var error = $root.google.devtools.cloudbuild.v1.PullRequestFilter.verify(message.pullRequest); + if (error) + return "pullRequest." + error; + } + } + if (message.push != null && message.hasOwnProperty("push")) { + if (properties.event === 1) + return "event: multiple values"; + properties.event = 1; + { + var error = $root.google.devtools.cloudbuild.v1.PushFilter.verify(message.push); + if (error) + return "push." + error; + } } return null; }; /** - * Creates a CreateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GitHubEventsConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GitHubEventsConfig} GitHubEventsConfig */ - CreateBuildTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest) + GitHubEventsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GitHubEventsConfig) return object; - var message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.trigger: object expected"); - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); + var message = new $root.google.devtools.cloudbuild.v1.GitHubEventsConfig(); + if (object.installationId != null) + if ($util.Long) + (message.installationId = $util.Long.fromValue(object.installationId)).unsigned = false; + else if (typeof object.installationId === "string") + message.installationId = parseInt(object.installationId, 10); + else if (typeof object.installationId === "number") + message.installationId = object.installationId; + else if (typeof object.installationId === "object") + message.installationId = new $util.LongBits(object.installationId.low >>> 0, object.installationId.high >>> 0).toNumber(); + if (object.owner != null) + message.owner = String(object.owner); + if (object.name != null) + message.name = String(object.name); + if (object.pullRequest != null) { + if (typeof object.pullRequest !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.pullRequest: object expected"); + message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.fromObject(object.pullRequest); + } + if (object.push != null) { + if (typeof object.push !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.GitHubEventsConfig.push: object expected"); + message.push = $root.google.devtools.cloudbuild.v1.PushFilter.fromObject(object.push); } return message; }; /** - * Creates a plain object from a CreateBuildTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a GitHubEventsConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @static - * @param {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} message CreateBuildTriggerRequest + * @param {google.devtools.cloudbuild.v1.GitHubEventsConfig} message GitHubEventsConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateBuildTriggerRequest.toObject = function toObject(message, options) { + GitHubEventsConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.trigger = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.installationId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.installationId = options.longs === String ? "0" : 0; + object.owner = ""; + object.name = ""; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + if (message.installationId != null && message.hasOwnProperty("installationId")) + if (typeof message.installationId === "number") + object.installationId = options.longs === String ? String(message.installationId) : message.installationId; + else + object.installationId = options.longs === String ? $util.Long.prototype.toString.call(message.installationId) : options.longs === Number ? new $util.LongBits(message.installationId.low >>> 0, message.installationId.high >>> 0).toNumber() : message.installationId; + if (message.pullRequest != null && message.hasOwnProperty("pullRequest")) { + object.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.toObject(message.pullRequest, options); + if (options.oneofs) + object.event = "pullRequest"; + } + if (message.push != null && message.hasOwnProperty("push")) { + object.push = $root.google.devtools.cloudbuild.v1.PushFilter.toObject(message.push, options); + if (options.oneofs) + object.event = "push"; + } + if (message.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateBuildTriggerRequest to JSON. + * Converts this GitHubEventsConfig to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig * @instance * @returns {Object.} JSON object */ - CreateBuildTriggerRequest.prototype.toJSON = function toJSON() { + GitHubEventsConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateBuildTriggerRequest; + return GitHubEventsConfig; })(); - v1.GetBuildTriggerRequest = (function() { + v1.PullRequestFilter = (function() { /** - * Properties of a GetBuildTriggerRequest. + * Properties of a PullRequestFilter. * @memberof google.devtools.cloudbuild.v1 - * @interface IGetBuildTriggerRequest - * @property {string|null} [projectId] GetBuildTriggerRequest projectId - * @property {string|null} [triggerId] GetBuildTriggerRequest triggerId + * @interface IPullRequestFilter + * @property {string|null} [branch] PullRequestFilter branch + * @property {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|null} [commentControl] PullRequestFilter commentControl + * @property {boolean|null} [invertRegex] PullRequestFilter invertRegex */ /** - * Constructs a new GetBuildTriggerRequest. + * Constructs a new PullRequestFilter. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a GetBuildTriggerRequest. - * @implements IGetBuildTriggerRequest + * @classdesc Represents a PullRequestFilter. + * @implements IPullRequestFilter * @constructor - * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set */ - function GetBuildTriggerRequest(properties) { + function PullRequestFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9434,88 +9456,115 @@ } /** - * GetBuildTriggerRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * PullRequestFilter branch. + * @member {string} branch + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @instance */ - GetBuildTriggerRequest.prototype.projectId = ""; + PullRequestFilter.prototype.branch = ""; /** - * GetBuildTriggerRequest triggerId. - * @member {string} triggerId - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * PullRequestFilter commentControl. + * @member {google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl} commentControl + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @instance */ - GetBuildTriggerRequest.prototype.triggerId = ""; + PullRequestFilter.prototype.commentControl = 0; /** - * Creates a new GetBuildTriggerRequest instance using the specified properties. + * PullRequestFilter invertRegex. + * @member {boolean} invertRegex + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + PullRequestFilter.prototype.invertRegex = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PullRequestFilter gitRef. + * @member {"branch"|undefined} gitRef + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @instance + */ + Object.defineProperty(PullRequestFilter.prototype, "gitRef", { + get: $util.oneOfGetter($oneOfFields = ["branch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PullRequestFilter instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest instance + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter instance */ - GetBuildTriggerRequest.create = function create(properties) { - return new GetBuildTriggerRequest(properties); + PullRequestFilter.create = function create(properties) { + return new PullRequestFilter(properties); }; /** - * Encodes the specified GetBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * Encodes the specified PullRequestFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBuildTriggerRequest.encode = function encode(message, writer) { + PullRequestFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.branch != null && Object.hasOwnProperty.call(message, "branch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); + if (message.commentControl != null && Object.hasOwnProperty.call(message, "commentControl")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.commentControl); + if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.invertRegex); return writer; }; /** - * Encodes the specified GetBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. + * Encodes the specified PullRequestFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PullRequestFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static - * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPullRequestFilter} message PullRequestFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + PullRequestFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetBuildTriggerRequest message from the specified reader or buffer. + * Decodes a PullRequestFilter message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBuildTriggerRequest.decode = function decode(reader, length) { + PullRequestFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.projectId = reader.string(); - break; case 2: - message.triggerId = reader.string(); + message.branch = reader.string(); + break; + case 5: + message.commentControl = reader.int32(); + break; + case 6: + message.invertRegex = reader.bool(); break; default: reader.skipType(tag & 7); @@ -9526,118 +9575,165 @@ }; /** - * Decodes a GetBuildTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a PullRequestFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + PullRequestFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetBuildTriggerRequest message. + * Verifies a PullRequestFilter message. * @function verify - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetBuildTriggerRequest.verify = function verify(message) { + PullRequestFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - if (!$util.isString(message.triggerId)) - return "triggerId: string expected"; + var properties = {}; + if (message.branch != null && message.hasOwnProperty("branch")) { + properties.gitRef = 1; + if (!$util.isString(message.branch)) + return "branch: string expected"; + } + if (message.commentControl != null && message.hasOwnProperty("commentControl")) + switch (message.commentControl) { + default: + return "commentControl: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (typeof message.invertRegex !== "boolean") + return "invertRegex: boolean expected"; return null; }; /** - * Creates a GetBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PullRequestFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.PullRequestFilter} PullRequestFilter */ - GetBuildTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest) + PullRequestFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PullRequestFilter) return object; - var message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.triggerId != null) - message.triggerId = String(object.triggerId); + var message = new $root.google.devtools.cloudbuild.v1.PullRequestFilter(); + if (object.branch != null) + message.branch = String(object.branch); + switch (object.commentControl) { + case "COMMENTS_DISABLED": + case 0: + message.commentControl = 0; + break; + case "COMMENTS_ENABLED": + case 1: + message.commentControl = 1; + break; + case "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY": + case 2: + message.commentControl = 2; + break; + } + if (object.invertRegex != null) + message.invertRegex = Boolean(object.invertRegex); return message; }; /** - * Creates a plain object from a GetBuildTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a PullRequestFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @static - * @param {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} message GetBuildTriggerRequest + * @param {google.devtools.cloudbuild.v1.PullRequestFilter} message PullRequestFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetBuildTriggerRequest.toObject = function toObject(message, options) { + PullRequestFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.triggerId = ""; + object.commentControl = options.enums === String ? "COMMENTS_DISABLED" : 0; + object.invertRegex = false; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - object.triggerId = message.triggerId; + if (message.branch != null && message.hasOwnProperty("branch")) { + object.branch = message.branch; + if (options.oneofs) + object.gitRef = "branch"; + } + if (message.commentControl != null && message.hasOwnProperty("commentControl")) + object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + object.invertRegex = message.invertRegex; return object; }; /** - * Converts this GetBuildTriggerRequest to JSON. + * Converts this PullRequestFilter to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @instance * @returns {Object.} JSON object */ - GetBuildTriggerRequest.prototype.toJSON = function toJSON() { + PullRequestFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetBuildTriggerRequest; + /** + * CommentControl enum. + * @name google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl + * @enum {number} + * @property {number} COMMENTS_DISABLED=0 COMMENTS_DISABLED value + * @property {number} COMMENTS_ENABLED=1 COMMENTS_ENABLED value + * @property {number} COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY=2 COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY value + */ + PullRequestFilter.CommentControl = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMMENTS_DISABLED"] = 0; + values[valuesById[1] = "COMMENTS_ENABLED"] = 1; + values[valuesById[2] = "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY"] = 2; + return values; + })(); + + return PullRequestFilter; })(); - v1.ListBuildTriggersRequest = (function() { + v1.PushFilter = (function() { /** - * Properties of a ListBuildTriggersRequest. + * Properties of a PushFilter. * @memberof google.devtools.cloudbuild.v1 - * @interface IListBuildTriggersRequest - * @property {string|null} [projectId] ListBuildTriggersRequest projectId - * @property {number|null} [pageSize] ListBuildTriggersRequest pageSize - * @property {string|null} [pageToken] ListBuildTriggersRequest pageToken + * @interface IPushFilter + * @property {string|null} [branch] PushFilter branch + * @property {string|null} [tag] PushFilter tag + * @property {boolean|null} [invertRegex] PushFilter invertRegex */ /** - * Constructs a new ListBuildTriggersRequest. + * Constructs a new PushFilter. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListBuildTriggersRequest. - * @implements IListBuildTriggersRequest + * @classdesc Represents a PushFilter. + * @implements IPushFilter * @constructor - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set */ - function ListBuildTriggersRequest(properties) { + function PushFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9645,101 +9741,115 @@ } /** - * ListBuildTriggersRequest projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * PushFilter branch. + * @member {string} branch + * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance */ - ListBuildTriggersRequest.prototype.projectId = ""; + PushFilter.prototype.branch = ""; /** - * ListBuildTriggersRequest pageSize. - * @member {number} pageSize - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * PushFilter tag. + * @member {string} tag + * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance */ - ListBuildTriggersRequest.prototype.pageSize = 0; + PushFilter.prototype.tag = ""; /** - * ListBuildTriggersRequest pageToken. - * @member {string} pageToken - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * PushFilter invertRegex. + * @member {boolean} invertRegex + * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance */ - ListBuildTriggersRequest.prototype.pageToken = ""; + PushFilter.prototype.invertRegex = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new ListBuildTriggersRequest instance using the specified properties. + * PushFilter gitRef. + * @member {"branch"|"tag"|undefined} gitRef + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @instance + */ + Object.defineProperty(PushFilter.prototype, "gitRef", { + get: $util.oneOfGetter($oneOfFields = ["branch", "tag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PushFilter instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest instance + * @param {google.devtools.cloudbuild.v1.IPushFilter=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter instance */ - ListBuildTriggersRequest.create = function create(properties) { - return new ListBuildTriggersRequest(properties); + PushFilter.create = function create(properties) { + return new PushFilter(properties); }; /** - * Encodes the specified ListBuildTriggersRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * Encodes the specified PushFilter message. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildTriggersRequest.encode = function encode(message, writer) { + PushFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.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.branch != null && Object.hasOwnProperty.call(message, "branch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.branch); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tag); + if (message.invertRegex != null && Object.hasOwnProperty.call(message, "invertRegex")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.invertRegex); return writer; }; /** - * Encodes the specified ListBuildTriggersRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. + * Encodes the specified PushFilter message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PushFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPushFilter} message PushFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + PushFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBuildTriggersRequest message from the specified reader or buffer. + * Decodes a PushFilter message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildTriggersRequest.decode = function decode(reader, length) { + PushFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PushFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.projectId = reader.string(); - break; case 2: - message.pageSize = reader.int32(); + message.branch = reader.string(); break; case 3: - message.pageToken = reader.string(); + message.tag = reader.string(); + break; + case 4: + message.invertRegex = reader.bool(); break; default: reader.skipType(tag & 7); @@ -9750,126 +9860,135 @@ }; /** - * Decodes a ListBuildTriggersRequest message from the specified reader or buffer, length delimited. + * Decodes a PushFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + PushFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBuildTriggersRequest message. + * Verifies a PushFilter message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBuildTriggersRequest.verify = function verify(message) { + PushFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.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"; + var properties = {}; + if (message.branch != null && message.hasOwnProperty("branch")) { + properties.gitRef = 1; + if (!$util.isString(message.branch)) + return "branch: string expected"; + } + if (message.tag != null && message.hasOwnProperty("tag")) { + if (properties.gitRef === 1) + return "gitRef: multiple values"; + properties.gitRef = 1; + if (!$util.isString(message.tag)) + return "tag: string expected"; + } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + if (typeof message.invertRegex !== "boolean") + return "invertRegex: boolean expected"; return null; }; /** - * Creates a ListBuildTriggersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PushFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest + * @returns {google.devtools.cloudbuild.v1.PushFilter} PushFilter */ - ListBuildTriggersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest) + PushFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PushFilter) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); + var message = new $root.google.devtools.cloudbuild.v1.PushFilter(); + if (object.branch != null) + message.branch = String(object.branch); + if (object.tag != null) + message.tag = String(object.tag); + if (object.invertRegex != null) + message.invertRegex = Boolean(object.invertRegex); return message; }; /** - * Creates a plain object from a ListBuildTriggersRequest message. Also converts values to other types if specified. + * Creates a plain object from a PushFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @static - * @param {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} message ListBuildTriggersRequest + * @param {google.devtools.cloudbuild.v1.PushFilter} message PushFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBuildTriggersRequest.toObject = function toObject(message, options) { + PushFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectId = ""; - object.pageSize = 0; - object.pageToken = ""; + if (options.defaults) + object.invertRegex = false; + if (message.branch != null && message.hasOwnProperty("branch")) { + object.branch = message.branch; + if (options.oneofs) + object.gitRef = "branch"; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; + if (message.tag != null && message.hasOwnProperty("tag")) { + object.tag = message.tag; + if (options.oneofs) + object.gitRef = "tag"; + } + if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) + object.invertRegex = message.invertRegex; return object; }; /** - * Converts this ListBuildTriggersRequest to JSON. + * Converts this PushFilter to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance * @returns {Object.} JSON object */ - ListBuildTriggersRequest.prototype.toJSON = function toJSON() { + PushFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBuildTriggersRequest; + return PushFilter; })(); - v1.ListBuildTriggersResponse = (function() { + v1.CreateBuildTriggerRequest = (function() { /** - * Properties of a ListBuildTriggersResponse. + * Properties of a CreateBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IListBuildTriggersResponse - * @property {Array.|null} [triggers] ListBuildTriggersResponse triggers - * @property {string|null} [nextPageToken] ListBuildTriggersResponse nextPageToken + * @interface ICreateBuildTriggerRequest + * @property {string|null} [projectId] CreateBuildTriggerRequest projectId + * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] CreateBuildTriggerRequest trigger */ /** - * Constructs a new ListBuildTriggersResponse. + * Constructs a new CreateBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListBuildTriggersResponse. - * @implements IListBuildTriggersResponse + * @classdesc Represents a CreateBuildTriggerRequest. + * @implements ICreateBuildTriggerRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set */ - function ListBuildTriggersResponse(properties) { - this.triggers = []; + function CreateBuildTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9877,91 +9996,88 @@ } /** - * ListBuildTriggersResponse triggers. - * @member {Array.} triggers - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * CreateBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @instance */ - ListBuildTriggersResponse.prototype.triggers = $util.emptyArray; + CreateBuildTriggerRequest.prototype.projectId = ""; /** - * ListBuildTriggersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * CreateBuildTriggerRequest trigger. + * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @instance */ - ListBuildTriggersResponse.prototype.nextPageToken = ""; + CreateBuildTriggerRequest.prototype.trigger = null; /** - * Creates a new ListBuildTriggersResponse instance using the specified properties. + * Creates a new CreateBuildTriggerRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse instance + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest instance */ - ListBuildTriggersResponse.create = function create(properties) { - return new ListBuildTriggersResponse(properties); + CreateBuildTriggerRequest.create = function create(properties) { + return new CreateBuildTriggerRequest(properties); }; /** - * Encodes the specified ListBuildTriggersResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * Encodes the specified CreateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildTriggersResponse.encode = function encode(message, writer) { + CreateBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.triggers != null && message.triggers.length) - for (var i = 0; i < message.triggers.length; ++i) - $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.triggers[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.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListBuildTriggersResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * Encodes the specified CreateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest} message CreateBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListBuildTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + CreateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListBuildTriggersResponse message from the specified reader or buffer. + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildTriggersResponse.decode = function decode(reader, length) { + CreateBuildTriggerRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.triggers && message.triggers.length)) - message.triggers = []; - message.triggers.push($root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32())); + message.projectId = reader.string(); break; case 2: - message.nextPageToken = reader.string(); + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -9972,134 +10088,122 @@ }; /** - * Decodes a ListBuildTriggersResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateBuildTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListBuildTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + CreateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListBuildTriggersResponse message. + * Verifies a CreateBuildTriggerRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListBuildTriggersResponse.verify = function verify(message) { + CreateBuildTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.triggers != null && message.hasOwnProperty("triggers")) { - if (!Array.isArray(message.triggers)) - return "triggers: array expected"; - for (var i = 0; i < message.triggers.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.triggers[i]); - if (error) - return "triggers." + error; - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); + if (error) + return "trigger." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListBuildTriggersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @returns {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} CreateBuildTriggerRequest */ - ListBuildTriggersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse) + CreateBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); - if (object.triggers) { - if (!Array.isArray(object.triggers)) - throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: array expected"); - message.triggers = []; - for (var i = 0; i < object.triggers.length; ++i) { - if (typeof object.triggers[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: object expected"); - message.triggers[i] = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.triggers[i]); - } + var message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateBuildTriggerRequest.trigger: object expected"); + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListBuildTriggersResponse message. Also converts values to other types if specified. + * Creates a plain object from a CreateBuildTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} message ListBuildTriggersResponse + * @param {google.devtools.cloudbuild.v1.CreateBuildTriggerRequest} message CreateBuildTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListBuildTriggersResponse.toObject = function toObject(message, options) { + CreateBuildTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.triggers = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.triggers && message.triggers.length) { - object.triggers = []; - for (var j = 0; j < message.triggers.length; ++j) - object.triggers[j] = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.triggers[j], options); + if (options.defaults) { + object.projectId = ""; + object.trigger = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); return object; }; /** - * Converts this ListBuildTriggersResponse to JSON. + * Converts this CreateBuildTriggerRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest * @instance * @returns {Object.} JSON object */ - ListBuildTriggersResponse.prototype.toJSON = function toJSON() { + CreateBuildTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBuildTriggersResponse; + return CreateBuildTriggerRequest; })(); - v1.DeleteBuildTriggerRequest = (function() { + v1.GetBuildTriggerRequest = (function() { /** - * Properties of a DeleteBuildTriggerRequest. + * Properties of a GetBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IDeleteBuildTriggerRequest - * @property {string|null} [projectId] DeleteBuildTriggerRequest projectId - * @property {string|null} [triggerId] DeleteBuildTriggerRequest triggerId + * @interface IGetBuildTriggerRequest + * @property {string|null} [projectId] GetBuildTriggerRequest projectId + * @property {string|null} [triggerId] GetBuildTriggerRequest triggerId */ /** - * Constructs a new DeleteBuildTriggerRequest. + * Constructs a new GetBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a DeleteBuildTriggerRequest. - * @implements IDeleteBuildTriggerRequest + * @classdesc Represents a GetBuildTriggerRequest. + * @implements IGetBuildTriggerRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set */ - function DeleteBuildTriggerRequest(properties) { + function GetBuildTriggerRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10107,43 +10211,43 @@ } /** - * DeleteBuildTriggerRequest projectId. + * GetBuildTriggerRequest projectId. * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @instance */ - DeleteBuildTriggerRequest.prototype.projectId = ""; + GetBuildTriggerRequest.prototype.projectId = ""; /** - * DeleteBuildTriggerRequest triggerId. + * GetBuildTriggerRequest triggerId. * @member {string} triggerId - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @instance */ - DeleteBuildTriggerRequest.prototype.triggerId = ""; + GetBuildTriggerRequest.prototype.triggerId = ""; /** - * Creates a new DeleteBuildTriggerRequest instance using the specified properties. + * Creates a new GetBuildTriggerRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest instance + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest instance */ - DeleteBuildTriggerRequest.create = function create(properties) { - return new DeleteBuildTriggerRequest(properties); + GetBuildTriggerRequest.create = function create(properties) { + return new GetBuildTriggerRequest(properties); }; /** - * Encodes the specified DeleteBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * Encodes the specified GetBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBuildTriggerRequest.encode = function encode(message, writer) { + GetBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) @@ -10154,33 +10258,33 @@ }; /** - * Encodes the specified DeleteBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. + * Encodes the specified GetBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetBuildTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IGetBuildTriggerRequest} message GetBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer. + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBuildTriggerRequest.decode = function decode(reader, length) { + GetBuildTriggerRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10199,30 +10303,30 @@ }; /** - * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a GetBuildTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + GetBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteBuildTriggerRequest message. + * Verifies a GetBuildTriggerRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteBuildTriggerRequest.verify = function verify(message) { + GetBuildTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.projectId != null && message.hasOwnProperty("projectId")) @@ -10235,17 +10339,17 @@ }; /** - * Creates a DeleteBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} GetBuildTriggerRequest */ - DeleteBuildTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest) + GetBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + var message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); if (object.projectId != null) message.projectId = String(object.projectId); if (object.triggerId != null) @@ -10254,15 +10358,15 @@ }; /** - * Creates a plain object from a DeleteBuildTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetBuildTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} message DeleteBuildTriggerRequest + * @param {google.devtools.cloudbuild.v1.GetBuildTriggerRequest} message GetBuildTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteBuildTriggerRequest.toObject = function toObject(message, options) { + GetBuildTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -10278,39 +10382,39 @@ }; /** - * Converts this DeleteBuildTriggerRequest to JSON. + * Converts this GetBuildTriggerRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest * @instance * @returns {Object.} JSON object */ - DeleteBuildTriggerRequest.prototype.toJSON = function toJSON() { + GetBuildTriggerRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteBuildTriggerRequest; + return GetBuildTriggerRequest; })(); - v1.UpdateBuildTriggerRequest = (function() { + v1.ListBuildTriggersRequest = (function() { /** - * Properties of an UpdateBuildTriggerRequest. + * Properties of a ListBuildTriggersRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IUpdateBuildTriggerRequest - * @property {string|null} [projectId] UpdateBuildTriggerRequest projectId - * @property {string|null} [triggerId] UpdateBuildTriggerRequest triggerId - * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] UpdateBuildTriggerRequest trigger + * @interface IListBuildTriggersRequest + * @property {string|null} [projectId] ListBuildTriggersRequest projectId + * @property {number|null} [pageSize] ListBuildTriggersRequest pageSize + * @property {string|null} [pageToken] ListBuildTriggersRequest pageToken */ /** - * Constructs a new UpdateBuildTriggerRequest. + * Constructs a new ListBuildTriggersRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents an UpdateBuildTriggerRequest. - * @implements IUpdateBuildTriggerRequest + * @classdesc Represents a ListBuildTriggersRequest. + * @implements IListBuildTriggersRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set */ - function UpdateBuildTriggerRequest(properties) { + function ListBuildTriggersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10318,90 +10422,90 @@ } /** - * UpdateBuildTriggerRequest projectId. + * ListBuildTriggersRequest projectId. * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @instance */ - UpdateBuildTriggerRequest.prototype.projectId = ""; + ListBuildTriggersRequest.prototype.projectId = ""; /** - * UpdateBuildTriggerRequest triggerId. - * @member {string} triggerId - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * ListBuildTriggersRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @instance */ - UpdateBuildTriggerRequest.prototype.triggerId = ""; + ListBuildTriggersRequest.prototype.pageSize = 0; /** - * UpdateBuildTriggerRequest trigger. - * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * ListBuildTriggersRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @instance */ - UpdateBuildTriggerRequest.prototype.trigger = null; + ListBuildTriggersRequest.prototype.pageToken = ""; /** - * Creates a new UpdateBuildTriggerRequest instance using the specified properties. + * Creates a new ListBuildTriggersRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static - * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest instance + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest instance */ - UpdateBuildTriggerRequest.create = function create(properties) { - return new UpdateBuildTriggerRequest(properties); + ListBuildTriggersRequest.create = function create(properties) { + return new ListBuildTriggersRequest(properties); }; /** - * Encodes the specified UpdateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * Encodes the specified ListBuildTriggersRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static - * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBuildTriggerRequest.encode = function encode(message, writer) { + ListBuildTriggersRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); - if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) - $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + 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 UpdateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * Encodes the specified ListBuildTriggersRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static - * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersRequest} message ListBuildTriggersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListBuildTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer. + * Decodes a ListBuildTriggersRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBuildTriggerRequest.decode = function decode(reader, length) { + ListBuildTriggersRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10409,10 +10513,10 @@ message.projectId = reader.string(); break; case 2: - message.triggerId = reader.string(); + message.pageSize = reader.int32(); break; case 3: - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -10423,144 +10527,126 @@ }; /** - * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * Decodes a ListBuildTriggersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + ListBuildTriggersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateBuildTriggerRequest message. + * Verifies a ListBuildTriggersRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateBuildTriggerRequest.verify = function verify(message) { + ListBuildTriggersRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - if (!$util.isString(message.triggerId)) - return "triggerId: string expected"; - if (message.trigger != null && message.hasOwnProperty("trigger")) { - var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); - if (error) - return "trigger." + error; - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates an UpdateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListBuildTriggersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} ListBuildTriggersRequest */ - UpdateBuildTriggerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest) + ListBuildTriggersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); if (object.projectId != null) message.projectId = String(object.projectId); - if (object.triggerId != null) - message.triggerId = String(object.triggerId); - if (object.trigger != null) { - if (typeof object.trigger !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.trigger: object expected"); - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); - } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); return message; }; /** - * Creates a plain object from an UpdateBuildTriggerRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListBuildTriggersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @static - * @param {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} message UpdateBuildTriggerRequest + * @param {google.devtools.cloudbuild.v1.ListBuildTriggersRequest} message ListBuildTriggersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateBuildTriggerRequest.toObject = function toObject(message, options) { + ListBuildTriggersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.projectId = ""; - object.triggerId = ""; - object.trigger = null; + object.pageSize = 0; + object.pageToken = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; - if (message.triggerId != null && message.hasOwnProperty("triggerId")) - object.triggerId = message.triggerId; - if (message.trigger != null && message.hasOwnProperty("trigger")) - object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + 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 UpdateBuildTriggerRequest to JSON. + * Converts this ListBuildTriggersRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest * @instance * @returns {Object.} JSON object */ - UpdateBuildTriggerRequest.prototype.toJSON = function toJSON() { + ListBuildTriggersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateBuildTriggerRequest; + return ListBuildTriggersRequest; })(); - v1.BuildOptions = (function() { + v1.ListBuildTriggersResponse = (function() { /** - * Properties of a BuildOptions. + * Properties of a ListBuildTriggersResponse. * @memberof google.devtools.cloudbuild.v1 - * @interface IBuildOptions - * @property {Array.|null} [sourceProvenanceHash] BuildOptions sourceProvenanceHash - * @property {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null} [requestedVerifyOption] BuildOptions requestedVerifyOption - * @property {google.devtools.cloudbuild.v1.BuildOptions.MachineType|null} [machineType] BuildOptions machineType - * @property {number|Long|null} [diskSizeGb] BuildOptions diskSizeGb - * @property {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null} [substitutionOption] BuildOptions substitutionOption - * @property {boolean|null} [dynamicSubstitutions] BuildOptions dynamicSubstitutions - * @property {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null} [logStreamingOption] BuildOptions logStreamingOption - * @property {string|null} [workerPool] BuildOptions workerPool - * @property {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null} [logging] BuildOptions logging - * @property {Array.|null} [env] BuildOptions env - * @property {Array.|null} [secretEnv] BuildOptions secretEnv - * @property {Array.|null} [volumes] BuildOptions volumes + * @interface IListBuildTriggersResponse + * @property {Array.|null} [triggers] ListBuildTriggersResponse triggers + * @property {string|null} [nextPageToken] ListBuildTriggersResponse nextPageToken */ /** - * Constructs a new BuildOptions. + * Constructs a new ListBuildTriggersResponse. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a BuildOptions. - * @implements IBuildOptions + * @classdesc Represents a ListBuildTriggersResponse. + * @implements IListBuildTriggersResponse * @constructor - * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set */ - function BuildOptions(properties) { - this.sourceProvenanceHash = []; - this.env = []; - this.secretEnv = []; - this.volumes = []; + function ListBuildTriggersResponse(properties) { + this.triggers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10568,238 +10654,318 @@ } /** - * BuildOptions sourceProvenanceHash. - * @member {Array.} sourceProvenanceHash - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * ListBuildTriggersResponse triggers. + * @member {Array.} triggers + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse * @instance */ - BuildOptions.prototype.sourceProvenanceHash = $util.emptyArray; + ListBuildTriggersResponse.prototype.triggers = $util.emptyArray; /** - * BuildOptions requestedVerifyOption. - * @member {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption} requestedVerifyOption - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * ListBuildTriggersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse * @instance */ - BuildOptions.prototype.requestedVerifyOption = 0; + ListBuildTriggersResponse.prototype.nextPageToken = ""; /** - * BuildOptions machineType. - * @member {google.devtools.cloudbuild.v1.BuildOptions.MachineType} machineType - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Creates a new ListBuildTriggersResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse instance */ - BuildOptions.prototype.machineType = 0; + ListBuildTriggersResponse.create = function create(properties) { + return new ListBuildTriggersResponse(properties); + }; /** - * BuildOptions diskSizeGb. - * @member {number|Long} diskSizeGb - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Encodes the specified ListBuildTriggersResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BuildOptions.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + ListBuildTriggersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triggers != null && message.triggers.length) + for (var i = 0; i < message.triggers.length; ++i) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.triggers[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; + }; /** - * BuildOptions substitutionOption. - * @member {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption} substitutionOption - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Encodes the specified ListBuildTriggersResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListBuildTriggersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.IListBuildTriggersResponse} message ListBuildTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - BuildOptions.prototype.substitutionOption = 0; + ListBuildTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * BuildOptions dynamicSubstitutions. - * @member {boolean} dynamicSubstitutions - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildOptions.prototype.dynamicSubstitutions = false; + ListBuildTriggersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * BuildOptions logStreamingOption. - * @member {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption} logStreamingOption - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Decodes a ListBuildTriggersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildOptions.prototype.logStreamingOption = 0; + ListBuildTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * BuildOptions workerPool. - * @member {string} workerPool - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + * Verifies a ListBuildTriggersResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildOptions.prototype.workerPool = ""; - - /** - * BuildOptions logging. - * @member {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode} logging - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance + ListBuildTriggersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triggers != null && message.hasOwnProperty("triggers")) { + if (!Array.isArray(message.triggers)) + return "triggers: array expected"; + for (var i = 0; i < message.triggers.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.triggers[i]); + if (error) + return "triggers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBuildTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} ListBuildTriggersResponse */ - BuildOptions.prototype.logging = 0; + ListBuildTriggersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersResponse(); + if (object.triggers) { + if (!Array.isArray(object.triggers)) + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: array expected"); + message.triggers = []; + for (var i = 0; i < object.triggers.length; ++i) { + if (typeof object.triggers[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListBuildTriggersResponse.triggers: object expected"); + message.triggers[i] = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.triggers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; /** - * BuildOptions env. - * @member {Array.} env - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * Creates a plain object from a ListBuildTriggersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {google.devtools.cloudbuild.v1.ListBuildTriggersResponse} message ListBuildTriggersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBuildTriggersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triggers = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.triggers && message.triggers.length) { + object.triggers = []; + for (var j = 0; j < message.triggers.length; ++j) + object.triggers[j] = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.triggers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBuildTriggersResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse * @instance + * @returns {Object.} JSON object */ - BuildOptions.prototype.env = $util.emptyArray; + ListBuildTriggersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListBuildTriggersResponse; + })(); + + v1.DeleteBuildTriggerRequest = (function() { /** - * BuildOptions secretEnv. - * @member {Array.} secretEnv - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * Properties of a DeleteBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IDeleteBuildTriggerRequest + * @property {string|null} [projectId] DeleteBuildTriggerRequest projectId + * @property {string|null} [triggerId] DeleteBuildTriggerRequest triggerId + */ + + /** + * Constructs a new DeleteBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a DeleteBuildTriggerRequest. + * @implements IDeleteBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set + */ + function DeleteBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @instance */ - BuildOptions.prototype.secretEnv = $util.emptyArray; + DeleteBuildTriggerRequest.prototype.projectId = ""; /** - * BuildOptions volumes. - * @member {Array.} volumes - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * DeleteBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @instance */ - BuildOptions.prototype.volumes = $util.emptyArray; + DeleteBuildTriggerRequest.prototype.triggerId = ""; /** - * Creates a new BuildOptions instance using the specified properties. + * Creates a new DeleteBuildTriggerRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions instance + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest instance */ - BuildOptions.create = function create(properties) { - return new BuildOptions(properties); + DeleteBuildTriggerRequest.create = function create(properties) { + return new DeleteBuildTriggerRequest(properties); }; /** - * Encodes the specified BuildOptions message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * Encodes the specified DeleteBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildOptions.encode = function encode(message, writer) { + DeleteBuildTriggerRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceProvenanceHash != null && message.sourceProvenanceHash.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.sourceProvenanceHash.length; ++i) - writer.int32(message.sourceProvenanceHash[i]); - writer.ldelim(); - } - if (message.requestedVerifyOption != null && Object.hasOwnProperty.call(message, "requestedVerifyOption")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.requestedVerifyOption); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.machineType); - if (message.substitutionOption != null && Object.hasOwnProperty.call(message, "substitutionOption")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.substitutionOption); - if (message.logStreamingOption != null && Object.hasOwnProperty.call(message, "logStreamingOption")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.logStreamingOption); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.diskSizeGb); - if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.workerPool); - if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logging); - if (message.env != null && message.env.length) - for (var i = 0; i < message.env.length; ++i) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.env[i]); - if (message.secretEnv != null && message.secretEnv.length) - for (var i = 0; i < message.secretEnv.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.secretEnv[i]); - if (message.volumes != null && message.volumes.length) - for (var i = 0; i < message.volumes.length; ++i) - $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.dynamicSubstitutions != null && Object.hasOwnProperty.call(message, "dynamicSubstitutions")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.dynamicSubstitutions); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); return writer; }; /** - * Encodes the specified BuildOptions message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * Encodes the specified DeleteBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest} message DeleteBuildTriggerRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildOptions.encodeDelimited = function encodeDelimited(message, writer) { + DeleteBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildOptions message from the specified reader or buffer. + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildOptions.decode = function decode(reader, length) { + DeleteBuildTriggerRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.sourceProvenanceHash && message.sourceProvenanceHash.length)) - message.sourceProvenanceHash = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sourceProvenanceHash.push(reader.int32()); - } else - message.sourceProvenanceHash.push(reader.int32()); + message.projectId = reader.string(); break; case 2: - message.requestedVerifyOption = reader.int32(); - break; - case 3: - message.machineType = reader.int32(); - break; - case 6: - message.diskSizeGb = reader.int64(); - break; - case 4: - message.substitutionOption = reader.int32(); - break; - case 17: - message.dynamicSubstitutions = reader.bool(); - break; - case 5: - message.logStreamingOption = reader.int32(); - break; - case 7: - message.workerPool = reader.string(); - break; - case 11: - message.logging = reader.int32(); - break; - case 12: - if (!(message.env && message.env.length)) - message.env = []; - message.env.push(reader.string()); - break; - case 13: - if (!(message.secretEnv && message.secretEnv.length)) - message.secretEnv = []; - message.secretEnv.push(reader.string()); - break; - case 14: - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + message.triggerId = reader.string(); break; default: reader.skipType(tag & 7); @@ -10810,442 +10976,1486 @@ }; /** - * Decodes a BuildOptions message from the specified reader or buffer, length delimited. + * Decodes a DeleteBuildTriggerRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildOptions.decodeDelimited = function decodeDelimited(reader) { + DeleteBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildOptions message. + * Verifies a DeleteBuildTriggerRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildOptions.verify = function verify(message) { + DeleteBuildTriggerRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sourceProvenanceHash != null && message.hasOwnProperty("sourceProvenanceHash")) { - if (!Array.isArray(message.sourceProvenanceHash)) - return "sourceProvenanceHash: array expected"; - for (var i = 0; i < message.sourceProvenanceHash.length; ++i) - switch (message.sourceProvenanceHash[i]) { - default: - return "sourceProvenanceHash: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) - switch (message.requestedVerifyOption) { - default: - return "requestedVerifyOption: enum value expected"; - case 0: - case 1: - break; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - switch (message.machineType) { - default: - return "machineType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) - switch (message.substitutionOption) { - default: - return "substitutionOption: enum value expected"; - case 0: - case 1: - break; - } - if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) - if (typeof message.dynamicSubstitutions !== "boolean") - return "dynamicSubstitutions: boolean expected"; - if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) - switch (message.logStreamingOption) { - default: - return "logStreamingOption: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - if (!$util.isString(message.workerPool)) - return "workerPool: string expected"; - if (message.logging != null && message.hasOwnProperty("logging")) - switch (message.logging) { - default: - return "logging: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 5: - case 4: - break; - } - if (message.env != null && message.hasOwnProperty("env")) { - if (!Array.isArray(message.env)) - return "env: array expected"; - for (var i = 0; i < message.env.length; ++i) - if (!$util.isString(message.env[i])) - return "env: string[] expected"; - } - if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { - if (!Array.isArray(message.secretEnv)) - return "secretEnv: array expected"; - for (var i = 0; i < message.secretEnv.length; ++i) - if (!$util.isString(message.secretEnv[i])) - return "secretEnv: string[] expected"; - } - if (message.volumes != null && message.hasOwnProperty("volumes")) { - if (!Array.isArray(message.volumes)) - return "volumes: array expected"; - for (var i = 0; i < message.volumes.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); - if (error) - return "volumes." + error; - } - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; return null; }; /** - * Creates a BuildOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @returns {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} DeleteBuildTriggerRequest */ - BuildOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.BuildOptions) + DeleteBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); - if (object.sourceProvenanceHash) { - if (!Array.isArray(object.sourceProvenanceHash)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.sourceProvenanceHash: array expected"); - message.sourceProvenanceHash = []; - for (var i = 0; i < object.sourceProvenanceHash.length; ++i) - switch (object.sourceProvenanceHash[i]) { - default: - case "NONE": - case 0: - message.sourceProvenanceHash[i] = 0; - break; - case "SHA256": - case 1: - message.sourceProvenanceHash[i] = 1; - break; - case "MD5": - case 2: - message.sourceProvenanceHash[i] = 2; - break; - } - } - switch (object.requestedVerifyOption) { - case "NOT_VERIFIED": - case 0: - message.requestedVerifyOption = 0; - break; - case "VERIFIED": - case 1: - message.requestedVerifyOption = 1; - break; - } - switch (object.machineType) { - case "UNSPECIFIED": - case 0: - message.machineType = 0; - break; - case "N1_HIGHCPU_8": - case 1: - message.machineType = 1; - break; - case "N1_HIGHCPU_32": - case 2: - message.machineType = 2; - break; - } - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - switch (object.substitutionOption) { - case "MUST_MATCH": - case 0: - message.substitutionOption = 0; - break; - case "ALLOW_LOOSE": - case 1: - message.substitutionOption = 1; - break; - } - if (object.dynamicSubstitutions != null) - message.dynamicSubstitutions = Boolean(object.dynamicSubstitutions); - switch (object.logStreamingOption) { - case "STREAM_DEFAULT": - case 0: - message.logStreamingOption = 0; - break; - case "STREAM_ON": - case 1: - message.logStreamingOption = 1; - break; - case "STREAM_OFF": - case 2: - message.logStreamingOption = 2; - break; - } - if (object.workerPool != null) - message.workerPool = String(object.workerPool); - switch (object.logging) { - case "LOGGING_UNSPECIFIED": - case 0: - message.logging = 0; - break; - case "LEGACY": - case 1: - message.logging = 1; - break; - case "GCS_ONLY": - case 2: - message.logging = 2; - break; - case "STACKDRIVER_ONLY": - case 3: - message.logging = 3; - break; - case "CLOUD_LOGGING_ONLY": - case 5: - message.logging = 5; - break; - case "NONE": - case 4: - message.logging = 4; - break; - } - if (object.env) { - if (!Array.isArray(object.env)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.env: array expected"); - message.env = []; - for (var i = 0; i < object.env.length; ++i) - message.env[i] = String(object.env[i]); - } - if (object.secretEnv) { - if (!Array.isArray(object.secretEnv)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.secretEnv: array expected"); - message.secretEnv = []; - for (var i = 0; i < object.secretEnv.length; ++i) - message.secretEnv[i] = String(object.secretEnv[i]); - } - if (object.volumes) { - if (!Array.isArray(object.volumes)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: array expected"); - message.volumes = []; - for (var i = 0; i < object.volumes.length; ++i) { - if (typeof object.volumes[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: object expected"); - message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); - } - } + var message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); return message; }; /** - * Creates a plain object from a BuildOptions message. Also converts values to other types if specified. + * Creates a plain object from a DeleteBuildTriggerRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest * @static - * @param {google.devtools.cloudbuild.v1.BuildOptions} message BuildOptions + * @param {google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest} message DeleteBuildTriggerRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildOptions.toObject = function toObject(message, options) { + DeleteBuildTriggerRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sourceProvenanceHash = []; - object.env = []; - object.secretEnv = []; - object.volumes = []; - } if (options.defaults) { - object.requestedVerifyOption = options.enums === String ? "NOT_VERIFIED" : 0; - object.machineType = options.enums === String ? "UNSPECIFIED" : 0; - object.substitutionOption = options.enums === String ? "MUST_MATCH" : 0; - object.logStreamingOption = options.enums === String ? "STREAM_DEFAULT" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.diskSizeGb = options.longs === String ? "0" : 0; - object.workerPool = ""; - object.logging = options.enums === String ? "LOGGING_UNSPECIFIED" : 0; - object.dynamicSubstitutions = false; - } - if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { - object.sourceProvenanceHash = []; - for (var j = 0; j < message.sourceProvenanceHash.length; ++j) - object.sourceProvenanceHash[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] : message.sourceProvenanceHash[j]; - } - if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) - object.requestedVerifyOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] : message.requestedVerifyOption; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] : message.machineType; - if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) - object.substitutionOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] : message.substitutionOption; - if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) - object.logStreamingOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] : message.logStreamingOption; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = message.workerPool; - if (message.logging != null && message.hasOwnProperty("logging")) - object.logging = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] : message.logging; - if (message.env && message.env.length) { - object.env = []; - for (var j = 0; j < message.env.length; ++j) - object.env[j] = message.env[j]; + object.projectId = ""; + object.triggerId = ""; } - if (message.secretEnv && message.secretEnv.length) { - object.secretEnv = []; - for (var j = 0; j < message.secretEnv.length; ++j) - object.secretEnv[j] = message.secretEnv[j]; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + return object; + }; + + /** + * Converts this DeleteBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteBuildTriggerRequest; + })(); + + v1.UpdateBuildTriggerRequest = (function() { + + /** + * Properties of an UpdateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IUpdateBuildTriggerRequest + * @property {string|null} [projectId] UpdateBuildTriggerRequest projectId + * @property {string|null} [triggerId] UpdateBuildTriggerRequest triggerId + * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] UpdateBuildTriggerRequest trigger + */ + + /** + * Constructs a new UpdateBuildTriggerRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an UpdateBuildTriggerRequest. + * @implements IUpdateBuildTriggerRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set + */ + function UpdateBuildTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateBuildTriggerRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.projectId = ""; + + /** + * UpdateBuildTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.triggerId = ""; + + /** + * UpdateBuildTriggerRequest trigger. + * @member {google.devtools.cloudbuild.v1.IBuildTrigger|null|undefined} trigger + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + */ + UpdateBuildTriggerRequest.prototype.trigger = null; + + /** + * Creates a new UpdateBuildTriggerRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest instance + */ + UpdateBuildTriggerRequest.create = function create(properties) { + return new UpdateBuildTriggerRequest(properties); + }; + + /** + * Encodes the specified UpdateBuildTriggerRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBuildTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateBuildTriggerRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest} message UpdateBuildTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateBuildTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBuildTriggerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.projectId = reader.string(); + break; + case 2: + message.triggerId = reader.string(); + break; + case 3: + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } } - if (message.volumes && message.volumes.length) { - object.volumes = []; - for (var j = 0; j < message.volumes.length; ++j) - object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); + return message; + }; + + /** + * Decodes an UpdateBuildTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateBuildTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateBuildTriggerRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateBuildTriggerRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) { + var error = $root.google.devtools.cloudbuild.v1.BuildTrigger.verify(message.trigger); + if (error) + return "trigger." + error; } - if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) - object.dynamicSubstitutions = message.dynamicSubstitutions; - return object; + return null; + }; + + /** + * Creates an UpdateBuildTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} UpdateBuildTriggerRequest + */ + UpdateBuildTriggerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.trigger != null) { + if (typeof object.trigger !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest.trigger: object expected"); + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.fromObject(object.trigger); + } + return message; + }; + + /** + * Creates a plain object from an UpdateBuildTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest} message UpdateBuildTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateBuildTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.triggerId = ""; + object.trigger = null; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + return object; + }; + + /** + * Converts this UpdateBuildTriggerRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateBuildTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateBuildTriggerRequest; + })(); + + v1.BuildOptions = (function() { + + /** + * Properties of a BuildOptions. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildOptions + * @property {Array.|null} [sourceProvenanceHash] BuildOptions sourceProvenanceHash + * @property {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption|null} [requestedVerifyOption] BuildOptions requestedVerifyOption + * @property {google.devtools.cloudbuild.v1.BuildOptions.MachineType|null} [machineType] BuildOptions machineType + * @property {number|Long|null} [diskSizeGb] BuildOptions diskSizeGb + * @property {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption|null} [substitutionOption] BuildOptions substitutionOption + * @property {boolean|null} [dynamicSubstitutions] BuildOptions dynamicSubstitutions + * @property {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null} [logStreamingOption] BuildOptions logStreamingOption + * @property {string|null} [workerPool] BuildOptions workerPool + * @property {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null} [logging] BuildOptions logging + * @property {Array.|null} [env] BuildOptions env + * @property {Array.|null} [secretEnv] BuildOptions secretEnv + * @property {Array.|null} [volumes] BuildOptions volumes + */ + + /** + * Constructs a new BuildOptions. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildOptions. + * @implements IBuildOptions + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set + */ + function BuildOptions(properties) { + this.sourceProvenanceHash = []; + this.env = []; + this.secretEnv = []; + this.volumes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildOptions sourceProvenanceHash. + * @member {Array.} sourceProvenanceHash + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.sourceProvenanceHash = $util.emptyArray; + + /** + * BuildOptions requestedVerifyOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.VerifyOption} requestedVerifyOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.requestedVerifyOption = 0; + + /** + * BuildOptions machineType. + * @member {google.devtools.cloudbuild.v1.BuildOptions.MachineType} machineType + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.machineType = 0; + + /** + * BuildOptions diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BuildOptions substitutionOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption} substitutionOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.substitutionOption = 0; + + /** + * BuildOptions dynamicSubstitutions. + * @member {boolean} dynamicSubstitutions + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.dynamicSubstitutions = false; + + /** + * BuildOptions logStreamingOption. + * @member {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption} logStreamingOption + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.logStreamingOption = 0; + + /** + * BuildOptions workerPool. + * @member {string} workerPool + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.workerPool = ""; + + /** + * BuildOptions logging. + * @member {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode} logging + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.logging = 0; + + /** + * BuildOptions env. + * @member {Array.} env + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.env = $util.emptyArray; + + /** + * BuildOptions secretEnv. + * @member {Array.} secretEnv + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.secretEnv = $util.emptyArray; + + /** + * BuildOptions volumes. + * @member {Array.} volumes + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.volumes = $util.emptyArray; + + /** + * Creates a new BuildOptions instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions instance + */ + BuildOptions.create = function create(properties) { + return new BuildOptions(properties); + }; + + /** + * Encodes the specified BuildOptions message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourceProvenanceHash != null && message.sourceProvenanceHash.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.sourceProvenanceHash.length; ++i) + writer.int32(message.sourceProvenanceHash[i]); + writer.ldelim(); + } + if (message.requestedVerifyOption != null && Object.hasOwnProperty.call(message, "requestedVerifyOption")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.requestedVerifyOption); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.machineType); + if (message.substitutionOption != null && Object.hasOwnProperty.call(message, "substitutionOption")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.substitutionOption); + if (message.logStreamingOption != null && Object.hasOwnProperty.call(message, "logStreamingOption")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.logStreamingOption); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.diskSizeGb); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.workerPool); + if (message.logging != null && Object.hasOwnProperty.call(message, "logging")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.logging); + if (message.env != null && message.env.length) + for (var i = 0; i < message.env.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.env[i]); + if (message.secretEnv != null && message.secretEnv.length) + for (var i = 0; i < message.secretEnv.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.secretEnv[i]); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.dynamicSubstitutions != null && Object.hasOwnProperty.call(message, "dynamicSubstitutions")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.dynamicSubstitutions); + return writer; + }; + + /** + * Encodes the specified BuildOptions message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.IBuildOptions} message BuildOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildOptions message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sourceProvenanceHash && message.sourceProvenanceHash.length)) + message.sourceProvenanceHash = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sourceProvenanceHash.push(reader.int32()); + } else + message.sourceProvenanceHash.push(reader.int32()); + break; + case 2: + message.requestedVerifyOption = reader.int32(); + break; + case 3: + message.machineType = reader.int32(); + break; + case 6: + message.diskSizeGb = reader.int64(); + break; + case 4: + message.substitutionOption = reader.int32(); + break; + case 17: + message.dynamicSubstitutions = reader.bool(); + break; + case 5: + message.logStreamingOption = reader.int32(); + break; + case 7: + message.workerPool = reader.string(); + break; + case 11: + message.logging = reader.int32(); + break; + case 12: + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); + break; + case 13: + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + case 14: + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildOptions message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourceProvenanceHash != null && message.hasOwnProperty("sourceProvenanceHash")) { + if (!Array.isArray(message.sourceProvenanceHash)) + return "sourceProvenanceHash: array expected"; + for (var i = 0; i < message.sourceProvenanceHash.length; ++i) + switch (message.sourceProvenanceHash[i]) { + default: + return "sourceProvenanceHash: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + switch (message.requestedVerifyOption) { + default: + return "requestedVerifyOption: enum value expected"; + case 0: + case 1: + break; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + switch (message.machineType) { + default: + return "machineType: enum value expected"; + case 0: + case 1: + case 2: + case 5: + case 6: + break; + } + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + switch (message.substitutionOption) { + default: + return "substitutionOption: enum value expected"; + case 0: + case 1: + break; + } + if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) + if (typeof message.dynamicSubstitutions !== "boolean") + return "dynamicSubstitutions: boolean expected"; + if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + switch (message.logStreamingOption) { + default: + return "logStreamingOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.logging != null && message.hasOwnProperty("logging")) + switch (message.logging) { + default: + return "logging: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 4: + break; + } + if (message.env != null && message.hasOwnProperty("env")) { + if (!Array.isArray(message.env)) + return "env: array expected"; + for (var i = 0; i < message.env.length; ++i) + if (!$util.isString(message.env[i])) + return "env: string[] expected"; + } + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!Array.isArray(message.secretEnv)) + return "secretEnv: array expected"; + for (var i = 0; i < message.secretEnv.length; ++i) + if (!$util.isString(message.secretEnv[i])) + return "secretEnv: string[] expected"; + } + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); + if (error) + return "volumes." + error; + } + } + return null; + }; + + /** + * Creates a BuildOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildOptions} BuildOptions + */ + BuildOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildOptions) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildOptions(); + if (object.sourceProvenanceHash) { + if (!Array.isArray(object.sourceProvenanceHash)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.sourceProvenanceHash: array expected"); + message.sourceProvenanceHash = []; + for (var i = 0; i < object.sourceProvenanceHash.length; ++i) + switch (object.sourceProvenanceHash[i]) { + default: + case "NONE": + case 0: + message.sourceProvenanceHash[i] = 0; + break; + case "SHA256": + case 1: + message.sourceProvenanceHash[i] = 1; + break; + case "MD5": + case 2: + message.sourceProvenanceHash[i] = 2; + break; + } + } + switch (object.requestedVerifyOption) { + case "NOT_VERIFIED": + case 0: + message.requestedVerifyOption = 0; + break; + case "VERIFIED": + case 1: + message.requestedVerifyOption = 1; + break; + } + switch (object.machineType) { + case "UNSPECIFIED": + case 0: + message.machineType = 0; + break; + case "N1_HIGHCPU_8": + case 1: + message.machineType = 1; + break; + case "N1_HIGHCPU_32": + case 2: + message.machineType = 2; + break; + case "E2_HIGHCPU_8": + case 5: + message.machineType = 5; + break; + case "E2_HIGHCPU_32": + case 6: + message.machineType = 6; + break; + } + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + switch (object.substitutionOption) { + case "MUST_MATCH": + case 0: + message.substitutionOption = 0; + break; + case "ALLOW_LOOSE": + case 1: + message.substitutionOption = 1; + break; + } + if (object.dynamicSubstitutions != null) + message.dynamicSubstitutions = Boolean(object.dynamicSubstitutions); + switch (object.logStreamingOption) { + case "STREAM_DEFAULT": + case 0: + message.logStreamingOption = 0; + break; + case "STREAM_ON": + case 1: + message.logStreamingOption = 1; + break; + case "STREAM_OFF": + case 2: + message.logStreamingOption = 2; + break; + } + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + switch (object.logging) { + case "LOGGING_UNSPECIFIED": + case 0: + message.logging = 0; + break; + case "LEGACY": + case 1: + message.logging = 1; + break; + case "GCS_ONLY": + case 2: + message.logging = 2; + break; + case "STACKDRIVER_ONLY": + case 3: + message.logging = 3; + break; + case "CLOUD_LOGGING_ONLY": + case 5: + message.logging = 5; + break; + case "NONE": + case 4: + message.logging = 4; + break; + } + if (object.env) { + if (!Array.isArray(object.env)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.env: array expected"); + message.env = []; + for (var i = 0; i < object.env.length; ++i) + message.env[i] = String(object.env[i]); + } + if (object.secretEnv) { + if (!Array.isArray(object.secretEnv)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.secretEnv: array expected"); + message.secretEnv = []; + for (var i = 0; i < object.secretEnv.length; ++i) + message.secretEnv[i] = String(object.secretEnv[i]); + } + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.volumes: object expected"); + message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BuildOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions} message BuildOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sourceProvenanceHash = []; + object.env = []; + object.secretEnv = []; + object.volumes = []; + } + if (options.defaults) { + object.requestedVerifyOption = options.enums === String ? "NOT_VERIFIED" : 0; + object.machineType = options.enums === String ? "UNSPECIFIED" : 0; + object.substitutionOption = options.enums === String ? "MUST_MATCH" : 0; + object.logStreamingOption = options.enums === String ? "STREAM_DEFAULT" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + object.workerPool = ""; + object.logging = options.enums === String ? "LOGGING_UNSPECIFIED" : 0; + object.dynamicSubstitutions = false; + } + if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { + object.sourceProvenanceHash = []; + for (var j = 0; j < message.sourceProvenanceHash.length; ++j) + object.sourceProvenanceHash[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] : message.sourceProvenanceHash[j]; + } + if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) + object.requestedVerifyOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] : message.requestedVerifyOption; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] : message.machineType; + if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) + object.substitutionOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] : message.substitutionOption; + if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) + object.logStreamingOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] : message.logStreamingOption; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.logging != null && message.hasOwnProperty("logging")) + object.logging = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] : message.logging; + if (message.env && message.env.length) { + object.env = []; + for (var j = 0; j < message.env.length; ++j) + object.env[j] = message.env[j]; + } + if (message.secretEnv && message.secretEnv.length) { + object.secretEnv = []; + for (var j = 0; j < message.secretEnv.length; ++j) + object.secretEnv[j] = message.secretEnv[j]; + } + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); + } + if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) + object.dynamicSubstitutions = message.dynamicSubstitutions; + return object; + }; + + /** + * Converts this BuildOptions to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + * @returns {Object.} JSON object + */ + BuildOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * VerifyOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.VerifyOption + * @enum {number} + * @property {number} NOT_VERIFIED=0 NOT_VERIFIED value + * @property {number} VERIFIED=1 VERIFIED value + */ + BuildOptions.VerifyOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NOT_VERIFIED"] = 0; + values[valuesById[1] = "VERIFIED"] = 1; + return values; + })(); + + /** + * MachineType enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.MachineType + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} N1_HIGHCPU_8=1 N1_HIGHCPU_8 value + * @property {number} N1_HIGHCPU_32=2 N1_HIGHCPU_32 value + * @property {number} E2_HIGHCPU_8=5 E2_HIGHCPU_8 value + * @property {number} E2_HIGHCPU_32=6 E2_HIGHCPU_32 value + */ + BuildOptions.MachineType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "N1_HIGHCPU_8"] = 1; + values[valuesById[2] = "N1_HIGHCPU_32"] = 2; + values[valuesById[5] = "E2_HIGHCPU_8"] = 5; + values[valuesById[6] = "E2_HIGHCPU_32"] = 6; + return values; + })(); + + /** + * SubstitutionOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption + * @enum {number} + * @property {number} MUST_MATCH=0 MUST_MATCH value + * @property {number} ALLOW_LOOSE=1 ALLOW_LOOSE value + */ + BuildOptions.SubstitutionOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MUST_MATCH"] = 0; + values[valuesById[1] = "ALLOW_LOOSE"] = 1; + return values; + })(); + + /** + * LogStreamingOption enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption + * @enum {number} + * @property {number} STREAM_DEFAULT=0 STREAM_DEFAULT value + * @property {number} STREAM_ON=1 STREAM_ON value + * @property {number} STREAM_OFF=2 STREAM_OFF value + */ + BuildOptions.LogStreamingOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STREAM_DEFAULT"] = 0; + values[valuesById[1] = "STREAM_ON"] = 1; + values[valuesById[2] = "STREAM_OFF"] = 2; + return values; + })(); + + /** + * LoggingMode enum. + * @name google.devtools.cloudbuild.v1.BuildOptions.LoggingMode + * @enum {number} + * @property {number} LOGGING_UNSPECIFIED=0 LOGGING_UNSPECIFIED value + * @property {number} LEGACY=1 LEGACY value + * @property {number} GCS_ONLY=2 GCS_ONLY value + * @property {number} STACKDRIVER_ONLY=3 STACKDRIVER_ONLY value + * @property {number} CLOUD_LOGGING_ONLY=5 CLOUD_LOGGING_ONLY value + * @property {number} NONE=4 NONE value + */ + BuildOptions.LoggingMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOGGING_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY"] = 1; + values[valuesById[2] = "GCS_ONLY"] = 2; + values[valuesById[3] = "STACKDRIVER_ONLY"] = 3; + values[valuesById[5] = "CLOUD_LOGGING_ONLY"] = 5; + values[valuesById[4] = "NONE"] = 4; + return values; + })(); + + return BuildOptions; + })(); + + v1.ReceiveTriggerWebhookRequest = (function() { + + /** + * Properties of a ReceiveTriggerWebhookRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IReceiveTriggerWebhookRequest + * @property {google.api.IHttpBody|null} [body] ReceiveTriggerWebhookRequest body + * @property {string|null} [projectId] ReceiveTriggerWebhookRequest projectId + * @property {string|null} [trigger] ReceiveTriggerWebhookRequest trigger + * @property {string|null} [secret] ReceiveTriggerWebhookRequest secret + */ + + /** + * Constructs a new ReceiveTriggerWebhookRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ReceiveTriggerWebhookRequest. + * @implements IReceiveTriggerWebhookRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest=} [properties] Properties to set + */ + function ReceiveTriggerWebhookRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReceiveTriggerWebhookRequest body. + * @member {google.api.IHttpBody|null|undefined} body + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + */ + ReceiveTriggerWebhookRequest.prototype.body = null; + + /** + * ReceiveTriggerWebhookRequest projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + */ + ReceiveTriggerWebhookRequest.prototype.projectId = ""; + + /** + * ReceiveTriggerWebhookRequest trigger. + * @member {string} trigger + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + */ + ReceiveTriggerWebhookRequest.prototype.trigger = ""; + + /** + * ReceiveTriggerWebhookRequest secret. + * @member {string} secret + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + */ + ReceiveTriggerWebhookRequest.prototype.secret = ""; + + /** + * Creates a new ReceiveTriggerWebhookRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest} ReceiveTriggerWebhookRequest instance + */ + ReceiveTriggerWebhookRequest.create = function create(properties) { + return new ReceiveTriggerWebhookRequest(properties); + }; + + /** + * Encodes the specified ReceiveTriggerWebhookRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest} message ReceiveTriggerWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveTriggerWebhookRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.google.api.HttpBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.trigger); + if (message.secret != null && Object.hasOwnProperty.call(message, "secret")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.secret); + return writer; + }; + + /** + * Encodes the specified ReceiveTriggerWebhookRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest} message ReceiveTriggerWebhookRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveTriggerWebhookRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveTriggerWebhookRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest} ReceiveTriggerWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveTriggerWebhookRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.google.api.HttpBody.decode(reader, reader.uint32()); + break; + case 2: + message.projectId = reader.string(); + break; + case 3: + message.trigger = reader.string(); + break; + case 4: + message.secret = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReceiveTriggerWebhookRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest} ReceiveTriggerWebhookRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveTriggerWebhookRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReceiveTriggerWebhookRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReceiveTriggerWebhookRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.google.api.HttpBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.trigger != null && message.hasOwnProperty("trigger")) + if (!$util.isString(message.trigger)) + return "trigger: string expected"; + if (message.secret != null && message.hasOwnProperty("secret")) + if (!$util.isString(message.secret)) + return "secret: string expected"; + return null; + }; + + /** + * Creates a ReceiveTriggerWebhookRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest} ReceiveTriggerWebhookRequest + */ + ReceiveTriggerWebhookRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.body: object expected"); + message.body = $root.google.api.HttpBody.fromObject(object.body); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.trigger != null) + message.trigger = String(object.trigger); + if (object.secret != null) + message.secret = String(object.secret); + return message; + }; + + /** + * Creates a plain object from a ReceiveTriggerWebhookRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest} message ReceiveTriggerWebhookRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReceiveTriggerWebhookRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = null; + object.projectId = ""; + object.trigger = ""; + object.secret = ""; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.google.api.HttpBody.toObject(message.body, options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.trigger != null && message.hasOwnProperty("trigger")) + object.trigger = message.trigger; + if (message.secret != null && message.hasOwnProperty("secret")) + object.secret = message.secret; + return object; + }; + + /** + * Converts this ReceiveTriggerWebhookRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + * @returns {Object.} JSON object + */ + ReceiveTriggerWebhookRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReceiveTriggerWebhookRequest; + })(); + + v1.ReceiveTriggerWebhookResponse = (function() { + + /** + * Properties of a ReceiveTriggerWebhookResponse. + * @memberof google.devtools.cloudbuild.v1 + * @interface IReceiveTriggerWebhookResponse + */ + + /** + * Constructs a new ReceiveTriggerWebhookResponse. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a ReceiveTriggerWebhookResponse. + * @implements IReceiveTriggerWebhookResponse + * @constructor + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse=} [properties] Properties to set + */ + function ReceiveTriggerWebhookResponse(properties) { + if (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 ReceiveTriggerWebhookResponse instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} ReceiveTriggerWebhookResponse instance + */ + ReceiveTriggerWebhookResponse.create = function create(properties) { + return new ReceiveTriggerWebhookResponse(properties); + }; + + /** + * Encodes the specified ReceiveTriggerWebhookResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse} message ReceiveTriggerWebhookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveTriggerWebhookResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReceiveTriggerWebhookResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse} message ReceiveTriggerWebhookResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReceiveTriggerWebhookResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReceiveTriggerWebhookResponse message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} ReceiveTriggerWebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReceiveTriggerWebhookResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; }; /** - * Converts this BuildOptions to JSON. - * @function toJSON - * @memberof google.devtools.cloudbuild.v1.BuildOptions - * @instance - * @returns {Object.} JSON object + * Decodes a ReceiveTriggerWebhookResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} ReceiveTriggerWebhookResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ReceiveTriggerWebhookResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); }; /** - * VerifyOption enum. - * @name google.devtools.cloudbuild.v1.BuildOptions.VerifyOption - * @enum {number} - * @property {number} NOT_VERIFIED=0 NOT_VERIFIED value - * @property {number} VERIFIED=1 VERIFIED value - */ - BuildOptions.VerifyOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NOT_VERIFIED"] = 0; - values[valuesById[1] = "VERIFIED"] = 1; - return values; - })(); - - /** - * MachineType enum. - * @name google.devtools.cloudbuild.v1.BuildOptions.MachineType - * @enum {number} - * @property {number} UNSPECIFIED=0 UNSPECIFIED value - * @property {number} N1_HIGHCPU_8=1 N1_HIGHCPU_8 value - * @property {number} N1_HIGHCPU_32=2 N1_HIGHCPU_32 value + * Verifies a ReceiveTriggerWebhookResponse message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildOptions.MachineType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNSPECIFIED"] = 0; - values[valuesById[1] = "N1_HIGHCPU_8"] = 1; - values[valuesById[2] = "N1_HIGHCPU_32"] = 2; - return values; - })(); + ReceiveTriggerWebhookResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * SubstitutionOption enum. - * @name google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption - * @enum {number} - * @property {number} MUST_MATCH=0 MUST_MATCH value - * @property {number} ALLOW_LOOSE=1 ALLOW_LOOSE value + * Creates a ReceiveTriggerWebhookResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} ReceiveTriggerWebhookResponse */ - BuildOptions.SubstitutionOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MUST_MATCH"] = 0; - values[valuesById[1] = "ALLOW_LOOSE"] = 1; - return values; - })(); + ReceiveTriggerWebhookResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse) + return object; + return new $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse(); + }; /** - * LogStreamingOption enum. - * @name google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption - * @enum {number} - * @property {number} STREAM_DEFAULT=0 STREAM_DEFAULT value - * @property {number} STREAM_ON=1 STREAM_ON value - * @property {number} STREAM_OFF=2 STREAM_OFF value + * Creates a plain object from a ReceiveTriggerWebhookResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse} message ReceiveTriggerWebhookResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - BuildOptions.LogStreamingOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STREAM_DEFAULT"] = 0; - values[valuesById[1] = "STREAM_ON"] = 1; - values[valuesById[2] = "STREAM_OFF"] = 2; - return values; - })(); + ReceiveTriggerWebhookResponse.toObject = function toObject() { + return {}; + }; /** - * LoggingMode enum. - * @name google.devtools.cloudbuild.v1.BuildOptions.LoggingMode - * @enum {number} - * @property {number} LOGGING_UNSPECIFIED=0 LOGGING_UNSPECIFIED value - * @property {number} LEGACY=1 LEGACY value - * @property {number} GCS_ONLY=2 GCS_ONLY value - * @property {number} STACKDRIVER_ONLY=3 STACKDRIVER_ONLY value - * @property {number} CLOUD_LOGGING_ONLY=5 CLOUD_LOGGING_ONLY value - * @property {number} NONE=4 NONE value + * Converts this ReceiveTriggerWebhookResponse to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @instance + * @returns {Object.} JSON object */ - BuildOptions.LoggingMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LOGGING_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEGACY"] = 1; - values[valuesById[2] = "GCS_ONLY"] = 2; - values[valuesById[3] = "STACKDRIVER_ONLY"] = 3; - values[valuesById[5] = "CLOUD_LOGGING_ONLY"] = 5; - values[valuesById[4] = "NONE"] = 4; - return values; - })(); + ReceiveTriggerWebhookResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return BuildOptions; + return ReceiveTriggerWebhookResponse; })(); v1.WorkerPool = (function() { @@ -14441,6 +15651,269 @@ return values; })(); + api.HttpBody = (function() { + + /** + * Properties of a HttpBody. + * @memberof google.api + * @interface IHttpBody + * @property {string|null} [contentType] HttpBody contentType + * @property {Uint8Array|null} [data] HttpBody data + * @property {Array.|null} [extensions] HttpBody extensions + */ + + /** + * Constructs a new HttpBody. + * @memberof google.api + * @classdesc Represents a HttpBody. + * @implements IHttpBody + * @constructor + * @param {google.api.IHttpBody=} [properties] Properties to set + */ + function HttpBody(properties) { + this.extensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpBody contentType. + * @member {string} contentType + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.contentType = ""; + + /** + * HttpBody data. + * @member {Uint8Array} data + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.data = $util.newBuffer([]); + + /** + * HttpBody extensions. + * @member {Array.} extensions + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.extensions = $util.emptyArray; + + /** + * Creates a new HttpBody instance using the specified properties. + * @function create + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody=} [properties] Properties to set + * @returns {google.api.HttpBody} HttpBody instance + */ + HttpBody.create = function create(properties) { + return new HttpBody(properties); + }; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encode + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contentType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.extensions != null && message.extensions.length) + for (var i = 0; i < message.extensions.length; ++i) + $root.google.protobuf.Any.encode(message.extensions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decode = function 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.HttpBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.contentType = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + if (!(message.extensions && message.extensions.length)) + message.extensions = []; + message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpBody message. + * @function verify + * @memberof google.api.HttpBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.extensions != null && message.hasOwnProperty("extensions")) { + if (!Array.isArray(message.extensions)) + return "extensions: array expected"; + for (var i = 0; i < message.extensions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensions[i]); + if (error) + return "extensions." + error; + } + } + return null; + }; + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpBody + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpBody} HttpBody + */ + HttpBody.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpBody) + return object; + var message = new $root.google.api.HttpBody(); + if (object.contentType != null) + message.contentType = String(object.contentType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.extensions) { + if (!Array.isArray(object.extensions)) + throw TypeError(".google.api.HttpBody.extensions: array expected"); + message.extensions = []; + for (var i = 0; i < object.extensions.length; ++i) { + if (typeof object.extensions[i] !== "object") + throw TypeError(".google.api.HttpBody.extensions: object expected"); + message.extensions[i] = $root.google.protobuf.Any.fromObject(object.extensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpBody + * @static + * @param {google.api.HttpBody} message HttpBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.extensions = []; + if (options.defaults) { + object.contentType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.extensions && message.extensions.length) { + object.extensions = []; + for (var j = 0; j < message.extensions.length; ++j) + object.extensions[j] = $root.google.protobuf.Any.toObject(message.extensions[j], options); + } + return object; + }; + + /** + * Converts this HttpBody to JSON. + * @function toJSON + * @memberof google.api.HttpBody + * @instance + * @returns {Object.} JSON object + */ + HttpBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HttpBody; + })(); + api.ResourceDescriptor = (function() { /** diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 1c52e36a5406..c4e707b6b2ce 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -14,8 +14,8 @@ "java_package": "com.google.cloudbuild.v1", "objc_class_prefix": "GCB", "ruby_package": "Google::Cloud::Build::V1", - "(google.api.resource_definition).type": "iam.googleapis.com/ServiceAccount", - "(google.api.resource_definition).pattern": "projects/{project}/serviceAccounts/{service_account}" + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKey", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}" }, "nested": { "CloudBuild": { @@ -31,7 +31,7 @@ "(google.api.http).post": "/v1/projects/{project_id}/builds", "(google.api.http).body": "build", "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/builds", - "(google.api.http).additional_bindings.body": "*", + "(google.api.http).additional_bindings.body": "build", "(google.api.method_signature)": "project_id,build", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" @@ -43,7 +43,7 @@ "body": "build", "additional_bindings": { "post": "/v1/{parent=projects/*/locations/*}/builds", - "body": "*" + "body": "build" } } }, @@ -284,6 +284,22 @@ } ] }, + "ReceiveTriggerWebhook": { + "requestType": "ReceiveTriggerWebhookRequest", + "responseType": "ReceiveTriggerWebhookResponse", + "options": { + "(google.api.http).post": "/v1/projects/{project_id}/triggers/{trigger}:webhook", + "(google.api.http).body": "body" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/projects/{project_id}/triggers/{trigger}:webhook", + "body": "body" + } + } + ] + }, "CreateWorkerPool": { "requestType": "CreateWorkerPoolRequest", "responseType": "WorkerPool" @@ -349,10 +365,7 @@ }, "source": { "type": "RepoSource", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 3 } } }, @@ -736,6 +749,10 @@ "options": { "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" } + }, + "availableSecrets": { + "type": "Secrets", + "id": 47 } }, "nested": { @@ -859,6 +876,51 @@ } } }, + "Secrets": { + "fields": { + "secretManager": { + "rule": "repeated", + "type": "SecretManagerSecret", + "id": 1 + }, + "inline": { + "rule": "repeated", + "type": "InlineSecret", + "id": 2 + } + } + }, + "InlineSecret": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKey" + } + }, + "envMap": { + "keyType": "string", + "type": "bytes", + "id": 2 + } + } + }, + "SecretManagerSecret": { + "fields": { + "versionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "env": { + "type": "string", + "id": 2 + } + } + }, "Secret": { "fields": { "kmsKeyName": { @@ -1129,7 +1191,8 @@ "CommentControl": { "values": { "COMMENTS_DISABLED": 0, - "COMMENTS_ENABLED": 1 + "COMMENTS_ENABLED": 1, + "COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY": 2 } } } @@ -1335,7 +1398,9 @@ "values": { "UNSPECIFIED": 0, "N1_HIGHCPU_8": 1, - "N1_HIGHCPU_32": 2 + "N1_HIGHCPU_32": 2, + "E2_HIGHCPU_8": 5, + "E2_HIGHCPU_32": 6 } }, "SubstitutionOption": { @@ -1363,6 +1428,29 @@ } } }, + "ReceiveTriggerWebhookRequest": { + "fields": { + "body": { + "type": "google.api.HttpBody", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + }, + "trigger": { + "type": "string", + "id": 3 + }, + "secret": { + "type": "string", + "id": 4 + } + } + }, + "ReceiveTriggerWebhookResponse": { + "fields": {} + }, "WorkerPool": { "fields": { "name": { @@ -1657,6 +1745,23 @@ "UNORDERED_LIST": 6 } }, + "HttpBody": { + "fields": { + "contentType": { + "type": "string", + "id": 1 + }, + "data": { + "type": "bytes", + "id": 2 + }, + "extensions": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 8ae460f6a027..be5d7ce4956f 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -178,6 +178,9 @@ export class CloudBuildClient { buildTriggerPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/triggers/{trigger}' ), + cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -187,6 +190,9 @@ export class CloudBuildClient { projectLocationBuildPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/builds/{build}' ), + secretVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/secrets/{secret}/versions/{version}' + ), serviceAccountPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/serviceAccounts/{service_account}' ), @@ -318,6 +324,7 @@ export class CloudBuildClient { 'deleteBuildTrigger', 'updateBuildTrigger', 'runBuildTrigger', + 'receiveTriggerWebhook', 'createWorkerPool', 'getWorkerPool', 'deleteWorkerPool', @@ -539,7 +546,7 @@ export class CloudBuildClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the `Build` to retrieve. + * The name of the `Build` to cancel. * Format: `projects/{project}/locations/{location}/builds/{build}` * @param {string} request.projectId * Required. ID of the project. @@ -1004,6 +1011,111 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); } + receiveTriggerWebhook( + request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + ( + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | undefined + ), + {} | undefined + ] + >; + receiveTriggerWebhook( + request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + options: CallOptions, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | null + | undefined, + {} | null | undefined + > + ): void; + receiveTriggerWebhook( + request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + callback: Callback< + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * ReceiveTriggerWebhook [Experimental] is called when the API receives a + * webhook request targeted at a specific trigger. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.api.HttpBody} request.body + * HTTP request body. + * @param {string} request.projectId + * Project in which the specified trigger lives + * @param {string} request.trigger + * Name of the trigger to run the payload against + * @param {string} request.secret + * Secret token used for authorization if an OAuth token isn't provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ReceiveTriggerWebhookResponse]{@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse}. + * 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.receiveTriggerWebhook(request); + */ + receiveTriggerWebhook( + request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse, + ( + | protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); + this.initialize(); + return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); + } createWorkerPool( request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: CallOptions @@ -1819,7 +1931,7 @@ export class CloudBuildClient { * @param {string} request.triggerId * Required. ID of the trigger. * @param {google.devtools.cloudbuild.v1.RepoSource} request.source - * Required. Source to build against this trigger. + * Source to build against this trigger. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1966,7 +2078,15 @@ export class CloudBuildClient { * @param {number} request.pageSize * Number of results to return in the list. * @param {string} request.pageToken - * Token to provide to skip to a particular spot in the list. + * The page token for the next page of Builds. + * + * If unspecified, the first page of results is returned. + * + * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + * In this case, the token should be discarded, and pagination should be + * restarted from the first page of results. + * + * See https://google.aip.dev/158 for more. * @param {string} request.filter * The raw filter text to constrain the results. * @param {object} [options] @@ -2040,7 +2160,15 @@ export class CloudBuildClient { * @param {number} request.pageSize * Number of results to return in the list. * @param {string} request.pageToken - * Token to provide to skip to a particular spot in the list. + * The page token for the next page of Builds. + * + * If unspecified, the first page of results is returned. + * + * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + * In this case, the token should be discarded, and pagination should be + * restarted from the first page of results. + * + * See https://google.aip.dev/158 for more. * @param {string} request.filter * The raw filter text to constrain the results. * @param {object} [options] @@ -2092,7 +2220,15 @@ export class CloudBuildClient { * @param {number} request.pageSize * Number of results to return in the list. * @param {string} request.pageToken - * Token to provide to skip to a particular spot in the list. + * The page token for the next page of Builds. + * + * If unspecified, the first page of results is returned. + * + * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + * In this case, the token should be discarded, and pagination should be + * restarted from the first page of results. + * + * See https://google.aip.dev/158 for more. * @param {string} request.filter * The raw filter text to constrain the results. * @param {object} [options] @@ -2372,6 +2508,76 @@ export class CloudBuildClient { .trigger; } + /** + * Return a fully-qualified cryptoKey resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} keyring + * @param {string} key + * @returns {string} Resource name string. + */ + cryptoKeyPath( + project: string, + location: string, + keyring: string, + key: string + ) { + return this.pathTemplates.cryptoKeyPathTemplate.render({ + project: project, + location: location, + keyring: keyring, + key: key, + }); + } + + /** + * Parse the project from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .project; + } + + /** + * Parse the location from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .location; + } + + /** + * Parse the keyring from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the keyring. + */ + matchKeyringFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName) + .keyring; + } + + /** + * Parse the key from CryptoKey resource. + * + * @param {string} cryptoKeyName + * A fully-qualified path representing CryptoKey resource. + * @returns {string} A string representing the key. + */ + matchKeyFromCryptoKeyName(cryptoKeyName: string) { + return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName).key; + } + /** * Return a fully-qualified project resource name string. * @@ -2488,6 +2694,58 @@ export class CloudBuildClient { ).build; } + /** + * Return a fully-qualified secretVersion resource name string. + * + * @param {string} project + * @param {string} secret + * @param {string} version + * @returns {string} Resource name string. + */ + secretVersionPath(project: string, secret: string, version: string) { + return this.pathTemplates.secretVersionPathTemplate.render({ + project: project, + secret: secret, + version: version, + }); + } + + /** + * Parse the project from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .project; + } + + /** + * Parse the secret from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the secret. + */ + matchSecretFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .secret; + } + + /** + * Parse the version from SecretVersion resource. + * + * @param {string} secretVersionName + * A fully-qualified path representing SecretVersion resource. + * @returns {string} A string representing the version. + */ + matchVersionFromSecretVersionName(secretVersionName: string) { + return this.pathTemplates.secretVersionPathTemplate.match(secretVersionName) + .version; + } + /** * Return a fully-qualified serviceAccount resource name string. * diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json index d52bbfa9a07b..59a36aa4bb35 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -75,6 +75,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ReceiveTriggerWebhook": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateWorkerPool": { "timeout_millis": 600000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json index 2918f2968ea7..13b205799017 100644 --- a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json +++ b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json @@ -40,6 +40,11 @@ "updateBuildTrigger" ] }, + "ReceiveTriggerWebhook": { + "methods": [ + "receiveTriggerWebhook" + ] + }, "CreateWorkerPool": { "methods": [ "createWorkerPool" @@ -129,6 +134,11 @@ "updateBuildTrigger" ] }, + "ReceiveTriggerWebhook": { + "methods": [ + "receiveTriggerWebhook" + ] + }, "CreateWorkerPool": { "methods": [ "createWorkerPool" diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata index 68b3f437e87d..270186d3d6f6 100644 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ b/packages/google-devtools-cloudbuild/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "8f0b1e6220f66d8d2620f9647bf7d9765aab185e" + "sha": "de64555672a0ea24a936c163e457c41270118ab2" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" + "sha": "913f5553d5ff5940cddd8245313136449b2a3571", + "internalRef": "363244566" } }, { diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 08420c3fb9fc..fb3f2e92bd92 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -907,6 +907,123 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('receiveTriggerWebhook', () => { + it('invokes receiveTriggerWebhook without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() + ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() + ); + client.innerApiCalls.receiveTriggerWebhook = stubSimpleCall( + expectedResponse + ); + const [response] = await client.receiveTriggerWebhook(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.receiveTriggerWebhook as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes receiveTriggerWebhook without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() + ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() + ); + client.innerApiCalls.receiveTriggerWebhook = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.receiveTriggerWebhook( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.receiveTriggerWebhook as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes receiveTriggerWebhook with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() + ); + request.projectId = ''; + const expectedHeaderRequestParams = 'project_id='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.receiveTriggerWebhook = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.receiveTriggerWebhook(request), + expectedError + ); + assert( + (client.innerApiCalls.receiveTriggerWebhook as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('createWorkerPool', () => { it('invokes createWorkerPool without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ @@ -2592,6 +2709,82 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('cryptoKey', () => { + const fakePath = '/rendered/path/cryptoKey'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + keyring: 'keyringValue', + key: 'keyValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyPath', () => { + const result = client.cryptoKeyPath( + 'projectValue', + 'locationValue', + 'keyringValue', + 'keyValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyName', () => { + const result = client.matchProjectFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyName', () => { + const result = client.matchLocationFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyringFromCryptoKeyName', () => { + const result = client.matchKeyringFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'keyringValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyFromCryptoKeyName', () => { + const result = client.matchKeyFromCryptoKeyName(fakePath); + assert.strictEqual(result, 'keyValue'); + assert( + (client.pathTemplates.cryptoKeyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = { @@ -2751,6 +2944,70 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('secretVersion', () => { + const fakePath = '/rendered/path/secretVersion'; + const expectedParameters = { + project: 'projectValue', + secret: 'secretValue', + version: 'versionValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.secretVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.secretVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('secretVersionPath', () => { + const result = client.secretVersionPath( + 'projectValue', + 'secretValue', + 'versionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.secretVersionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSecretVersionName', () => { + const result = client.matchProjectFromSecretVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSecretFromSecretVersionName', () => { + const result = client.matchSecretFromSecretVersionName(fakePath); + assert.strictEqual(result, 'secretValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchVersionFromSecretVersionName', () => { + const result = client.matchVersionFromSecretVersionName(fakePath); + assert.strictEqual(result, 'versionValue'); + assert( + (client.pathTemplates.secretVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('serviceAccount', () => { const fakePath = '/rendered/path/serviceAccount'; const expectedParameters = { From 519181b225272d2b014746244eaeda347910b068 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 1 Apr 2021 16:58:35 -0700 Subject: [PATCH 138/223] chore: migrate to owlbot (#206) --- .../.github/.OwlBot.yaml | 25 ++++++++++++ .../.repo-metadata.json | 17 ++++---- .../google-devtools-cloudbuild/synth.metadata | 37 ------------------ packages/google-devtools-cloudbuild/synth.py | 39 ------------------- 4 files changed, 34 insertions(+), 84 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/.github/.OwlBot.yaml delete mode 100644 packages/google-devtools-cloudbuild/synth.metadata delete mode 100644 packages/google-devtools-cloudbuild/synth.py diff --git a/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml b/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml new file mode 100644 index 000000000000..35d6eb7d39f7 --- /dev/null +++ b/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml @@ -0,0 +1,25 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/devtools/cloudbuild/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: 0629d7a32eb96685272de698a1e5f31f030b60c1 + diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index 42da33015d28..bc05d4c84ac6 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -1,14 +1,15 @@ { + "repo": "googleapis/nodejs-cloudbuild", + "codeowner_team": "@googleapis/cicd", + "requires_billing": true, "name": "cloudbuild", - "name_pretty": "Cloud Build", - "product_documentation": "https://cloud.google.com/cloud-build/docs/", - "client_documentation": "https://googleapis.dev/nodejs/cloudbuild/latest/index.html", "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", - "release_level": "ga", + "client_documentation": "https://googleapis.dev/nodejs/cloudbuild/latest/index.html", "language": "nodejs", - "repo": "googleapis/nodejs-cloudbuild", + "release_level": "ga", + "product_documentation": "https://cloud.google.com/cloud-build/docs/", + "default_version": "v1", + "name_pretty": "Cloud Build", "distribution_name": "@google-cloud/cloudbuild", - "api_id": "cloudbuild.googleapis.com", - "requires_billing": true, - "codeowner_team": "@googleapis/cicd" + "api_id": "cloudbuild.googleapis.com" } diff --git a/packages/google-devtools-cloudbuild/synth.metadata b/packages/google-devtools-cloudbuild/synth.metadata deleted file mode 100644 index 270186d3d6f6..000000000000 --- a/packages/google-devtools-cloudbuild/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-cloudbuild.git", - "sha": "de64555672a0ea24a936c163e457c41270118ab2" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "913f5553d5ff5940cddd8245313136449b2a3571", - "internalRef": "363244566" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "318e351e26ba65b2b3cfa3f61b3b64e3540c3525" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "devtools-cloudbuild", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-devtools-cloudbuild/synth.py b/packages/google-devtools-cloudbuild/synth.py deleted file mode 100644 index b4f7d22564c6..000000000000 --- a/packages/google-devtools-cloudbuild/synth.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""This script is used to synthesize generated parts of this library.""" - -import synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import logging - -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - - -# run the gapic generator -gapic = gcp.GAPICBazel() -versions = ['v1'] -for version in versions: - library = gapic.node_library('devtools-cloudbuild', version, proto_path='google/devtools/cloudbuild/v1') -s.copy(library, excludes=['README.md', 'package.json']) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=versions, default_version='v1') -s.copy(templates, excludes=[]) - -node.postprocess_gapic_library() From ed9a66ee1cf0d86f4dbd095a60a8c6d456aa635f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 2 Apr 2021 17:04:20 -0700 Subject: [PATCH 139/223] chore: release 2.1.0 (#205) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 14 ++++++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index d9d6bb193171..c973a158dea0 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [2.1.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.6...v2.1.0) (2021-04-01) + + +### Features + +* Add `COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY` for corresponding comment control feat: Committer: [@lozord](https://www.github.com/lozord) ([48fe15d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/48fe15d49504bbb77078984154a147840c484825)) +* Add `ReceiveTriggerWebhook` for webhooks activating specific triggers. ([48fe15d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/48fe15d49504bbb77078984154a147840c484825)) +* Add `SecretManager`-related resources and messages for corresponding integration. ([48fe15d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/48fe15d49504bbb77078984154a147840c484825)) + + +### Bug Fixes + +* Specify `build` as the body of a `CreateBuild` call. The Cloud Build API has always assumed this, but now we are actually specifying it. ([#202](https://www.github.com/googleapis/nodejs-cloudbuild/issues/202)) ([48fe15d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/48fe15d49504bbb77078984154a147840c484825)) + ### [2.0.6](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.5...v2.0.6) (2020-11-25) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 179f9f10c6a0..ecee9aaa5e78 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.0.6", + "version": "2.1.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 23ac8c051360..6ee5af26ddbd 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.0.6" + "@google-cloud/cloudbuild": "^2.1.0" }, "devDependencies": { "c8": "^7.0.0", From ecd8a702d7d0cb697dc5160352546bba12febc90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:08:29 +0200 Subject: [PATCH 140/223] chore(deps): update dependency @types/sinon to v10 (#210) [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/sinon](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^9.0.0` -> `^10.0.0`](https://renovatebot.com/diffs/npm/@types%2fsinon/9.0.11/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/compatibility-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fsinon/10.0.0/confidence-slim/9.0.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration :date: **Schedule**: "after 9am and before 3pm" (UTC). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. :no_bell: **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ecee9aaa5e78..a0b96fbb1d7c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -25,7 +25,7 @@ ], "devDependencies": { "@types/mocha": "^8.0.0", - "@types/sinon": "^9.0.0", + "@types/sinon": "^10.0.0", "c8": "^7.0.0", "chai": "^4.2.0", "gts": "^3.0.0", From 245c431d466740d19673d88546fc68f5c68aa983 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Apr 2021 13:24:47 -0300 Subject: [PATCH 141/223] feat: Add fields for Pub/Sub triggers (#211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add fields for Pub/Sub triggers Committer: @gleeper PiperOrigin-RevId: 368533270 Source-Link: https://github.com/googleapis/googleapis/commit/9a9e29627a715077cd8e33c0d2bd549437039bd0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/3735c39292775be08fa0456f0b6710e59eb473bb * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- .../devtools/cloudbuild/v1/cloudbuild.proto | 62 ++++ .../protos/protos.d.ts | 132 +++++++ .../protos/protos.js | 351 ++++++++++++++++++ .../protos/protos.json | 59 ++- .../src/v1/cloud_build_client.ts | 80 ++++ .../test/gapic_cloud_build_v1.ts | 101 +++++ 6 files changed, 783 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index b5a3c09d2486..938e37e91980 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -53,6 +53,14 @@ option (google.api.resource_definition) = { type: "cloudkms.googleapis.com/CryptoKey" pattern: "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}" }; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Subscription" + pattern: "projects/{project}/subscriptions/{subscription}" +}; +option (google.api.resource_definition) = { + type: "pubsub.googleapis.com/Topic" + pattern: "projects/{project}/topics/{topic}" +}; // Creates and manages builds on Google Cloud Platform. // @@ -1021,6 +1029,10 @@ message BuildTrigger { // Mutually exclusive with `trigger_template`. GitHubEventsConfig github = 13; + // Optional. PubsubConfig describes the configuration of a trigger that + // creates a build whenever a Pub/Sub message is published. + PubsubConfig pubsub_config = 29 [(google.api.field_behavior) = OPTIONAL]; + // Template describing the Build request to make when the trigger is matched. oneof build_template { // Contents of the build template. @@ -1062,6 +1074,9 @@ message BuildTrigger { // least one of those files matches a included_files glob. If not, // then we do not trigger a build. repeated string included_files = 16; + + // Optional. A Common Expression Language string. + string filter = 30 [(google.api.field_behavior) = OPTIONAL]; } // GitHubEventsConfig describes the configuration of a trigger that creates a @@ -1092,6 +1107,53 @@ message GitHubEventsConfig { } } +// PubsubConfig describes the configuration of a trigger that +// creates a build whenever a Pub/Sub message is published. +message PubsubConfig { + // Enumerates potential issues with the underlying Pub/Sub subscription + // configuration. + enum State { + // The subscription configuration has not been checked. + STATE_UNSPECIFIED = 0; + + // The Pub/Sub subscription is properly configured. + OK = 1; + + // The subscription has been deleted. + SUBSCRIPTION_DELETED = 2; + + // The topic has been deleted. + TOPIC_DELETED = 3; + + // Some of the subscription's field are misconfigured. + SUBSCRIPTION_MISCONFIGURED = 4; + } + + // Output only. Name of the subscription. Format is + // `projects/{project}/subscriptions/{subscription}`. + string subscription = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "pubsub.googleapis.com/Subscription" + } + ]; + + // The name of the topic from which this subscription is receiving messages. + // Format is `projects/{project}/topics/{topic}`. + string topic = 2 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; + + // Service account that will make the push request. + string service_account_email = 3 [(google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + }]; + + // Potential issues with the underlying Pub/Sub subscription configuration. + // Only populated on get requests. + State state = 4; +} + // PullRequestFilter contains filter properties for matching GitHub Pull // Requests. message PullRequestFilter { diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index e03d94b01d80..d75196fa500b 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -3385,6 +3385,9 @@ export namespace google { /** BuildTrigger github */ github?: (google.devtools.cloudbuild.v1.IGitHubEventsConfig|null); + /** BuildTrigger pubsubConfig */ + pubsubConfig?: (google.devtools.cloudbuild.v1.IPubsubConfig|null); + /** BuildTrigger build */ build?: (google.devtools.cloudbuild.v1.IBuild|null); @@ -3405,6 +3408,9 @@ export namespace google { /** BuildTrigger includedFiles */ includedFiles?: (string[]|null); + + /** BuildTrigger filter */ + filter?: (string|null); } /** Represents a BuildTrigger. */ @@ -3434,6 +3440,9 @@ export namespace google { /** BuildTrigger github. */ public github?: (google.devtools.cloudbuild.v1.IGitHubEventsConfig|null); + /** BuildTrigger pubsubConfig. */ + public pubsubConfig?: (google.devtools.cloudbuild.v1.IPubsubConfig|null); + /** BuildTrigger build. */ public build?: (google.devtools.cloudbuild.v1.IBuild|null); @@ -3455,6 +3464,9 @@ export namespace google { /** BuildTrigger includedFiles. */ public includedFiles: string[]; + /** BuildTrigger filter. */ + public filter: string; + /** BuildTrigger buildTemplate. */ public buildTemplate?: ("build"|"filename"); @@ -3646,6 +3658,126 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a PubsubConfig. */ + interface IPubsubConfig { + + /** PubsubConfig subscription */ + subscription?: (string|null); + + /** PubsubConfig topic */ + topic?: (string|null); + + /** PubsubConfig serviceAccountEmail */ + serviceAccountEmail?: (string|null); + + /** PubsubConfig state */ + state?: (google.devtools.cloudbuild.v1.PubsubConfig.State|keyof typeof google.devtools.cloudbuild.v1.PubsubConfig.State|null); + } + + /** Represents a PubsubConfig. */ + class PubsubConfig implements IPubsubConfig { + + /** + * Constructs a new PubsubConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IPubsubConfig); + + /** PubsubConfig subscription. */ + public subscription: string; + + /** PubsubConfig topic. */ + public topic: string; + + /** PubsubConfig serviceAccountEmail. */ + public serviceAccountEmail: string; + + /** PubsubConfig state. */ + public state: (google.devtools.cloudbuild.v1.PubsubConfig.State|keyof typeof google.devtools.cloudbuild.v1.PubsubConfig.State); + + /** + * Creates a new PubsubConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PubsubConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IPubsubConfig): google.devtools.cloudbuild.v1.PubsubConfig; + + /** + * Encodes the specified PubsubConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PubsubConfig.verify|verify} messages. + * @param message PubsubConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IPubsubConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubsubConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PubsubConfig.verify|verify} messages. + * @param message PubsubConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IPubsubConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubsubConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubsubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PubsubConfig; + + /** + * Decodes a PubsubConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubsubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PubsubConfig; + + /** + * Verifies a PubsubConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubsubConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubsubConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PubsubConfig; + + /** + * Creates a plain object from a PubsubConfig message. Also converts values to other types if specified. + * @param message PubsubConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PubsubConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubsubConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PubsubConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + OK = 1, + SUBSCRIPTION_DELETED = 2, + TOPIC_DELETED = 3, + SUBSCRIPTION_MISCONFIGURED = 4 + } + } + /** Properties of a PullRequestFilter. */ interface IPullRequestFilter { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 033032535d2e..6d23fafc882d 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -8530,6 +8530,7 @@ * @property {Array.|null} [tags] BuildTrigger tags * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [triggerTemplate] BuildTrigger triggerTemplate * @property {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null} [github] BuildTrigger github + * @property {google.devtools.cloudbuild.v1.IPubsubConfig|null} [pubsubConfig] BuildTrigger pubsubConfig * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildTrigger build * @property {string|null} [filename] BuildTrigger filename * @property {google.protobuf.ITimestamp|null} [createTime] BuildTrigger createTime @@ -8537,6 +8538,7 @@ * @property {Object.|null} [substitutions] BuildTrigger substitutions * @property {Array.|null} [ignoredFiles] BuildTrigger ignoredFiles * @property {Array.|null} [includedFiles] BuildTrigger includedFiles + * @property {string|null} [filter] BuildTrigger filter */ /** @@ -8606,6 +8608,14 @@ */ BuildTrigger.prototype.github = null; + /** + * BuildTrigger pubsubConfig. + * @member {google.devtools.cloudbuild.v1.IPubsubConfig|null|undefined} pubsubConfig + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.pubsubConfig = null; + /** * BuildTrigger build. * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build @@ -8662,6 +8672,14 @@ */ BuildTrigger.prototype.includedFiles = $util.emptyArray; + /** + * BuildTrigger filter. + * @member {string} filter + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.filter = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -8730,6 +8748,10 @@ writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 21, wireType 2 =*/170).string(message.name); + if (message.pubsubConfig != null && Object.hasOwnProperty.call(message, "pubsubConfig")) + $root.google.devtools.cloudbuild.v1.PubsubConfig.encode(message.pubsubConfig, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 30, wireType 2 =*/242).string(message.filter); return writer; }; @@ -8784,6 +8806,9 @@ case 13: message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); break; + case 29: + message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.decode(reader, reader.uint32()); + break; case 4: message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); break; @@ -8828,6 +8853,9 @@ message.includedFiles = []; message.includedFiles.push(reader.string()); break; + case 30: + message.filter = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -8890,6 +8918,11 @@ if (error) return "github." + error; } + if (message.pubsubConfig != null && message.hasOwnProperty("pubsubConfig")) { + var error = $root.google.devtools.cloudbuild.v1.PubsubConfig.verify(message.pubsubConfig); + if (error) + return "pubsubConfig." + error; + } if (message.build != null && message.hasOwnProperty("build")) { properties.buildTemplate = 1; { @@ -8935,6 +8968,9 @@ if (!$util.isString(message.includedFiles[i])) return "includedFiles: string[] expected"; } + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; return null; }; @@ -8973,6 +9009,11 @@ throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.github: object expected"); message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.fromObject(object.github); } + if (object.pubsubConfig != null) { + if (typeof object.pubsubConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.pubsubConfig: object expected"); + message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.fromObject(object.pubsubConfig); + } if (object.build != null) { if (typeof object.build !== "object") throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.build: object expected"); @@ -9008,6 +9049,8 @@ for (var i = 0; i < object.includedFiles.length; ++i) message.includedFiles[i] = String(object.includedFiles[i]); } + if (object.filter != null) + message.filter = String(object.filter); return message; }; @@ -9039,6 +9082,8 @@ object.description = ""; object.github = null; object.name = ""; + object.pubsubConfig = null; + object.filter = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -9085,6 +9130,10 @@ } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.pubsubConfig != null && message.hasOwnProperty("pubsubConfig")) + object.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.toObject(message.pubsubConfig, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; return object; }; @@ -9429,6 +9478,308 @@ return GitHubEventsConfig; })(); + v1.PubsubConfig = (function() { + + /** + * Properties of a PubsubConfig. + * @memberof google.devtools.cloudbuild.v1 + * @interface IPubsubConfig + * @property {string|null} [subscription] PubsubConfig subscription + * @property {string|null} [topic] PubsubConfig topic + * @property {string|null} [serviceAccountEmail] PubsubConfig serviceAccountEmail + * @property {google.devtools.cloudbuild.v1.PubsubConfig.State|null} [state] PubsubConfig state + */ + + /** + * Constructs a new PubsubConfig. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a PubsubConfig. + * @implements IPubsubConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.IPubsubConfig=} [properties] Properties to set + */ + function PubsubConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubsubConfig subscription. + * @member {string} subscription + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @instance + */ + PubsubConfig.prototype.subscription = ""; + + /** + * PubsubConfig topic. + * @member {string} topic + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @instance + */ + PubsubConfig.prototype.topic = ""; + + /** + * PubsubConfig serviceAccountEmail. + * @member {string} serviceAccountEmail + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @instance + */ + PubsubConfig.prototype.serviceAccountEmail = ""; + + /** + * PubsubConfig state. + * @member {google.devtools.cloudbuild.v1.PubsubConfig.State} state + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @instance + */ + PubsubConfig.prototype.state = 0; + + /** + * Creates a new PubsubConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {google.devtools.cloudbuild.v1.IPubsubConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PubsubConfig} PubsubConfig instance + */ + PubsubConfig.create = function create(properties) { + return new PubsubConfig(properties); + }; + + /** + * Encodes the specified PubsubConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PubsubConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {google.devtools.cloudbuild.v1.IPubsubConfig} message PubsubConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); + if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + return writer; + }; + + /** + * Encodes the specified PubsubConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PubsubConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {google.devtools.cloudbuild.v1.IPubsubConfig} message PubsubConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubsubConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubsubConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PubsubConfig} PubsubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PubsubConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subscription = reader.string(); + break; + case 2: + message.topic = reader.string(); + break; + case 3: + message.serviceAccountEmail = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubsubConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PubsubConfig} PubsubConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubsubConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubsubConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubsubConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subscription != null && message.hasOwnProperty("subscription")) + if (!$util.isString(message.subscription)) + return "subscription: string expected"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + if (!$util.isString(message.serviceAccountEmail)) + return "serviceAccountEmail: 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 a PubsubConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PubsubConfig} PubsubConfig + */ + PubsubConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PubsubConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PubsubConfig(); + if (object.subscription != null) + message.subscription = String(object.subscription); + if (object.topic != null) + message.topic = String(object.topic); + if (object.serviceAccountEmail != null) + message.serviceAccountEmail = String(object.serviceAccountEmail); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "OK": + case 1: + message.state = 1; + break; + case "SUBSCRIPTION_DELETED": + case 2: + message.state = 2; + break; + case "TOPIC_DELETED": + case 3: + message.state = 3; + break; + case "SUBSCRIPTION_MISCONFIGURED": + case 4: + message.state = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a PubsubConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {google.devtools.cloudbuild.v1.PubsubConfig} message PubsubConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubsubConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subscription = ""; + object.topic = ""; + object.serviceAccountEmail = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = message.subscription; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) + object.serviceAccountEmail = message.serviceAccountEmail; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.PubsubConfig.State[message.state] : message.state; + return object; + }; + + /** + * Converts this PubsubConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @instance + * @returns {Object.} JSON object + */ + PubsubConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.devtools.cloudbuild.v1.PubsubConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} OK=1 OK value + * @property {number} SUBSCRIPTION_DELETED=2 SUBSCRIPTION_DELETED value + * @property {number} TOPIC_DELETED=3 TOPIC_DELETED value + * @property {number} SUBSCRIPTION_MISCONFIGURED=4 SUBSCRIPTION_MISCONFIGURED value + */ + PubsubConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OK"] = 1; + values[valuesById[2] = "SUBSCRIPTION_DELETED"] = 2; + values[valuesById[3] = "TOPIC_DELETED"] = 3; + values[valuesById[4] = "SUBSCRIPTION_MISCONFIGURED"] = 4; + return values; + })(); + + return PubsubConfig; + })(); + v1.PullRequestFilter = (function() { /** diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index c4e707b6b2ce..1b532ad117cc 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -14,8 +14,8 @@ "java_package": "com.google.cloudbuild.v1", "objc_class_prefix": "GCB", "ruby_package": "Google::Cloud::Build::V1", - "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKey", - "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}" + "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", + "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" }, "nested": { "CloudBuild": { @@ -1094,6 +1094,13 @@ "type": "GitHubEventsConfig", "id": 13 }, + "pubsubConfig": { + "type": "PubsubConfig", + "id": 29, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "build": { "type": "Build", "id": 4 @@ -1127,6 +1134,13 @@ "rule": "repeated", "type": "string", "id": 16 + }, + "filter": { + "type": "string", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1165,6 +1179,47 @@ } } }, + "PubsubConfig": { + "fields": { + "subscription": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "pubsub.googleapis.com/Subscription" + } + }, + "topic": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "pubsub.googleapis.com/Topic" + } + }, + "serviceAccountEmail": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } + }, + "state": { + "type": "State", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "OK": 1, + "SUBSCRIPTION_DELETED": 2, + "TOPIC_DELETED": 3, + "SUBSCRIPTION_MISCONFIGURED": 4 + } + } + } + }, "PullRequestFilter": { "oneofs": { "gitRef": { diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index be5d7ce4956f..cef5d1ba0113 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -196,6 +196,12 @@ export class CloudBuildClient { serviceAccountPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/serviceAccounts/{service_account}' ), + subscriptionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/subscriptions/{subscription}' + ), + topicPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/topics/{topic}' + ), }; // Some of the methods on this service return "paged" results, @@ -2786,6 +2792,80 @@ export class CloudBuildClient { ).service_account; } + /** + * Return a fully-qualified subscription resource name string. + * + * @param {string} project + * @param {string} subscription + * @returns {string} Resource name string. + */ + subscriptionPath(project: string, subscription: string) { + return this.pathTemplates.subscriptionPathTemplate.render({ + project: project, + subscription: subscription, + }); + } + + /** + * Parse the project from Subscription resource. + * + * @param {string} subscriptionName + * A fully-qualified path representing Subscription resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSubscriptionName(subscriptionName: string) { + return this.pathTemplates.subscriptionPathTemplate.match(subscriptionName) + .project; + } + + /** + * Parse the subscription from Subscription resource. + * + * @param {string} subscriptionName + * A fully-qualified path representing Subscription resource. + * @returns {string} A string representing the subscription. + */ + matchSubscriptionFromSubscriptionName(subscriptionName: string) { + return this.pathTemplates.subscriptionPathTemplate.match(subscriptionName) + .subscription; + } + + /** + * Return a fully-qualified topic resource name string. + * + * @param {string} project + * @param {string} topic + * @returns {string} Resource name string. + */ + topicPath(project: string, topic: string) { + return this.pathTemplates.topicPathTemplate.render({ + project: project, + topic: topic, + }); + } + + /** + * Parse the project from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the project. + */ + matchProjectFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).project; + } + + /** + * Parse the topic from Topic resource. + * + * @param {string} topicName + * A fully-qualified path representing Topic resource. + * @returns {string} A string representing the topic. + */ + matchTopicFromTopicName(topicName: string) { + return this.pathTemplates.topicPathTemplate.match(topicName).topic; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index fb3f2e92bd92..387ecdd26acb 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -3061,5 +3061,106 @@ describe('v1.CloudBuildClient', () => { ); }); }); + + describe('subscription', () => { + const fakePath = '/rendered/path/subscription'; + const expectedParameters = { + project: 'projectValue', + subscription: 'subscriptionValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.subscriptionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.subscriptionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('subscriptionPath', () => { + const result = client.subscriptionPath( + 'projectValue', + 'subscriptionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.subscriptionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromSubscriptionName', () => { + const result = client.matchProjectFromSubscriptionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.subscriptionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchSubscriptionFromSubscriptionName', () => { + const result = client.matchSubscriptionFromSubscriptionName(fakePath); + assert.strictEqual(result, 'subscriptionValue'); + assert( + (client.pathTemplates.subscriptionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('topic', () => { + const fakePath = '/rendered/path/topic'; + const expectedParameters = { + project: 'projectValue', + topic: 'topicValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.topicPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.topicPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('topicPath', () => { + const result = client.topicPath('projectValue', 'topicValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.topicPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromTopicName', () => { + const result = client.matchProjectFromTopicName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTopicFromTopicName', () => { + const result = client.matchTopicFromTopicName(fakePath); + assert.strictEqual(result, 'topicValue'); + assert( + (client.pathTemplates.topicPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); From 36e9cb00535c15531732bdccdcb75b5230f383db Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Apr 2021 14:59:59 -0300 Subject: [PATCH 142/223] chore: release 2.2.0 (#213) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Olivier Bourgeois <3271352+bourgeoisor@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index c973a158dea0..d1569ccf0f56 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.1.0...v2.2.0) (2021-04-16) + + +### Features + +* Add fields for Pub/Sub triggers ([#211](https://www.github.com/googleapis/nodejs-cloudbuild/issues/211)) ([0cbc740](https://www.github.com/googleapis/nodejs-cloudbuild/commit/0cbc740e7306388104a5a71c412732ac1c097528)) + ## [2.1.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.0.6...v2.1.0) (2021-04-01) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index a0b96fbb1d7c..27d8e93481b3 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.1.0", + "version": "2.2.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 6ee5af26ddbd..22677d35d582 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.1.0" + "@google-cloud/cloudbuild": "^2.2.0" }, "devDependencies": { "c8": "^7.0.0", From 55cd91e44e3cce8b67d00caf3c74fdc6a836ab33 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:48:38 -0700 Subject: [PATCH 143/223] fix(deps): require google-gax v2.12.0 (#219) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 27d8e93481b3..f5cf731b1126 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -65,6 +65,6 @@ "node": ">=10" }, "dependencies": { - "google-gax": "^2.9.2" + "google-gax": "^2.12.0" } } From 2724e9ef4339a7583a8a4effc669766dc2b05947 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 12:09:41 -0400 Subject: [PATCH 144/223] chore: release 2.2.1 (#220) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index d1569ccf0f56..d6f81672ba8f 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.0...v2.2.1) (2021-05-07) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#219](https://www.github.com/googleapis/nodejs-cloudbuild/issues/219)) ([2d5e809](https://www.github.com/googleapis/nodejs-cloudbuild/commit/2d5e8091d4c2f99739ebd2f849eb5c30e3956952)) + ## [2.2.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.1.0...v2.2.0) (2021-04-16) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index f5cf731b1126..a0c0d8621d37 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.0", + "version": "2.2.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 22677d35d582..b0873b0746c8 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.0" + "@google-cloud/cloudbuild": "^2.2.1" }, "devDependencies": { "c8": "^7.0.0", From ad5118a8a189334808a36b47da98d9fec41031c2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 May 2021 17:00:31 +0000 Subject: [PATCH 145/223] chore: new owl bot post processor docker image (#223) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 24 +- .../protos/protos.js | 48 ++-- .../src/v1/cloud_build_client.ts | 177 ++++++------- .../test/gapic_cloud_build_v1.ts | 238 ++++++++---------- 4 files changed, 224 insertions(+), 263 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index d75196fa500b..fa63b0d030b7 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -757,13 +757,13 @@ export namespace google { public repoName: string; /** RepoSource branchName. */ - public branchName: string; + public branchName?: (string|null); /** RepoSource tagName. */ - public tagName: string; + public tagName?: (string|null); /** RepoSource commitSha. */ - public commitSha: string; + public commitSha?: (string|null); /** RepoSource dir. */ public dir: string; @@ -3447,7 +3447,7 @@ export namespace google { public build?: (google.devtools.cloudbuild.v1.IBuild|null); /** BuildTrigger filename. */ - public filename: string; + public filename?: (string|null); /** BuildTrigger createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -3801,7 +3801,7 @@ export namespace google { constructor(properties?: google.devtools.cloudbuild.v1.IPullRequestFilter); /** PullRequestFilter branch. */ - public branch: string; + public branch?: (string|null); /** PullRequestFilter commentControl. */ public commentControl: (google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl|keyof typeof google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl); @@ -3916,10 +3916,10 @@ export namespace google { constructor(properties?: google.devtools.cloudbuild.v1.IPushFilter); /** PushFilter branch. */ - public branch: string; + public branch?: (string|null); /** PushFilter tag. */ - public tag: string; + public tag?: (string|null); /** PushFilter invertRegex. */ public invertRegex: boolean; @@ -6051,19 +6051,19 @@ export namespace google { public selector: string; /** HttpRule get. */ - public get: string; + public get?: (string|null); /** HttpRule put. */ - public put: string; + public put?: (string|null); /** HttpRule post. */ - public post: string; + public post?: (string|null); /** HttpRule delete. */ - public delete: string; + public delete?: (string|null); /** HttpRule patch. */ - public patch: string; + public patch?: (string|null); /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 6d23fafc882d..7413c5891f34 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1427,27 +1427,27 @@ /** * RepoSource branchName. - * @member {string} branchName + * @member {string|null|undefined} branchName * @memberof google.devtools.cloudbuild.v1.RepoSource * @instance */ - RepoSource.prototype.branchName = ""; + RepoSource.prototype.branchName = null; /** * RepoSource tagName. - * @member {string} tagName + * @member {string|null|undefined} tagName * @memberof google.devtools.cloudbuild.v1.RepoSource * @instance */ - RepoSource.prototype.tagName = ""; + RepoSource.prototype.tagName = null; /** * RepoSource commitSha. - * @member {string} commitSha + * @member {string|null|undefined} commitSha * @memberof google.devtools.cloudbuild.v1.RepoSource * @instance */ - RepoSource.prototype.commitSha = ""; + RepoSource.prototype.commitSha = null; /** * RepoSource dir. @@ -8626,11 +8626,11 @@ /** * BuildTrigger filename. - * @member {string} filename + * @member {string|null|undefined} filename * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ - BuildTrigger.prototype.filename = ""; + BuildTrigger.prototype.filename = null; /** * BuildTrigger createTime. @@ -9808,11 +9808,11 @@ /** * PullRequestFilter branch. - * @member {string} branch + * @member {string|null|undefined} branch * @memberof google.devtools.cloudbuild.v1.PullRequestFilter * @instance */ - PullRequestFilter.prototype.branch = ""; + PullRequestFilter.prototype.branch = null; /** * PullRequestFilter commentControl. @@ -10093,19 +10093,19 @@ /** * PushFilter branch. - * @member {string} branch + * @member {string|null|undefined} branch * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance */ - PushFilter.prototype.branch = ""; + PushFilter.prototype.branch = null; /** * PushFilter tag. - * @member {string} tag + * @member {string|null|undefined} tag * @memberof google.devtools.cloudbuild.v1.PushFilter * @instance */ - PushFilter.prototype.tag = ""; + PushFilter.prototype.tag = null; /** * PushFilter invertRegex. @@ -15349,43 +15349,43 @@ /** * HttpRule get. - * @member {string} get + * @member {string|null|undefined} get * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.get = ""; + HttpRule.prototype.get = null; /** * HttpRule put. - * @member {string} put + * @member {string|null|undefined} put * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.put = ""; + HttpRule.prototype.put = null; /** * HttpRule post. - * @member {string} post + * @member {string|null|undefined} post * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.post = ""; + HttpRule.prototype.post = null; /** * HttpRule delete. - * @member {string} delete + * @member {string|null|undefined} delete * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype["delete"] = ""; + HttpRule.prototype["delete"] = null; /** * HttpRule patch. - * @member {string} patch + * @member {string|null|undefined} patch * @memberof google.api.HttpRule * @instance */ - HttpRule.prototype.patch = ""; + HttpRule.prototype.patch = null; /** * HttpRule custom. diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index cef5d1ba0113..80ca891d5000 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -339,13 +339,14 @@ export class CloudBuildClient { ]; for (const methodName of cloudBuildStubMethods) { const callPromise = this.cloudBuildStub.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); - }, + 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; } @@ -506,12 +507,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getBuild(request, options, callback); } @@ -604,12 +604,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.cancelBuild(request, options, callback); } @@ -707,11 +706,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.createBuildTrigger(request, options, callback); } @@ -803,11 +801,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.getBuildTrigger(request, options, callback); } @@ -905,11 +902,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.deleteBuildTrigger(request, options, callback); } @@ -1009,11 +1005,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); } @@ -1114,11 +1109,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); } @@ -1671,12 +1665,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.createBuild(request, options, callback); } @@ -1845,12 +1838,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - name: request.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.retryBuild(request, options, callback); } @@ -1992,11 +1984,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.runBuildTrigger(request, options, callback); } @@ -2144,12 +2135,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + parent: request.parent || '', + }); this.initialize(); return this.innerApiCalls.listBuilds(request, options, callback); } @@ -2197,12 +2187,11 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + parent: request.parent || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuilds.createStream( @@ -2261,18 +2250,17 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + parent: request.parent || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuilds.asyncIterate( this.innerApiCalls['listBuilds'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -2369,11 +2357,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); this.initialize(); return this.innerApiCalls.listBuildTriggers(request, options, callback); } @@ -2408,11 +2395,10 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuildTriggers.createStream( @@ -2458,17 +2444,16 @@ export class CloudBuildClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + }); options = options || {}; const callSettings = new gax.CallSettings(options); this.initialize(); return this.descriptors.page.listBuildTriggers.asyncIterate( this.innerApiCalls['listBuildTriggers'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 387ecdd26acb..5c528b0a0d37 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message).toObject( - instance as protobuf.Message, - {defaults: true} - ); + 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; @@ -281,9 +280,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); - client.innerApiCalls.getBuild = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getBuild = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getBuild( request, @@ -393,9 +391,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); - client.innerApiCalls.cancelBuild = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.cancelBuild = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.cancelBuild( request, @@ -475,9 +472,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); - client.innerApiCalls.createBuildTrigger = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.createBuildTrigger = + stubSimpleCall(expectedResponse); const [response] = await client.createBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -508,9 +504,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); - client.innerApiCalls.createBuildTrigger = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createBuildTrigger = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createBuildTrigger( request, @@ -620,9 +615,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); - client.innerApiCalls.getBuildTrigger = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getBuildTrigger = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getBuildTrigger( request, @@ -701,9 +695,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteBuildTrigger = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.deleteBuildTrigger = + stubSimpleCall(expectedResponse); const [response] = await client.deleteBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -734,9 +727,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteBuildTrigger = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteBuildTrigger = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteBuildTrigger( request, @@ -815,9 +807,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); - client.innerApiCalls.updateBuildTrigger = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.updateBuildTrigger = + stubSimpleCall(expectedResponse); const [response] = await client.updateBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -848,9 +839,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); - client.innerApiCalls.updateBuildTrigger = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateBuildTrigger = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateBuildTrigger( request, @@ -929,9 +919,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() ); - client.innerApiCalls.receiveTriggerWebhook = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.receiveTriggerWebhook = + stubSimpleCall(expectedResponse); const [response] = await client.receiveTriggerWebhook(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -962,9 +951,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() ); - client.innerApiCalls.receiveTriggerWebhook = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.receiveTriggerWebhook = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.receiveTriggerWebhook( request, @@ -1061,9 +1049,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); - client.innerApiCalls.createWorkerPool = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createWorkerPool = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createWorkerPool( request, @@ -1149,9 +1136,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); - client.innerApiCalls.getWorkerPool = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getWorkerPool = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getWorkerPool( request, @@ -1237,9 +1223,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); - client.innerApiCalls.deleteWorkerPool = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteWorkerPool = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteWorkerPool( request, @@ -1325,9 +1310,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); - client.innerApiCalls.updateWorkerPool = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateWorkerPool = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateWorkerPool( request, @@ -1413,9 +1397,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse() ); - client.innerApiCalls.listWorkerPools = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listWorkerPools = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listWorkerPools( request, @@ -1520,9 +1503,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createBuild = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createBuild = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createBuild( request, @@ -1715,9 +1697,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.retryBuild = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.retryBuild = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.retryBuild( request, @@ -1876,9 +1857,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.runBuildTrigger = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.runBuildTrigger = + stubLongRunningCall(expectedResponse); const [operation] = await client.runBuildTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1910,9 +1890,8 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.runBuildTrigger = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.runBuildTrigger = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.runBuildTrigger( request, @@ -2109,9 +2088,8 @@ describe('v1.CloudBuildClient', () => { generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), ]; - client.innerApiCalls.listBuilds = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listBuilds = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listBuilds( request, @@ -2185,9 +2163,8 @@ describe('v1.CloudBuildClient', () => { generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), ]; - client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listBuilds.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listBuildsStream(request); const promise = new Promise((resolve, reject) => { const responses: protos.google.devtools.cloudbuild.v1.Build[] = []; @@ -2283,9 +2260,8 @@ describe('v1.CloudBuildClient', () => { generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), ]; - client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listBuilds.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; const iterable = client.listBuildsAsync(request); for await (const resource of iterable) { @@ -2414,9 +2390,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.BuildTrigger() ), ]; - client.innerApiCalls.listBuildTriggers = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listBuildTriggers = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listBuildTriggers( request, @@ -2494,12 +2469,12 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.BuildTrigger() ), ]; - client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listBuildTriggers.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listBuildTriggersStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = []; + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = + []; stream.on( 'data', (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { @@ -2521,10 +2496,9 @@ describe('v1.CloudBuildClient', () => { .calledWith(client.innerApiCalls.listBuildTriggers, request) ); assert.strictEqual( - (client.descriptors.page.listBuildTriggers - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listBuildTriggers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2541,13 +2515,12 @@ describe('v1.CloudBuildClient', () => { request.projectId = ''; const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); - client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listBuildTriggers.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listBuildTriggersStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = []; + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = + []; stream.on( 'data', (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { @@ -2568,10 +2541,9 @@ describe('v1.CloudBuildClient', () => { .calledWith(client.innerApiCalls.listBuildTriggers, request) ); assert.strictEqual( - (client.descriptors.page.listBuildTriggers - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listBuildTriggers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2598,25 +2570,25 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.BuildTrigger() ), ]; - client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = []; + client.descriptors.page.listBuildTriggers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = + []; const iterable = client.listBuildTriggersAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listBuildTriggers - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuildTriggers - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2633,27 +2605,26 @@ describe('v1.CloudBuildClient', () => { request.projectId = ''; const expectedHeaderRequestParams = 'project_id='; const expectedError = new Error('expected'); - client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listBuildTriggers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listBuildTriggersAsync(request); await assert.rejects(async () => { - const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = []; + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listBuildTriggers - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuildTriggers - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -2899,34 +2870,38 @@ describe('v1.CloudBuildClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.projectLocationBuildPathTemplate - .render as SinonStub) + ( + client.pathTemplates.projectLocationBuildPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromProjectLocationBuildName', () => { - const result = client.matchProjectFromProjectLocationBuildName( - fakePath - ); + const result = + client.matchProjectFromProjectLocationBuildName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.projectLocationBuildPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromProjectLocationBuildName', () => { - const result = client.matchLocationFromProjectLocationBuildName( - fakePath - ); + const result = + client.matchLocationFromProjectLocationBuildName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.projectLocationBuildPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -2936,8 +2911,10 @@ describe('v1.CloudBuildClient', () => { const result = client.matchBuildFromProjectLocationBuildName(fakePath); assert.strictEqual(result, 'buildValue'); assert( - (client.pathTemplates.projectLocationBuildPathTemplate - .match as SinonStub) + ( + client.pathTemplates.projectLocationBuildPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -3050,9 +3027,8 @@ describe('v1.CloudBuildClient', () => { }); it('matchServiceAccountFromServiceAccountName', () => { - const result = client.matchServiceAccountFromServiceAccountName( - fakePath - ); + const result = + client.matchServiceAccountFromServiceAccountName(fakePath); assert.strictEqual(result, 'serviceAccountValue'); assert( (client.pathTemplates.serviceAccountPathTemplate.match as SinonStub) From 8ce8aacb3944f194e5462813d89501be49118c57 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 21:58:10 +0000 Subject: [PATCH 146/223] fix: use require() to load JSON protos (#225) The library is regenerated with gapic-generator-typescript v1.3.1. Committer: @alexander-fenster PiperOrigin-RevId: 372468161 Source-Link: https://github.com/googleapis/googleapis/commit/75880c3e6a6aa2597400582848e81bbbfac51dea Source-Link: https://github.com/googleapis/googleapis-gen/commit/77b18044813d4c8c415ff9ea68e76e307eb8e904 --- .../devtools/cloudbuild/v1/cloudbuild.proto | 27 ++ .../protos/protos.d.ts | 116 ++++++- .../protos/protos.js | 311 +++++++++++++++++- .../protos/protos.json | 27 +- .../src/v1/cloud_build_client.ts | 26 +- 5 files changed, 481 insertions(+), 26 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 938e37e91980..50bedcd8b4d4 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -370,6 +370,24 @@ message RepoSource { map substitutions = 9; } +// Location of the source manifest in Google Cloud Storage. +// This feature is in Preview. +message StorageSourceManifest { + // Google Cloud Storage bucket containing the source manifest (see [Bucket + // Name + // Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + string bucket = 1; + + // Google Cloud Storage object containing the source manifest. + // + // This object must be a JSON file. + string object = 2; + + // Google Cloud Storage generation for the object. If the generation is + // omitted, the latest generation will be used. + int64 generation = 3; +} + // Location of the source in a supported storage service. message Source { // Location of source. @@ -380,6 +398,10 @@ message Source { // If provided, get the source from this location in a Cloud Source // Repository. RepoSource repo_source = 3; + + // If provided, get the source from this manifest in Google Cloud Storage. + // This feature is in Preview. + StorageSourceManifest storage_source_manifest = 8; } } @@ -803,6 +825,11 @@ message SourceProvenance { // revisions resolved. RepoSource resolved_repo_source = 6; + // A copy of the build's `source.storage_source_manifest`, if exists, with any + // revisions resolved. + // This feature is in Preview. + StorageSourceManifest resolved_storage_source_manifest = 9; + // Output only. Hash(es) of the build source, which can be used to verify that // the original source integrity was maintained in the build. Note that // `FileHashes` will only be populated if `BuildOptions` has requested a diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index fa63b0d030b7..673e9f433e2a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -848,6 +848,108 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a StorageSourceManifest. */ + interface IStorageSourceManifest { + + /** StorageSourceManifest bucket */ + bucket?: (string|null); + + /** StorageSourceManifest object */ + object?: (string|null); + + /** StorageSourceManifest generation */ + generation?: (number|Long|string|null); + } + + /** Represents a StorageSourceManifest. */ + class StorageSourceManifest implements IStorageSourceManifest { + + /** + * Constructs a new StorageSourceManifest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IStorageSourceManifest); + + /** StorageSourceManifest bucket. */ + public bucket: string; + + /** StorageSourceManifest object. */ + public object: string; + + /** StorageSourceManifest generation. */ + public generation: (number|Long|string); + + /** + * Creates a new StorageSourceManifest instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageSourceManifest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IStorageSourceManifest): google.devtools.cloudbuild.v1.StorageSourceManifest; + + /** + * Encodes the specified StorageSourceManifest message. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSourceManifest.verify|verify} messages. + * @param message StorageSourceManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IStorageSourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageSourceManifest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSourceManifest.verify|verify} messages. + * @param message StorageSourceManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IStorageSourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageSourceManifest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageSourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.StorageSourceManifest; + + /** + * Decodes a StorageSourceManifest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageSourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.StorageSourceManifest; + + /** + * Verifies a StorageSourceManifest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageSourceManifest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageSourceManifest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.StorageSourceManifest; + + /** + * Creates a plain object from a StorageSourceManifest message. Also converts values to other types if specified. + * @param message StorageSourceManifest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.StorageSourceManifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageSourceManifest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Source. */ interface ISource { @@ -856,6 +958,9 @@ export namespace google { /** Source repoSource */ repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + + /** Source storageSourceManifest */ + storageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); } /** Represents a Source. */ @@ -873,8 +978,11 @@ export namespace google { /** Source repoSource. */ public repoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + /** Source storageSourceManifest. */ + public storageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); + /** Source source. */ - public source?: ("storageSource"|"repoSource"); + public source?: ("storageSource"|"repoSource"|"storageSourceManifest"); /** * Creates a new Source instance using the specified properties. @@ -2175,6 +2283,9 @@ export namespace google { /** SourceProvenance resolvedRepoSource */ resolvedRepoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + /** SourceProvenance resolvedStorageSourceManifest */ + resolvedStorageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); + /** SourceProvenance fileHashes */ fileHashes?: ({ [k: string]: google.devtools.cloudbuild.v1.IFileHashes }|null); } @@ -2194,6 +2305,9 @@ export namespace google { /** SourceProvenance resolvedRepoSource. */ public resolvedRepoSource?: (google.devtools.cloudbuild.v1.IRepoSource|null); + /** SourceProvenance resolvedStorageSourceManifest. */ + public resolvedStorageSourceManifest?: (google.devtools.cloudbuild.v1.IStorageSourceManifest|null); + /** SourceProvenance fileHashes. */ public fileHashes: { [k: string]: google.devtools.cloudbuild.v1.IFileHashes }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 7413c5891f34..d5e3bed6969a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1786,6 +1786,252 @@ return RepoSource; })(); + v1.StorageSourceManifest = (function() { + + /** + * Properties of a StorageSourceManifest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IStorageSourceManifest + * @property {string|null} [bucket] StorageSourceManifest bucket + * @property {string|null} [object] StorageSourceManifest object + * @property {number|Long|null} [generation] StorageSourceManifest generation + */ + + /** + * Constructs a new StorageSourceManifest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a StorageSourceManifest. + * @implements IStorageSourceManifest + * @constructor + * @param {google.devtools.cloudbuild.v1.IStorageSourceManifest=} [properties] Properties to set + */ + function StorageSourceManifest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageSourceManifest bucket. + * @member {string} bucket + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @instance + */ + StorageSourceManifest.prototype.bucket = ""; + + /** + * StorageSourceManifest object. + * @member {string} object + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @instance + */ + StorageSourceManifest.prototype.object = ""; + + /** + * StorageSourceManifest generation. + * @member {number|Long} generation + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @instance + */ + StorageSourceManifest.prototype.generation = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new StorageSourceManifest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSourceManifest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.StorageSourceManifest} StorageSourceManifest instance + */ + StorageSourceManifest.create = function create(properties) { + return new StorageSourceManifest(properties); + }; + + /** + * Encodes the specified StorageSourceManifest message. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSourceManifest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSourceManifest} message StorageSourceManifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageSourceManifest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + if (message.object != null && Object.hasOwnProperty.call(message, "object")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.object); + if (message.generation != null && Object.hasOwnProperty.call(message, "generation")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.generation); + return writer; + }; + + /** + * Encodes the specified StorageSourceManifest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.StorageSourceManifest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {google.devtools.cloudbuild.v1.IStorageSourceManifest} message StorageSourceManifest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageSourceManifest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageSourceManifest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.StorageSourceManifest} StorageSourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageSourceManifest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.StorageSourceManifest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bucket = reader.string(); + break; + case 2: + message.object = reader.string(); + break; + case 3: + message.generation = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageSourceManifest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.StorageSourceManifest} StorageSourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageSourceManifest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageSourceManifest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageSourceManifest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + if (message.object != null && message.hasOwnProperty("object")) + if (!$util.isString(message.object)) + return "object: string expected"; + if (message.generation != null && message.hasOwnProperty("generation")) + if (!$util.isInteger(message.generation) && !(message.generation && $util.isInteger(message.generation.low) && $util.isInteger(message.generation.high))) + return "generation: integer|Long expected"; + return null; + }; + + /** + * Creates a StorageSourceManifest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.StorageSourceManifest} StorageSourceManifest + */ + StorageSourceManifest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.StorageSourceManifest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.StorageSourceManifest(); + if (object.bucket != null) + message.bucket = String(object.bucket); + if (object.object != null) + message.object = String(object.object); + if (object.generation != null) + if ($util.Long) + (message.generation = $util.Long.fromValue(object.generation)).unsigned = false; + else if (typeof object.generation === "string") + message.generation = parseInt(object.generation, 10); + else if (typeof object.generation === "number") + message.generation = object.generation; + else if (typeof object.generation === "object") + message.generation = new $util.LongBits(object.generation.low >>> 0, object.generation.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a StorageSourceManifest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {google.devtools.cloudbuild.v1.StorageSourceManifest} message StorageSourceManifest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageSourceManifest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucket = ""; + object.object = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.generation = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.generation = options.longs === String ? "0" : 0; + } + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + if (message.object != null && message.hasOwnProperty("object")) + object.object = message.object; + if (message.generation != null && message.hasOwnProperty("generation")) + if (typeof message.generation === "number") + object.generation = options.longs === String ? String(message.generation) : message.generation; + else + object.generation = options.longs === String ? $util.Long.prototype.toString.call(message.generation) : options.longs === Number ? new $util.LongBits(message.generation.low >>> 0, message.generation.high >>> 0).toNumber() : message.generation; + return object; + }; + + /** + * Converts this StorageSourceManifest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @instance + * @returns {Object.} JSON object + */ + StorageSourceManifest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StorageSourceManifest; + })(); + v1.Source = (function() { /** @@ -1794,6 +2040,7 @@ * @interface ISource * @property {google.devtools.cloudbuild.v1.IStorageSource|null} [storageSource] Source storageSource * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [repoSource] Source repoSource + * @property {google.devtools.cloudbuild.v1.IStorageSourceManifest|null} [storageSourceManifest] Source storageSourceManifest */ /** @@ -1827,17 +2074,25 @@ */ Source.prototype.repoSource = null; + /** + * Source storageSourceManifest. + * @member {google.devtools.cloudbuild.v1.IStorageSourceManifest|null|undefined} storageSourceManifest + * @memberof google.devtools.cloudbuild.v1.Source + * @instance + */ + Source.prototype.storageSourceManifest = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; /** * Source source. - * @member {"storageSource"|"repoSource"|undefined} source + * @member {"storageSource"|"repoSource"|"storageSourceManifest"|undefined} source * @memberof google.devtools.cloudbuild.v1.Source * @instance */ Object.defineProperty(Source.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["storageSource", "repoSource"]), + get: $util.oneOfGetter($oneOfFields = ["storageSource", "repoSource", "storageSourceManifest"]), set: $util.oneOfSetter($oneOfFields) }); @@ -1869,6 +2124,8 @@ $root.google.devtools.cloudbuild.v1.StorageSource.encode(message.storageSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.repoSource != null && Object.hasOwnProperty.call(message, "repoSource")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.repoSource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.storageSourceManifest != null && Object.hasOwnProperty.call(message, "storageSourceManifest")) + $root.google.devtools.cloudbuild.v1.StorageSourceManifest.encode(message.storageSourceManifest, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -1909,6 +2166,9 @@ case 3: message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); break; + case 8: + message.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -1963,6 +2223,16 @@ return "repoSource." + error; } } + if (message.storageSourceManifest != null && message.hasOwnProperty("storageSourceManifest")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.verify(message.storageSourceManifest); + if (error) + return "storageSourceManifest." + error; + } + } return null; }; @@ -1988,6 +2258,11 @@ throw TypeError(".google.devtools.cloudbuild.v1.Source.repoSource: object expected"); message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.repoSource); } + if (object.storageSourceManifest != null) { + if (typeof object.storageSourceManifest !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Source.storageSourceManifest: object expected"); + message.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.fromObject(object.storageSourceManifest); + } return message; }; @@ -2014,6 +2289,11 @@ if (options.oneofs) object.source = "repoSource"; } + if (message.storageSourceManifest != null && message.hasOwnProperty("storageSourceManifest")) { + object.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.toObject(message.storageSourceManifest, options); + if (options.oneofs) + object.source = "storageSourceManifest"; + } return object; }; @@ -5614,6 +5894,7 @@ * @interface ISourceProvenance * @property {google.devtools.cloudbuild.v1.IStorageSource|null} [resolvedStorageSource] SourceProvenance resolvedStorageSource * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [resolvedRepoSource] SourceProvenance resolvedRepoSource + * @property {google.devtools.cloudbuild.v1.IStorageSourceManifest|null} [resolvedStorageSourceManifest] SourceProvenance resolvedStorageSourceManifest * @property {Object.|null} [fileHashes] SourceProvenance fileHashes */ @@ -5649,6 +5930,14 @@ */ SourceProvenance.prototype.resolvedRepoSource = null; + /** + * SourceProvenance resolvedStorageSourceManifest. + * @member {google.devtools.cloudbuild.v1.IStorageSourceManifest|null|undefined} resolvedStorageSourceManifest + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @instance + */ + SourceProvenance.prototype.resolvedStorageSourceManifest = null; + /** * SourceProvenance fileHashes. * @member {Object.} fileHashes @@ -5690,6 +5979,8 @@ } if (message.resolvedRepoSource != null && Object.hasOwnProperty.call(message, "resolvedRepoSource")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.resolvedRepoSource, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.resolvedStorageSourceManifest != null && Object.hasOwnProperty.call(message, "resolvedStorageSourceManifest")) + $root.google.devtools.cloudbuild.v1.StorageSourceManifest.encode(message.resolvedStorageSourceManifest, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -5730,6 +6021,9 @@ case 6: message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); break; + case 9: + message.resolvedStorageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); + break; case 4: if (message.fileHashes === $util.emptyObject) message.fileHashes = {}; @@ -5797,6 +6091,11 @@ if (error) return "resolvedRepoSource." + error; } + if (message.resolvedStorageSourceManifest != null && message.hasOwnProperty("resolvedStorageSourceManifest")) { + var error = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.verify(message.resolvedStorageSourceManifest); + if (error) + return "resolvedStorageSourceManifest." + error; + } if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { if (!$util.isObject(message.fileHashes)) return "fileHashes: object expected"; @@ -5832,6 +6131,11 @@ throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.resolvedRepoSource: object expected"); message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.fromObject(object.resolvedRepoSource); } + if (object.resolvedStorageSourceManifest != null) { + if (typeof object.resolvedStorageSourceManifest !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.resolvedStorageSourceManifest: object expected"); + message.resolvedStorageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.fromObject(object.resolvedStorageSourceManifest); + } if (object.fileHashes) { if (typeof object.fileHashes !== "object") throw TypeError(".google.devtools.cloudbuild.v1.SourceProvenance.fileHashes: object expected"); @@ -5863,6 +6167,7 @@ if (options.defaults) { object.resolvedStorageSource = null; object.resolvedRepoSource = null; + object.resolvedStorageSourceManifest = null; } if (message.resolvedStorageSource != null && message.hasOwnProperty("resolvedStorageSource")) object.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.toObject(message.resolvedStorageSource, options); @@ -5874,6 +6179,8 @@ } if (message.resolvedRepoSource != null && message.hasOwnProperty("resolvedRepoSource")) object.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.resolvedRepoSource, options); + if (message.resolvedStorageSourceManifest != null && message.hasOwnProperty("resolvedStorageSourceManifest")) + object.resolvedStorageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.toObject(message.resolvedStorageSourceManifest, options); return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 1b532ad117cc..e75c61de2df3 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -431,12 +431,29 @@ } } }, + "StorageSourceManifest": { + "fields": { + "bucket": { + "type": "string", + "id": 1 + }, + "object": { + "type": "string", + "id": 2 + }, + "generation": { + "type": "int64", + "id": 3 + } + } + }, "Source": { "oneofs": { "source": { "oneof": [ "storageSource", - "repoSource" + "repoSource", + "storageSourceManifest" ] } }, @@ -448,6 +465,10 @@ "repoSource": { "type": "RepoSource", "id": 3 + }, + "storageSourceManifest": { + "type": "StorageSourceManifest", + "id": 8 } } }, @@ -836,6 +857,10 @@ "type": "RepoSource", "id": 6 }, + "resolvedStorageSourceManifest": { + "type": "StorageSourceManifest", + "id": 9 + }, "fileHashes": { "keyType": "string", "type": "FileHashes", diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 80ca891d5000..dca2e0d8d36c 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -32,6 +32,7 @@ import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); /** * Client JSON configuration object, loaded from * `src/v1/cloud_build_client_config.json`. @@ -154,22 +155,7 @@ export class CloudBuildClient { clientHeader.push(`${opts.libName}/${opts.libVersion}`); } // Load the applicable protos. - // For Node.js, pass the path to JSON proto file. - // For browsers, pass the JSON content. - - const nodejsProtoPath = path.join( - __dirname, - '..', - '..', - 'protos', - 'protos.json' - ); - this._protos = this._gaxGrpc.loadProto( - opts.fallback - ? // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - : nodejsProtoPath - ); + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); // This API contains "path templates"; forward-slash-separated // identifiers to uniquely identify resources within the API. @@ -220,15 +206,11 @@ export class CloudBuildClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - const protoFilesRoot = opts.fallback - ? this._gaxModule.protobuf.Root.fromJSON( - // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - ) - : this._gaxModule.protobuf.loadSync(nodejsProtoPath); this.operationsClient = this._gaxModule .lro({ From 6d44d64212fbc0aebc7b48793d8b7bdfb5b39cbd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 May 2021 23:12:33 +0000 Subject: [PATCH 147/223] chore: update gapic-generator-typescript to v1.3.2 (#226) Committer: @alexander-fenster PiperOrigin-RevId: 372656503 Source-Link: https://github.com/googleapis/googleapis/commit/6fa858c6489b1bbc505a7d7afe39f2dc45819c38 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d7c95df3ab1ea1b4c22a4542bad4924cc46d1388 --- packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index dca2e0d8d36c..cc78c8aa2bf8 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -27,7 +27,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; From 36aa9a876c47ee93381c8566c492a3af18e36638 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 13 May 2021 10:35:52 -0700 Subject: [PATCH 148/223] chore: release 2.2.2 (#227) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index d6f81672ba8f..b2eb8bd380c1 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.1...v2.2.2) (2021-05-12) + + +### Bug Fixes + +* use require() to load JSON protos ([#225](https://www.github.com/googleapis/nodejs-cloudbuild/issues/225)) ([1d9fc28](https://www.github.com/googleapis/nodejs-cloudbuild/commit/1d9fc28d5b2a18305a44a2b315a5f8ccd2cf4da7)) + ### [2.2.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.0...v2.2.1) (2021-05-07) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index a0c0d8621d37..b8c341ec512c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.1", + "version": "2.2.2", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index b0873b0746c8..ea083dc72792 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.1" + "@google-cloud/cloudbuild": "^2.2.2" }, "devDependencies": { "c8": "^7.0.0", From d535626d8b7d43aed83faeb63e421f1a006b1caf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 16:09:12 +0200 Subject: [PATCH 149/223] chore(deps): update dependency sinon to v11 (#230) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index b8c341ec512c..8c3d4edf0365 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "linkinator": "^2.0.0", "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^10.0.0", + "sinon": "^11.0.0", "typescript": "^3.8.3", "@microsoft/api-documenter": "^7.8.10", "@microsoft/api-extractor": "^7.8.10" From 44850a64ae76caef830d0c4a61307e4c1ff50f24 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 20:48:14 +0000 Subject: [PATCH 150/223] fix: GoogleAdsError missing using generator version after 1.3.0 (#231) [PR](https://github.com/googleapis/gapic-generator-typescript/pull/878) within updated gapic-generator-typescript version 1.4.0 Committer: @summer-ji-eng PiperOrigin-RevId: 375759421 Source-Link: https://github.com/googleapis/googleapis/commit/95fa72fdd0d69b02d72c33b37d1e4cc66d4b1446 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f40a34377ad488a7c2bc3992b3c8d5faf5a15c46 --- .../google-devtools-cloudbuild/src/v1/cloud_build_client.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index cc78c8aa2bf8..b78c9c9a06c9 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -149,6 +149,8 @@ export class CloudBuildClient { } 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}`); From 9798120de0713f8c3105d21113a13d9e6ce1c9c8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 17:55:49 -0300 Subject: [PATCH 151/223] chore: release 2.2.3 (#232) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index b2eb8bd380c1..815e43adfc86 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.2...v2.2.3) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#231](https://www.github.com/googleapis/nodejs-cloudbuild/issues/231)) ([d6bd0be](https://www.github.com/googleapis/nodejs-cloudbuild/commit/d6bd0bee152c1c9864b8d6f09ab473309a576b50)) + ### [2.2.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.1...v2.2.2) (2021-05-12) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 8c3d4edf0365..ab32a9faeb71 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.2", + "version": "2.2.3", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index ea083dc72792..0ab32226f146 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.2" + "@google-cloud/cloudbuild": "^2.2.3" }, "devDependencies": { "c8": "^7.0.0", From 1f0eecec41586d72270e143773644d4ac30486dc Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Thu, 10 Jun 2021 23:04:26 +0200 Subject: [PATCH 152/223] chore(nodejs): remove api-extractor dependencies (#238) --- packages/google-devtools-cloudbuild/package.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ab32a9faeb71..cee1fe5c0ee2 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -36,9 +36,7 @@ "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", "sinon": "^11.0.0", - "typescript": "^3.8.3", - "@microsoft/api-documenter": "^7.8.10", - "@microsoft/api-extractor": "^7.8.10" + "typescript": "^3.8.3" }, "scripts": { "predocs": "npm run compile", @@ -56,9 +54,7 @@ "predocs-test": "npm run docs", "docs-test": "linkinator docs", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean", - "api-extractor": "api-extractor run --local", - "api-documenter": "api-documenter yaml --input-folder=temp" + "precompile": "gts clean" }, "license": "Apache-2.0", "engines": { From f92ff893b34160d68b1c8a974d95436b32cc143c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 22 Jun 2021 20:20:21 +0000 Subject: [PATCH 153/223] fix: make request optional in all cases (#241) ... chore: update gapic-generator-ruby to the latest commit chore: release gapic-generator-typescript 1.5.0 Committer: @miraleung PiperOrigin-RevId: 380641501 Source-Link: https://github.com/googleapis/googleapis/commit/076f7e9f0b258bdb54338895d7251b202e8f0de3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/27e4c88b4048e5f56508d4e1aa417d60a3380892 --- .../src/v1/cloud_build_client.ts | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index b78c9c9a06c9..7df78e74cbdc 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -405,7 +405,7 @@ export class CloudBuildClient { // -- Service calls -- // ------------------- getBuild( - request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options?: CallOptions ): Promise< [ @@ -457,7 +457,7 @@ export class CloudBuildClient { * const [response] = await client.getBuild(request); */ getBuild( - request: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, optionsOrCallback?: | CallOptions | Callback< @@ -499,7 +499,7 @@ export class CloudBuildClient { return this.innerApiCalls.getBuild(request, options, callback); } cancelBuild( - request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options?: CallOptions ): Promise< [ @@ -552,7 +552,7 @@ export class CloudBuildClient { * const [response] = await client.cancelBuild(request); */ cancelBuild( - request: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, optionsOrCallback?: | CallOptions | Callback< @@ -596,7 +596,7 @@ export class CloudBuildClient { return this.innerApiCalls.cancelBuild(request, options, callback); } createBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options?: CallOptions ): Promise< [ @@ -651,7 +651,7 @@ export class CloudBuildClient { * const [response] = await client.createBuildTrigger(request); */ createBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -697,7 +697,7 @@ export class CloudBuildClient { return this.innerApiCalls.createBuildTrigger(request, options, callback); } getBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options?: CallOptions ): Promise< [ @@ -749,7 +749,7 @@ export class CloudBuildClient { * const [response] = await client.getBuildTrigger(request); */ getBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -792,7 +792,7 @@ export class CloudBuildClient { return this.innerApiCalls.getBuildTrigger(request, options, callback); } deleteBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options?: CallOptions ): Promise< [ @@ -847,7 +847,7 @@ export class CloudBuildClient { * const [response] = await client.deleteBuildTrigger(request); */ deleteBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -893,7 +893,7 @@ export class CloudBuildClient { return this.innerApiCalls.deleteBuildTrigger(request, options, callback); } updateBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options?: CallOptions ): Promise< [ @@ -950,7 +950,7 @@ export class CloudBuildClient { * const [response] = await client.updateBuildTrigger(request); */ updateBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -996,7 +996,7 @@ export class CloudBuildClient { return this.innerApiCalls.updateBuildTrigger(request, options, callback); } receiveTriggerWebhook( - request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + request?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, options?: CallOptions ): Promise< [ @@ -1054,7 +1054,7 @@ export class CloudBuildClient { * const [response] = await client.receiveTriggerWebhook(request); */ receiveTriggerWebhook( - request: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, + request?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1100,7 +1100,7 @@ export class CloudBuildClient { return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); } createWorkerPool( - request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: CallOptions ): Promise< [ @@ -1152,7 +1152,7 @@ export class CloudBuildClient { * const [response] = await client.createWorkerPool(request); */ createWorkerPool( - request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1189,7 +1189,7 @@ export class CloudBuildClient { return this.innerApiCalls.createWorkerPool(request, options, callback); } getWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: CallOptions ): Promise< [ @@ -1240,7 +1240,7 @@ export class CloudBuildClient { * const [response] = await client.getWorkerPool(request); */ getWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1277,7 +1277,7 @@ export class CloudBuildClient { return this.innerApiCalls.getWorkerPool(request, options, callback); } deleteWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: CallOptions ): Promise< [ @@ -1328,7 +1328,7 @@ export class CloudBuildClient { * const [response] = await client.deleteWorkerPool(request); */ deleteWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1365,7 +1365,7 @@ export class CloudBuildClient { return this.innerApiCalls.deleteWorkerPool(request, options, callback); } updateWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: CallOptions ): Promise< [ @@ -1418,7 +1418,7 @@ export class CloudBuildClient { * const [response] = await client.updateWorkerPool(request); */ updateWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1455,7 +1455,7 @@ export class CloudBuildClient { return this.innerApiCalls.updateWorkerPool(request, options, callback); } listWorkerPools( - request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, options?: CallOptions ): Promise< [ @@ -1505,7 +1505,7 @@ export class CloudBuildClient { * const [response] = await client.listWorkerPools(request); */ listWorkerPools( - request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1543,7 +1543,7 @@ export class CloudBuildClient { } createBuild( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: CallOptions ): Promise< [ @@ -1608,7 +1608,7 @@ export class CloudBuildClient { * const [response] = await operation.promise(); */ createBuild( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1694,7 +1694,7 @@ export class CloudBuildClient { >; } retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options?: CallOptions ): Promise< [ @@ -1781,7 +1781,7 @@ export class CloudBuildClient { * const [response] = await operation.promise(); */ retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1867,7 +1867,7 @@ export class CloudBuildClient { >; } runBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: CallOptions ): Promise< [ @@ -1927,7 +1927,7 @@ export class CloudBuildClient { * const [response] = await operation.promise(); */ runBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2012,7 +2012,7 @@ export class CloudBuildClient { >; } listBuilds( - request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, options?: CallOptions ): Promise< [ @@ -2083,7 +2083,7 @@ export class CloudBuildClient { * for more details and examples. */ listBuilds( - request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2248,7 +2248,7 @@ export class CloudBuildClient { ) as AsyncIterable; } listBuildTriggers( - request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options?: CallOptions ): Promise< [ @@ -2305,7 +2305,7 @@ export class CloudBuildClient { * for more details and examples. */ listBuildTriggers( - request: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, + request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From d0bf9fbfa2909f92d79980b0853daca1df17ff9b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Jun 2021 18:12:37 +0000 Subject: [PATCH 154/223] chore: release 2.2.4 (#242) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.3...v2.2.4) (2021-06-24) ### Bug Fixes * make request optional in all cases ([#241](https://www.github.com/googleapis/nodejs-cloudbuild/issues/241)) ([c96003a](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c96003a4897d3f7c8181a56c273b842a4dcdfbf7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 815e43adfc86..0181ee78866a 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.3...v2.2.4) (2021-06-24) + + +### Bug Fixes + +* make request optional in all cases ([#241](https://www.github.com/googleapis/nodejs-cloudbuild/issues/241)) ([c96003a](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c96003a4897d3f7c8181a56c273b842a4dcdfbf7)) + ### [2.2.3](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.2...v2.2.3) (2021-05-25) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index cee1fe5c0ee2..7990d5fca8dc 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.3", + "version": "2.2.4", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 0ab32226f146..fd294567e324 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.3" + "@google-cloud/cloudbuild": "^2.2.4" }, "devDependencies": { "c8": "^7.0.0", From 715fa191052228c5c5dc60b75da067604cb807c0 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Tue, 29 Jun 2021 11:24:41 -0400 Subject: [PATCH 155/223] fix(deps): google-gax v2.17.0 with mTLS (#245) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-cloudbuild/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes # 🦕 --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 7990d5fca8dc..585cda3d446a 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -61,6 +61,6 @@ "node": ">=10" }, "dependencies": { - "google-gax": "^2.12.0" + "google-gax": "^2.17.0" } } From 7ec78817e05ebdeebbaf7a0d816e2c19b08c963e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 13:19:32 -0700 Subject: [PATCH 156/223] chore: synchronize new proto/yaml changes (#246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Synchronize new proto/yaml changes. PiperOrigin-RevId: 381955863 Source-Link: https://github.com/googleapis/googleapis/commit/24443e8a67e256360067cdfc4105545fde620bf0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/328123587132df2e2b97f5dfe0da4f2118d8ff89 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Jeffrey Rennie --- .../devtools/cloudbuild/v1/cloudbuild.proto | 155 +++- .../protos/protos.d.ts | 278 ++++++- .../protos/protos.js | 769 +++++++++++++++++- .../protos/protos.json | 175 +++- .../src/v1/cloud_build_client.ts | 185 ++++- .../test/gapic_cloud_build_v1.ts | 261 ++++-- 6 files changed, 1685 insertions(+), 138 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 50bedcd8b4d4..5262e24823e9 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -183,6 +183,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/triggers" body: "trigger" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*}/triggers" + body: "trigger" + } }; option (google.api.method_signature) = "project_id,trigger"; } @@ -193,6 +197,9 @@ service CloudBuild { rpc GetBuildTrigger(GetBuildTriggerRequest) returns (BuildTrigger) { option (google.api.http) = { get: "/v1/projects/{project_id}/triggers/{trigger_id}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/triggers/*}" + } }; option (google.api.method_signature) = "project_id,trigger_id"; } @@ -204,6 +211,9 @@ service CloudBuild { returns (ListBuildTriggersResponse) { option (google.api.http) = { get: "/v1/projects/{project_id}/triggers" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*}/triggers" + } }; option (google.api.method_signature) = "project_id"; } @@ -215,6 +225,9 @@ service CloudBuild { returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/projects/{project_id}/triggers/{trigger_id}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/triggers/*}" + } }; option (google.api.method_signature) = "project_id,trigger_id"; } @@ -226,6 +239,10 @@ service CloudBuild { option (google.api.http) = { patch: "/v1/projects/{project_id}/triggers/{trigger_id}" body: "trigger" + additional_bindings { + patch: "/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}" + body: "trigger" + } }; option (google.api.method_signature) = "project_id,trigger_id,trigger"; } @@ -236,6 +253,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/triggers/{trigger_id}:run" body: "source" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/triggers/*}:run" + body: "*" + } }; option (google.api.method_signature) = "project_id,trigger_id,source"; option (google.longrunning.operation_info) = { @@ -251,6 +272,10 @@ service CloudBuild { option (google.api.http) = { post: "/v1/projects/{project_id}/triggers/{trigger}:webhook" body: "body" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/triggers/*}:webhook" + body: "body" + } }; } @@ -299,6 +324,12 @@ message RetryBuildRequest { // Specifies a build trigger to run and the source to use. message RunBuildTriggerRequest { + // The name of the `Trigger` to run. + // Format: `projects/{project}/locations/{location}/triggers/{trigger}` + string name = 4 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/BuildTrigger" + }]; + // Required. ID of the project. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -371,7 +402,8 @@ message RepoSource { } // Location of the source manifest in Google Cloud Storage. -// This feature is in Preview. +// This feature is in Preview; see description +// [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). message StorageSourceManifest { // Google Cloud Storage bucket containing the source manifest (see [Bucket // Name @@ -400,7 +432,8 @@ message Source { RepoSource repo_source = 3; // If provided, get the source from this manifest in Google Cloud Storage. - // This feature is in Preview. + // This feature is in Preview; see description + // [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). StorageSourceManifest storage_source_manifest = 8; } } @@ -593,6 +626,30 @@ message Build { pattern: "projects/{project}/locations/{location}/builds/{build}" }; + // A non-fatal problem encountered during the execution of the build. + message Warning { + // The relative importance of this warning. + enum Priority { + // Should not be used. + PRIORITY_UNSPECIFIED = 0; + + // e.g. deprecation warnings and alternative feature highlights. + INFO = 1; + + // e.g. automated detection of possible issues with the build. + WARNING = 2; + + // e.g. alerts that a feature used in the build is pending removal + ALERT = 3; + } + + // Explanation of the warning generated. + string text = 1; + + // The priority for this warning. + Priority priority = 2; + } + // Possible status of a build or build step. enum Status { // Status of the build is unknown. @@ -744,13 +801,16 @@ message Build { // Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. // ACCOUNT can be email address or uniqueId of the service account. // - // This field is in beta. string service_account = 42 [(google.api.resource_reference) = { type: "iam.googleapis.com/ServiceAccount" }]; // Secrets and secret environment variables. Secrets available_secrets = 47; + + // Output only. Non-fatal problems encountered during the execution of the + // build. + repeated Warning warnings = 49 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Artifacts produced by a build that should be uploaded upon @@ -1021,9 +1081,17 @@ message CancelBuildRequest { message BuildTrigger { option (google.api.resource) = { type: "cloudbuild.googleapis.com/BuildTrigger" + plural: "triggers" + singular: "trigger" pattern: "projects/{project}/triggers/{trigger}" + pattern: "projects/{project}/locations/{location}/triggers/{trigger}" }; + // The `Trigger` name with format: + // `projects/{project}/locations/{location}/triggers/{trigger}`, where + // {trigger} is a unique identifier generated by the service. + string resource_name = 34; + // Output only. Unique identifier of the trigger. string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1056,12 +1124,27 @@ message BuildTrigger { // Mutually exclusive with `trigger_template`. GitHubEventsConfig github = 13; - // Optional. PubsubConfig describes the configuration of a trigger that + // PubsubConfig describes the configuration of a trigger that // creates a build whenever a Pub/Sub message is published. - PubsubConfig pubsub_config = 29 [(google.api.field_behavior) = OPTIONAL]; + PubsubConfig pubsub_config = 29; + + // WebhookConfig describes the configuration of a trigger that + // creates a build whenever a webhook is sent to a trigger's webhook URL. + WebhookConfig webhook_config = 31; // Template describing the Build request to make when the trigger is matched. oneof build_template { + // Autodetect build configuration. The following precedence is used (case + // insensitive): + // + // 1. cloudbuild.yaml + // 2. cloudbuild.yml + // 3. cloudbuild.json + // 4. Dockerfile + // + // Currently only available for GitHub App Triggers. + bool autodetect = 18; + // Contents of the build template. Build build = 4; @@ -1181,6 +1264,38 @@ message PubsubConfig { State state = 4; } +// WebhookConfig describes the configuration of a trigger that +// creates a build whenever a webhook is sent to a trigger's webhook URL. +message WebhookConfig { + // Enumerates potential issues with the Secret Manager secret provided by the + // user. + enum State { + // The webhook auth configuration not been checked. + STATE_UNSPECIFIED = 0; + + // The auth configuration is properly setup. + OK = 1; + + // The secret provided in auth_method has been deleted. + SECRET_DELETED = 2; + } + + // Auth method specifies how the webhook authenticates with GCP. + oneof auth_method { + // Required. Resource name for the secret required as a URL parameter. + string secret = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "secretmanager.googleapis.com/SecretVersion" + } + ]; + } + + // Potential issues with the underlying Pub/Sub subscription configuration. + // Only populated on get requests. + State state = 4; +} + // PullRequestFilter contains filter properties for matching GitHub Pull // Requests. message PullRequestFilter { @@ -1241,6 +1356,12 @@ message PushFilter { // Request to create a new `BuildTrigger`. message CreateBuildTriggerRequest { + // The parent resource where this trigger will be created. + // Format: `projects/{project}/locations/{location}` + string parent = 3 [(google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/BuildTrigger" + }]; + // Required. ID of the project for which to configure automatic builds. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1250,6 +1371,12 @@ message CreateBuildTriggerRequest { // Returns the `BuildTrigger` with the specified ID. message GetBuildTriggerRequest { + // The name of the `Trigger` to retrieve. + // Format: `projects/{project}/locations/{location}/triggers/{trigger}` + string name = 3 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/BuildTrigger" + }]; + // Required. ID of the project that owns the trigger. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1259,6 +1386,12 @@ message GetBuildTriggerRequest { // Request to list existing `BuildTriggers`. message ListBuildTriggersRequest { + // The parent of the collection of `Triggers`. + // Format: `projects/{project}/locations/{location}` + string parent = 4 [(google.api.resource_reference) = { + child_type: "cloudbuild.googleapis.com/BuildTrigger" + }]; + // Required. ID of the project for which to list BuildTriggers. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1280,6 +1413,12 @@ message ListBuildTriggersResponse { // Request to delete a `BuildTrigger`. message DeleteBuildTriggerRequest { + // The name of the `Trigger` to delete. + // Format: `projects/{project}/locations/{location}/triggers/{trigger}` + string name = 3 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/BuildTrigger" + }]; + // Required. ID of the project that owns the trigger. string project_id = 1 [(google.api.field_behavior) = REQUIRED]; @@ -1415,7 +1554,7 @@ message BuildOptions { // Option to specify a `WorkerPool` for the build. // Format: projects/{project}/locations/{location}/workerPools/{workerPool} // - // This field is experimental. + // This field is in beta and is available only to restricted users. string worker_pool = 7; // Option to specify the logging mode, which determines if and where build @@ -1451,6 +1590,10 @@ message BuildOptions { // ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by // the ReceiveTriggerWebhook method. message ReceiveTriggerWebhookRequest { + // The name of the `ReceiveTriggerWebhook` to retrieve. + // Format: `projects/{project}/locations/{location}/triggers/{trigger}` + string name = 5; + // HTTP request body. google.api.HttpBody body = 1; diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 673e9f433e2a..347b724db877 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -512,6 +512,9 @@ export namespace google { /** Properties of a RunBuildTriggerRequest. */ interface IRunBuildTriggerRequest { + /** RunBuildTriggerRequest name */ + name?: (string|null); + /** RunBuildTriggerRequest projectId */ projectId?: (string|null); @@ -531,6 +534,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IRunBuildTriggerRequest); + /** RunBuildTriggerRequest name. */ + public name: string; + /** RunBuildTriggerRequest projectId. */ public projectId: string; @@ -1711,6 +1717,9 @@ export namespace google { /** Build availableSecrets */ availableSecrets?: (google.devtools.cloudbuild.v1.ISecrets|null); + + /** Build warnings */ + warnings?: (google.devtools.cloudbuild.v1.Build.IWarning[]|null); } /** Represents a Build. */ @@ -1800,6 +1809,9 @@ export namespace google { /** Build availableSecrets. */ public availableSecrets?: (google.devtools.cloudbuild.v1.ISecrets|null); + /** Build warnings. */ + public warnings: google.devtools.cloudbuild.v1.Build.IWarning[]; + /** * Creates a new Build instance using the specified properties. * @param [properties] Properties to set @@ -1873,6 +1885,113 @@ export namespace google { namespace Build { + /** Properties of a Warning. */ + interface IWarning { + + /** Warning text */ + text?: (string|null); + + /** Warning priority */ + priority?: (google.devtools.cloudbuild.v1.Build.Warning.Priority|keyof typeof google.devtools.cloudbuild.v1.Build.Warning.Priority|null); + } + + /** Represents a Warning. */ + class Warning implements IWarning { + + /** + * Constructs a new Warning. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Build.IWarning); + + /** Warning text. */ + public text: string; + + /** Warning priority. */ + public priority: (google.devtools.cloudbuild.v1.Build.Warning.Priority|keyof typeof google.devtools.cloudbuild.v1.Build.Warning.Priority); + + /** + * Creates a new Warning instance using the specified properties. + * @param [properties] Properties to set + * @returns Warning instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Build.IWarning): google.devtools.cloudbuild.v1.Build.Warning; + + /** + * Encodes the specified Warning message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @param message Warning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Build.IWarning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Warning message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @param message Warning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Build.IWarning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Warning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Build.Warning; + + /** + * Decodes a Warning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Build.Warning; + + /** + * Verifies a Warning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Warning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Warning + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Build.Warning; + + /** + * Creates a plain object from a Warning message. Also converts values to other types if specified. + * @param message Warning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Build.Warning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Warning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Warning { + + /** Priority enum. */ + enum Priority { + PRIORITY_UNSPECIFIED = 0, + INFO = 1, + WARNING = 2, + ALERT = 3 + } + } + /** Status enum. */ enum Status { STATUS_UNKNOWN = 0, @@ -3481,6 +3600,9 @@ export namespace google { /** Properties of a BuildTrigger. */ interface IBuildTrigger { + /** BuildTrigger resourceName */ + resourceName?: (string|null); + /** BuildTrigger id */ id?: (string|null); @@ -3502,6 +3624,12 @@ export namespace google { /** BuildTrigger pubsubConfig */ pubsubConfig?: (google.devtools.cloudbuild.v1.IPubsubConfig|null); + /** BuildTrigger webhookConfig */ + webhookConfig?: (google.devtools.cloudbuild.v1.IWebhookConfig|null); + + /** BuildTrigger autodetect */ + autodetect?: (boolean|null); + /** BuildTrigger build */ build?: (google.devtools.cloudbuild.v1.IBuild|null); @@ -3536,6 +3664,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IBuildTrigger); + /** BuildTrigger resourceName. */ + public resourceName: string; + /** BuildTrigger id. */ public id: string; @@ -3557,6 +3688,12 @@ export namespace google { /** BuildTrigger pubsubConfig. */ public pubsubConfig?: (google.devtools.cloudbuild.v1.IPubsubConfig|null); + /** BuildTrigger webhookConfig. */ + public webhookConfig?: (google.devtools.cloudbuild.v1.IWebhookConfig|null); + + /** BuildTrigger autodetect. */ + public autodetect?: (boolean|null); + /** BuildTrigger build. */ public build?: (google.devtools.cloudbuild.v1.IBuild|null); @@ -3582,7 +3719,7 @@ export namespace google { public filter: string; /** BuildTrigger buildTemplate. */ - public buildTemplate?: ("build"|"filename"); + public buildTemplate?: ("autodetect"|"build"|"filename"); /** * Creates a new BuildTrigger instance using the specified properties. @@ -3892,6 +4029,115 @@ export namespace google { } } + /** Properties of a WebhookConfig. */ + interface IWebhookConfig { + + /** WebhookConfig secret */ + secret?: (string|null); + + /** WebhookConfig state */ + state?: (google.devtools.cloudbuild.v1.WebhookConfig.State|keyof typeof google.devtools.cloudbuild.v1.WebhookConfig.State|null); + } + + /** Represents a WebhookConfig. */ + class WebhookConfig implements IWebhookConfig { + + /** + * Constructs a new WebhookConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IWebhookConfig); + + /** WebhookConfig secret. */ + public secret?: (string|null); + + /** WebhookConfig state. */ + public state: (google.devtools.cloudbuild.v1.WebhookConfig.State|keyof typeof google.devtools.cloudbuild.v1.WebhookConfig.State); + + /** WebhookConfig authMethod. */ + public authMethod?: "secret"; + + /** + * Creates a new WebhookConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WebhookConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IWebhookConfig): google.devtools.cloudbuild.v1.WebhookConfig; + + /** + * Encodes the specified WebhookConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WebhookConfig.verify|verify} messages. + * @param message WebhookConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IWebhookConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebhookConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WebhookConfig.verify|verify} messages. + * @param message WebhookConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IWebhookConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.WebhookConfig; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.WebhookConfig; + + /** + * Verifies a WebhookConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebhookConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebhookConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.WebhookConfig; + + /** + * Creates a plain object from a WebhookConfig message. Also converts values to other types if specified. + * @param message WebhookConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.WebhookConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebhookConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace WebhookConfig { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + OK = 1, + SECRET_DELETED = 2 + } + } + /** Properties of a PullRequestFilter. */ interface IPullRequestFilter { @@ -4115,6 +4361,9 @@ export namespace google { /** Properties of a CreateBuildTriggerRequest. */ interface ICreateBuildTriggerRequest { + /** CreateBuildTriggerRequest parent */ + parent?: (string|null); + /** CreateBuildTriggerRequest projectId */ projectId?: (string|null); @@ -4131,6 +4380,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest); + /** CreateBuildTriggerRequest parent. */ + public parent: string; + /** CreateBuildTriggerRequest projectId. */ public projectId: string; @@ -4211,6 +4463,9 @@ export namespace google { /** Properties of a GetBuildTriggerRequest. */ interface IGetBuildTriggerRequest { + /** GetBuildTriggerRequest name */ + name?: (string|null); + /** GetBuildTriggerRequest projectId */ projectId?: (string|null); @@ -4227,6 +4482,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IGetBuildTriggerRequest); + /** GetBuildTriggerRequest name. */ + public name: string; + /** GetBuildTriggerRequest projectId. */ public projectId: string; @@ -4307,6 +4565,9 @@ export namespace google { /** Properties of a ListBuildTriggersRequest. */ interface IListBuildTriggersRequest { + /** ListBuildTriggersRequest parent */ + parent?: (string|null); + /** ListBuildTriggersRequest projectId */ projectId?: (string|null); @@ -4326,6 +4587,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IListBuildTriggersRequest); + /** ListBuildTriggersRequest parent. */ + public parent: string; + /** ListBuildTriggersRequest projectId. */ public projectId: string; @@ -4505,6 +4769,9 @@ export namespace google { /** Properties of a DeleteBuildTriggerRequest. */ interface IDeleteBuildTriggerRequest { + /** DeleteBuildTriggerRequest name */ + name?: (string|null); + /** DeleteBuildTriggerRequest projectId */ projectId?: (string|null); @@ -4521,6 +4788,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest); + /** DeleteBuildTriggerRequest name. */ + public name: string; + /** DeleteBuildTriggerRequest projectId. */ public projectId: string; @@ -4900,6 +5170,9 @@ export namespace google { /** Properties of a ReceiveTriggerWebhookRequest. */ interface IReceiveTriggerWebhookRequest { + /** ReceiveTriggerWebhookRequest name */ + name?: (string|null); + /** ReceiveTriggerWebhookRequest body */ body?: (google.api.IHttpBody|null); @@ -4922,6 +5195,9 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest); + /** ReceiveTriggerWebhookRequest name. */ + public name: string; + /** ReceiveTriggerWebhookRequest body. */ public body?: (google.api.IHttpBody|null); diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index d5e3bed6969a..7ed7d925a371 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -900,6 +900,7 @@ * Properties of a RunBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IRunBuildTriggerRequest + * @property {string|null} [name] RunBuildTriggerRequest name * @property {string|null} [projectId] RunBuildTriggerRequest projectId * @property {string|null} [triggerId] RunBuildTriggerRequest triggerId * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [source] RunBuildTriggerRequest source @@ -920,6 +921,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * RunBuildTriggerRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @instance + */ + RunBuildTriggerRequest.prototype.name = ""; + /** * RunBuildTriggerRequest projectId. * @member {string} projectId @@ -974,6 +983,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); if (message.source != null && Object.hasOwnProperty.call(message, "source")) $root.google.devtools.cloudbuild.v1.RepoSource.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); return writer; }; @@ -1008,6 +1019,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -1052,6 +1066,9 @@ RunBuildTriggerRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -1078,6 +1095,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.RunBuildTriggerRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.triggerId != null) @@ -1107,6 +1126,7 @@ object.projectId = ""; object.triggerId = ""; object.source = null; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; @@ -1114,6 +1134,8 @@ object.triggerId = message.triggerId; if (message.source != null && message.hasOwnProperty("source")) object.source = $root.google.devtools.cloudbuild.v1.RepoSource.toObject(message.source, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -3998,6 +4020,7 @@ * @property {Object.|null} [timing] Build timing * @property {string|null} [serviceAccount] Build serviceAccount * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets + * @property {Array.|null} [warnings] Build warnings */ /** @@ -4015,6 +4038,7 @@ this.tags = []; this.secrets = []; this.timing = {}; + this.warnings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4229,6 +4253,14 @@ */ Build.prototype.availableSecrets = null; + /** + * Build warnings. + * @member {Array.} warnings + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.warnings = $util.emptyArray; + /** * Creates a new Build instance using the specified properties. * @function create @@ -4313,6 +4345,9 @@ writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); if (message.availableSecrets != null && Object.hasOwnProperty.call(message, "availableSecrets")) $root.google.devtools.cloudbuild.v1.Secrets.encode(message.availableSecrets, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + $root.google.devtools.cloudbuild.v1.Build.Warning.encode(message.warnings[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); return writer; }; @@ -4471,6 +4506,11 @@ case 47: message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); break; + case 49: + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); + break; default: reader.skipType(tag & 7); break; @@ -4650,6 +4690,15 @@ if (error) return "availableSecrets." + error; } + if (message.warnings != null && message.hasOwnProperty("warnings")) { + if (!Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Build.Warning.verify(message.warnings[i]); + if (error) + return "warnings." + error; + } + } return null; }; @@ -4825,6 +4874,16 @@ throw TypeError(".google.devtools.cloudbuild.v1.Build.availableSecrets: object expected"); message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.fromObject(object.availableSecrets); } + if (object.warnings) { + if (!Array.isArray(object.warnings)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: array expected"); + message.warnings = []; + for (var i = 0; i < object.warnings.length; ++i) { + if (typeof object.warnings[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: object expected"); + message.warnings[i] = $root.google.devtools.cloudbuild.v1.Build.Warning.fromObject(object.warnings[i]); + } + } return message; }; @@ -4846,6 +4905,7 @@ object.images = []; object.tags = []; object.secrets = []; + object.warnings = []; } if (options.objects || options.defaults) { object.substitutions = {}; @@ -4944,6 +5004,11 @@ object.name = message.name; if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) object.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.toObject(message.availableSecrets, options); + if (message.warnings && message.warnings.length) { + object.warnings = []; + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = $root.google.devtools.cloudbuild.v1.Build.Warning.toObject(message.warnings[j], options); + } return object; }; @@ -4958,6 +5023,257 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + Build.Warning = (function() { + + /** + * Properties of a Warning. + * @memberof google.devtools.cloudbuild.v1.Build + * @interface IWarning + * @property {string|null} [text] Warning text + * @property {google.devtools.cloudbuild.v1.Build.Warning.Priority|null} [priority] Warning priority + */ + + /** + * Constructs a new Warning. + * @memberof google.devtools.cloudbuild.v1.Build + * @classdesc Represents a Warning. + * @implements IWarning + * @constructor + * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set + */ + function Warning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Warning text. + * @member {string} text + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + */ + Warning.prototype.text = ""; + + /** + * Warning priority. + * @member {google.devtools.cloudbuild.v1.Build.Warning.Priority} priority + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + */ + Warning.prototype.priority = 0; + + /** + * Creates a new Warning instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning instance + */ + Warning.create = function create(properties) { + return new Warning(properties); + }; + + /** + * Encodes the specified Warning message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Warning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.priority); + return writer; + }; + + /** + * Encodes the specified Warning message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Warning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Warning message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Warning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.text = reader.string(); + break; + case 2: + message.priority = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Warning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Warning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Warning message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Warning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + switch (message.priority) { + default: + return "priority: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Warning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + */ + Warning.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build.Warning) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); + if (object.text != null) + message.text = String(object.text); + switch (object.priority) { + case "PRIORITY_UNSPECIFIED": + case 0: + message.priority = 0; + break; + case "INFO": + case 1: + message.priority = 1; + break; + case "WARNING": + case 2: + message.priority = 2; + break; + case "ALERT": + case 3: + message.priority = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Warning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.Warning} message Warning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Warning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] : message.priority; + return object; + }; + + /** + * Converts this Warning to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + * @returns {Object.} JSON object + */ + Warning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Priority enum. + * @name google.devtools.cloudbuild.v1.Build.Warning.Priority + * @enum {number} + * @property {number} PRIORITY_UNSPECIFIED=0 PRIORITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ALERT=3 ALERT value + */ + Warning.Priority = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIORITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ALERT"] = 3; + return values; + })(); + + return Warning; + })(); + /** * Status enum. * @name google.devtools.cloudbuild.v1.Build.Status @@ -8831,6 +9147,7 @@ * Properties of a BuildTrigger. * @memberof google.devtools.cloudbuild.v1 * @interface IBuildTrigger + * @property {string|null} [resourceName] BuildTrigger resourceName * @property {string|null} [id] BuildTrigger id * @property {string|null} [description] BuildTrigger description * @property {string|null} [name] BuildTrigger name @@ -8838,6 +9155,8 @@ * @property {google.devtools.cloudbuild.v1.IRepoSource|null} [triggerTemplate] BuildTrigger triggerTemplate * @property {google.devtools.cloudbuild.v1.IGitHubEventsConfig|null} [github] BuildTrigger github * @property {google.devtools.cloudbuild.v1.IPubsubConfig|null} [pubsubConfig] BuildTrigger pubsubConfig + * @property {google.devtools.cloudbuild.v1.IWebhookConfig|null} [webhookConfig] BuildTrigger webhookConfig + * @property {boolean|null} [autodetect] BuildTrigger autodetect * @property {google.devtools.cloudbuild.v1.IBuild|null} [build] BuildTrigger build * @property {string|null} [filename] BuildTrigger filename * @property {google.protobuf.ITimestamp|null} [createTime] BuildTrigger createTime @@ -8867,6 +9186,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * BuildTrigger resourceName. + * @member {string} resourceName + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.resourceName = ""; + /** * BuildTrigger id. * @member {string} id @@ -8923,6 +9250,22 @@ */ BuildTrigger.prototype.pubsubConfig = null; + /** + * BuildTrigger webhookConfig. + * @member {google.devtools.cloudbuild.v1.IWebhookConfig|null|undefined} webhookConfig + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.webhookConfig = null; + + /** + * BuildTrigger autodetect. + * @member {boolean|null|undefined} autodetect + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.autodetect = null; + /** * BuildTrigger build. * @member {google.devtools.cloudbuild.v1.IBuild|null|undefined} build @@ -8992,12 +9335,12 @@ /** * BuildTrigger buildTemplate. - * @member {"build"|"filename"|undefined} buildTemplate + * @member {"autodetect"|"build"|"filename"|undefined} buildTemplate * @memberof google.devtools.cloudbuild.v1.BuildTrigger * @instance */ Object.defineProperty(BuildTrigger.prototype, "buildTemplate", { - get: $util.oneOfGetter($oneOfFields = ["build", "filename"]), + get: $util.oneOfGetter($oneOfFields = ["autodetect", "build", "filename"]), set: $util.oneOfSetter($oneOfFields) }); @@ -9050,6 +9393,8 @@ if (message.includedFiles != null && message.includedFiles.length) for (var i = 0; i < message.includedFiles.length; ++i) writer.uint32(/* id 16, wireType 2 =*/130).string(message.includedFiles[i]); + if (message.autodetect != null && Object.hasOwnProperty.call(message, "autodetect")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.autodetect); if (message.tags != null && message.tags.length) for (var i = 0; i < message.tags.length; ++i) writer.uint32(/* id 19, wireType 2 =*/154).string(message.tags[i]); @@ -9059,6 +9404,10 @@ $root.google.devtools.cloudbuild.v1.PubsubConfig.encode(message.pubsubConfig, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) writer.uint32(/* id 30, wireType 2 =*/242).string(message.filter); + if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) + $root.google.devtools.cloudbuild.v1.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 34, wireType 2 =*/274).string(message.resourceName); return writer; }; @@ -9093,6 +9442,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 34: + message.resourceName = reader.string(); + break; case 1: message.id = reader.string(); break; @@ -9116,6 +9468,12 @@ case 29: message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.decode(reader, reader.uint32()); break; + case 31: + message.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.decode(reader, reader.uint32()); + break; + case 18: + message.autodetect = reader.bool(); + break; case 4: message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); break; @@ -9199,6 +9557,9 @@ if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isString(message.id)) return "id: string expected"; @@ -9230,7 +9591,19 @@ if (error) return "pubsubConfig." + error; } + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) { + var error = $root.google.devtools.cloudbuild.v1.WebhookConfig.verify(message.webhookConfig); + if (error) + return "webhookConfig." + error; + } + if (message.autodetect != null && message.hasOwnProperty("autodetect")) { + properties.buildTemplate = 1; + if (typeof message.autodetect !== "boolean") + return "autodetect: boolean expected"; + } if (message.build != null && message.hasOwnProperty("build")) { + if (properties.buildTemplate === 1) + return "buildTemplate: multiple values"; properties.buildTemplate = 1; { var error = $root.google.devtools.cloudbuild.v1.Build.verify(message.build); @@ -9293,6 +9666,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.BuildTrigger) return object; var message = new $root.google.devtools.cloudbuild.v1.BuildTrigger(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); if (object.id != null) message.id = String(object.id); if (object.description != null) @@ -9321,6 +9696,13 @@ throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.pubsubConfig: object expected"); message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.fromObject(object.pubsubConfig); } + if (object.webhookConfig != null) { + if (typeof object.webhookConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.webhookConfig: object expected"); + message.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.fromObject(object.webhookConfig); + } + if (object.autodetect != null) + message.autodetect = Boolean(object.autodetect); if (object.build != null) { if (typeof object.build !== "object") throw TypeError(".google.devtools.cloudbuild.v1.BuildTrigger.build: object expected"); @@ -9391,6 +9773,8 @@ object.name = ""; object.pubsubConfig = null; object.filter = ""; + object.webhookConfig = null; + object.resourceName = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -9430,6 +9814,11 @@ for (var j = 0; j < message.includedFiles.length; ++j) object.includedFiles[j] = message.includedFiles[j]; } + if (message.autodetect != null && message.hasOwnProperty("autodetect")) { + object.autodetect = message.autodetect; + if (options.oneofs) + object.buildTemplate = "autodetect"; + } if (message.tags && message.tags.length) { object.tags = []; for (var j = 0; j < message.tags.length; ++j) @@ -9441,6 +9830,10 @@ object.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.toObject(message.pubsubConfig, options); if (message.filter != null && message.hasOwnProperty("filter")) object.filter = message.filter; + if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) + object.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.toObject(message.webhookConfig, options); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; return object; }; @@ -10087,6 +10480,268 @@ return PubsubConfig; })(); + v1.WebhookConfig = (function() { + + /** + * Properties of a WebhookConfig. + * @memberof google.devtools.cloudbuild.v1 + * @interface IWebhookConfig + * @property {string|null} [secret] WebhookConfig secret + * @property {google.devtools.cloudbuild.v1.WebhookConfig.State|null} [state] WebhookConfig state + */ + + /** + * Constructs a new WebhookConfig. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a WebhookConfig. + * @implements IWebhookConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.IWebhookConfig=} [properties] Properties to set + */ + function WebhookConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebhookConfig secret. + * @member {string|null|undefined} secret + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @instance + */ + WebhookConfig.prototype.secret = null; + + /** + * WebhookConfig state. + * @member {google.devtools.cloudbuild.v1.WebhookConfig.State} state + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @instance + */ + WebhookConfig.prototype.state = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * WebhookConfig authMethod. + * @member {"secret"|undefined} authMethod + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @instance + */ + Object.defineProperty(WebhookConfig.prototype, "authMethod", { + get: $util.oneOfGetter($oneOfFields = ["secret"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new WebhookConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWebhookConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.WebhookConfig} WebhookConfig instance + */ + WebhookConfig.create = function create(properties) { + return new WebhookConfig(properties); + }; + + /** + * Encodes the specified WebhookConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WebhookConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secret != null && Object.hasOwnProperty.call(message, "secret")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.secret); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + return writer; + }; + + /** + * Encodes the specified WebhookConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WebhookConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {google.devtools.cloudbuild.v1.IWebhookConfig} message WebhookConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebhookConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.WebhookConfig} WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WebhookConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: + message.secret = reader.string(); + break; + case 4: + message.state = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebhookConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.WebhookConfig} WebhookConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebhookConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebhookConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebhookConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.secret != null && message.hasOwnProperty("secret")) { + properties.authMethod = 1; + if (!$util.isString(message.secret)) + return "secret: string expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a WebhookConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.WebhookConfig} WebhookConfig + */ + WebhookConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.WebhookConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.WebhookConfig(); + if (object.secret != null) + message.secret = String(object.secret); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "OK": + case 1: + message.state = 1; + break; + case "SECRET_DELETED": + case 2: + message.state = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a WebhookConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {google.devtools.cloudbuild.v1.WebhookConfig} message WebhookConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebhookConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if (message.secret != null && message.hasOwnProperty("secret")) { + object.secret = message.secret; + if (options.oneofs) + object.authMethod = "secret"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WebhookConfig.State[message.state] : message.state; + return object; + }; + + /** + * Converts this WebhookConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @instance + * @returns {Object.} JSON object + */ + WebhookConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.devtools.cloudbuild.v1.WebhookConfig.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} OK=1 OK value + * @property {number} SECRET_DELETED=2 SECRET_DELETED value + */ + WebhookConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "OK"] = 1; + values[valuesById[2] = "SECRET_DELETED"] = 2; + return values; + })(); + + return WebhookConfig; + })(); + v1.PullRequestFilter = (function() { /** @@ -10634,6 +11289,7 @@ * Properties of a CreateBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 * @interface ICreateBuildTriggerRequest + * @property {string|null} [parent] CreateBuildTriggerRequest parent * @property {string|null} [projectId] CreateBuildTriggerRequest projectId * @property {google.devtools.cloudbuild.v1.IBuildTrigger|null} [trigger] CreateBuildTriggerRequest trigger */ @@ -10653,6 +11309,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CreateBuildTriggerRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @instance + */ + CreateBuildTriggerRequest.prototype.parent = ""; + /** * CreateBuildTriggerRequest projectId. * @member {string} projectId @@ -10697,6 +11361,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger")) $root.google.devtools.cloudbuild.v1.BuildTrigger.encode(message.trigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent); return writer; }; @@ -10731,6 +11397,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.parent = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -10772,6 +11441,9 @@ CreateBuildTriggerRequest.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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -10795,6 +11467,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.projectId != null) message.projectId = String(object.projectId); if (object.trigger != null) { @@ -10821,11 +11495,14 @@ if (options.defaults) { object.projectId = ""; object.trigger = null; + object.parent = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.trigger != null && message.hasOwnProperty("trigger")) object.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.toObject(message.trigger, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; @@ -10849,6 +11526,7 @@ * Properties of a GetBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IGetBuildTriggerRequest + * @property {string|null} [name] GetBuildTriggerRequest name * @property {string|null} [projectId] GetBuildTriggerRequest projectId * @property {string|null} [triggerId] GetBuildTriggerRequest triggerId */ @@ -10868,6 +11546,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * GetBuildTriggerRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @instance + */ + GetBuildTriggerRequest.prototype.name = ""; + /** * GetBuildTriggerRequest projectId. * @member {string} projectId @@ -10912,6 +11598,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -10946,6 +11634,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -10987,6 +11678,9 @@ GetBuildTriggerRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -11008,6 +11702,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.GetBuildTriggerRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.triggerId != null) @@ -11031,11 +11727,14 @@ if (options.defaults) { object.projectId = ""; object.triggerId = ""; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.triggerId != null && message.hasOwnProperty("triggerId")) object.triggerId = message.triggerId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -11059,6 +11758,7 @@ * Properties of a ListBuildTriggersRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IListBuildTriggersRequest + * @property {string|null} [parent] ListBuildTriggersRequest parent * @property {string|null} [projectId] ListBuildTriggersRequest projectId * @property {number|null} [pageSize] ListBuildTriggersRequest pageSize * @property {string|null} [pageToken] ListBuildTriggersRequest pageToken @@ -11079,6 +11779,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ListBuildTriggersRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @instance + */ + ListBuildTriggersRequest.prototype.parent = ""; + /** * ListBuildTriggersRequest projectId. * @member {string} projectId @@ -11133,6 +11841,8 @@ 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.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); return writer; }; @@ -11167,6 +11877,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 4: + message.parent = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -11211,6 +11924,9 @@ ListBuildTriggersRequest.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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -11235,6 +11951,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.ListBuildTriggersRequest(); + if (object.parent != null) + message.parent = String(object.parent); if (object.projectId != null) message.projectId = String(object.projectId); if (object.pageSize != null) @@ -11261,6 +11979,7 @@ object.projectId = ""; object.pageSize = 0; object.pageToken = ""; + object.parent = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; @@ -11268,6 +11987,8 @@ object.pageSize = message.pageSize; if (message.pageToken != null && message.hasOwnProperty("pageToken")) object.pageToken = message.pageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; return object; }; @@ -11522,6 +12243,7 @@ * Properties of a DeleteBuildTriggerRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IDeleteBuildTriggerRequest + * @property {string|null} [name] DeleteBuildTriggerRequest name * @property {string|null} [projectId] DeleteBuildTriggerRequest projectId * @property {string|null} [triggerId] DeleteBuildTriggerRequest triggerId */ @@ -11541,6 +12263,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * DeleteBuildTriggerRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @instance + */ + DeleteBuildTriggerRequest.prototype.name = ""; + /** * DeleteBuildTriggerRequest projectId. * @member {string} projectId @@ -11585,6 +12315,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.triggerId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); return writer; }; @@ -11619,6 +12351,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: + message.name = reader.string(); + break; case 1: message.projectId = reader.string(); break; @@ -11660,6 +12395,9 @@ DeleteBuildTriggerRequest.verify = function verify(message) { if (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.projectId != null && message.hasOwnProperty("projectId")) if (!$util.isString(message.projectId)) return "projectId: string expected"; @@ -11681,6 +12419,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest(); + if (object.name != null) + message.name = String(object.name); if (object.projectId != null) message.projectId = String(object.projectId); if (object.triggerId != null) @@ -11704,11 +12444,14 @@ if (options.defaults) { object.projectId = ""; object.triggerId = ""; + object.name = ""; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; if (message.triggerId != null && message.hasOwnProperty("triggerId")) object.triggerId = message.triggerId; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; @@ -12703,6 +13446,7 @@ * Properties of a ReceiveTriggerWebhookRequest. * @memberof google.devtools.cloudbuild.v1 * @interface IReceiveTriggerWebhookRequest + * @property {string|null} [name] ReceiveTriggerWebhookRequest name * @property {google.api.IHttpBody|null} [body] ReceiveTriggerWebhookRequest body * @property {string|null} [projectId] ReceiveTriggerWebhookRequest projectId * @property {string|null} [trigger] ReceiveTriggerWebhookRequest trigger @@ -12724,6 +13468,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * ReceiveTriggerWebhookRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @instance + */ + ReceiveTriggerWebhookRequest.prototype.name = ""; + /** * ReceiveTriggerWebhookRequest body. * @member {google.api.IHttpBody|null|undefined} body @@ -12788,6 +13540,8 @@ writer.uint32(/* id 3, wireType 2 =*/26).string(message.trigger); if (message.secret != null && Object.hasOwnProperty.call(message, "secret")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.secret); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); return writer; }; @@ -12822,6 +13576,9 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 5: + message.name = reader.string(); + break; case 1: message.body = $root.google.api.HttpBody.decode(reader, reader.uint32()); break; @@ -12869,6 +13626,9 @@ ReceiveTriggerWebhookRequest.verify = function verify(message) { if (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.body != null && message.hasOwnProperty("body")) { var error = $root.google.api.HttpBody.verify(message.body); if (error) @@ -12898,6 +13658,8 @@ if (object instanceof $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest) return object; var message = new $root.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest(); + if (object.name != null) + message.name = String(object.name); if (object.body != null) { if (typeof object.body !== "object") throw TypeError(".google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest.body: object expected"); @@ -12930,6 +13692,7 @@ object.projectId = ""; object.trigger = ""; object.secret = ""; + object.name = ""; } if (message.body != null && message.hasOwnProperty("body")) object.body = $root.google.api.HttpBody.toObject(message.body, options); @@ -12939,6 +13702,8 @@ object.trigger = message.trigger; if (message.secret != null && message.hasOwnProperty("secret")) object.secret = message.secret; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index e75c61de2df3..b5e6908170bd 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -168,13 +168,19 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/triggers", "(google.api.http).body": "trigger", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/triggers", + "(google.api.http).additional_bindings.body": "trigger", "(google.api.method_signature)": "project_id,trigger" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/projects/{project_id}/triggers", - "body": "trigger" + "body": "trigger", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*}/triggers", + "body": "trigger" + } } }, { @@ -187,12 +193,16 @@ "responseType": "BuildTrigger", "options": { "(google.api.http).get": "/v1/projects/{project_id}/triggers/{trigger_id}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/triggers/*}", "(google.api.method_signature)": "project_id,trigger_id" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/projects/{project_id}/triggers/{trigger_id}" + "get": "/v1/projects/{project_id}/triggers/{trigger_id}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/triggers/*}" + } } }, { @@ -205,12 +215,16 @@ "responseType": "ListBuildTriggersResponse", "options": { "(google.api.http).get": "/v1/projects/{project_id}/triggers", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*}/triggers", "(google.api.method_signature)": "project_id" }, "parsedOptions": [ { "(google.api.http)": { - "get": "/v1/projects/{project_id}/triggers" + "get": "/v1/projects/{project_id}/triggers", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*}/triggers" + } } }, { @@ -223,12 +237,16 @@ "responseType": "google.protobuf.Empty", "options": { "(google.api.http).delete": "/v1/projects/{project_id}/triggers/{trigger_id}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/triggers/*}", "(google.api.method_signature)": "project_id,trigger_id" }, "parsedOptions": [ { "(google.api.http)": { - "delete": "/v1/projects/{project_id}/triggers/{trigger_id}" + "delete": "/v1/projects/{project_id}/triggers/{trigger_id}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/triggers/*}" + } } }, { @@ -242,13 +260,19 @@ "options": { "(google.api.http).patch": "/v1/projects/{project_id}/triggers/{trigger_id}", "(google.api.http).body": "trigger", + "(google.api.http).additional_bindings.patch": "/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}", + "(google.api.http).additional_bindings.body": "trigger", "(google.api.method_signature)": "project_id,trigger_id,trigger" }, "parsedOptions": [ { "(google.api.http)": { "patch": "/v1/projects/{project_id}/triggers/{trigger_id}", - "body": "trigger" + "body": "trigger", + "additional_bindings": { + "patch": "/v1/{trigger.resource_name=projects/*/locations/*/triggers/*}", + "body": "trigger" + } } }, { @@ -262,6 +286,8 @@ "options": { "(google.api.http).post": "/v1/projects/{project_id}/triggers/{trigger_id}:run", "(google.api.http).body": "source", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/triggers/*}:run", + "(google.api.http).additional_bindings.body": "*", "(google.api.method_signature)": "project_id,trigger_id,source", "(google.longrunning.operation_info).response_type": "Build", "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" @@ -270,7 +296,11 @@ { "(google.api.http)": { "post": "/v1/projects/{project_id}/triggers/{trigger_id}:run", - "body": "source" + "body": "source", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/triggers/*}:run", + "body": "*" + } } }, { @@ -289,13 +319,19 @@ "responseType": "ReceiveTriggerWebhookResponse", "options": { "(google.api.http).post": "/v1/projects/{project_id}/triggers/{trigger}:webhook", - "(google.api.http).body": "body" + "(google.api.http).body": "body", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/triggers/*}:webhook", + "(google.api.http).additional_bindings.body": "body" }, "parsedOptions": [ { "(google.api.http)": { "post": "/v1/projects/{project_id}/triggers/{trigger}:webhook", - "body": "body" + "body": "body", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/triggers/*}:webhook", + "body": "body" + } } } ] @@ -349,6 +385,13 @@ }, "RunBuildTriggerRequest": { "fields": { + "name": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/BuildTrigger" + } + }, "projectId": { "type": "string", "id": 1, @@ -774,9 +817,39 @@ "availableSecrets": { "type": "Secrets", "id": 47 + }, + "warnings": { + "rule": "repeated", + "type": "Warning", + "id": 49, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { + "Warning": { + "fields": { + "text": { + "type": "string", + "id": 1 + }, + "priority": { + "type": "Priority", + "id": 2 + } + }, + "nested": { + "Priority": { + "values": { + "PRIORITY_UNSPECIFIED": 0, + "INFO": 1, + "WARNING": 2, + "ALERT": 3 + } + } + } + }, "Status": { "values": { "STATUS_UNKNOWN": 0, @@ -1080,17 +1153,24 @@ "BuildTrigger": { "options": { "(google.api.resource).type": "cloudbuild.googleapis.com/BuildTrigger", - "(google.api.resource).pattern": "projects/{project}/triggers/{trigger}" + "(google.api.resource).plural": "triggers", + "(google.api.resource).singular": "trigger", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/triggers/{trigger}" }, "oneofs": { "buildTemplate": { "oneof": [ + "autodetect", "build", "filename" ] } }, "fields": { + "resourceName": { + "type": "string", + "id": 34 + }, "id": { "type": "string", "id": 1, @@ -1121,10 +1201,15 @@ }, "pubsubConfig": { "type": "PubsubConfig", - "id": 29, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 29 + }, + "webhookConfig": { + "type": "WebhookConfig", + "id": 31 + }, + "autodetect": { + "type": "bool", + "id": 18 }, "build": { "type": "Build", @@ -1245,6 +1330,38 @@ } } }, + "WebhookConfig": { + "oneofs": { + "authMethod": { + "oneof": [ + "secret" + ] + } + }, + "fields": { + "secret": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "secretmanager.googleapis.com/SecretVersion" + } + }, + "state": { + "type": "State", + "id": 4 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "OK": 1, + "SECRET_DELETED": 2 + } + } + } + }, "PullRequestFilter": { "oneofs": { "gitRef": { @@ -1303,6 +1420,13 @@ }, "CreateBuildTriggerRequest": { "fields": { + "parent": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/BuildTrigger" + } + }, "projectId": { "type": "string", "id": 1, @@ -1321,6 +1445,13 @@ }, "GetBuildTriggerRequest": { "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/BuildTrigger" + } + }, "projectId": { "type": "string", "id": 1, @@ -1339,6 +1470,13 @@ }, "ListBuildTriggersRequest": { "fields": { + "parent": { + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).child_type": "cloudbuild.googleapis.com/BuildTrigger" + } + }, "projectId": { "type": "string", "id": 1, @@ -1371,6 +1509,13 @@ }, "DeleteBuildTriggerRequest": { "fields": { + "name": { + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/BuildTrigger" + } + }, "projectId": { "type": "string", "id": 1, @@ -1510,6 +1655,10 @@ }, "ReceiveTriggerWebhookRequest": { "fields": { + "name": { + "type": "string", + "id": 5 + }, "body": { "type": "google.api.HttpBody", "id": 1 diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 7df78e74cbdc..caa3c835e7b4 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -162,9 +162,6 @@ export class CloudBuildClient { // identifiers to uniquely identify resources within the API. // Create useful helper objects for these. this.pathTemplates = { - buildTriggerPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/triggers/{trigger}' - ), cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}' ), @@ -177,6 +174,12 @@ export class CloudBuildClient { projectLocationBuildPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/builds/{build}' ), + projectLocationTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/triggers/{trigger}' + ), + projectTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/triggers/{trigger}' + ), secretVersionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/secrets/{secret}/versions/{version}' ), @@ -636,6 +639,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent resource where this trigger will be created. + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project for which to configure automatic builds. * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger @@ -692,6 +698,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.createBuildTrigger(request, options, callback); @@ -734,6 +741,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` * @param {string} request.projectId * Required. ID of the project that owns the trigger. * @param {string} request.triggerId @@ -787,6 +797,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.getBuildTrigger(request, options, callback); @@ -832,6 +843,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to delete. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` * @param {string} request.projectId * Required. ID of the project that owns the trigger. * @param {string} request.triggerId @@ -888,6 +902,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.deleteBuildTrigger(request, options, callback); @@ -991,6 +1006,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + 'trigger.resource_name': request.trigger!.resourceName || '', }); this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); @@ -1035,6 +1051,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `ReceiveTriggerWebhook` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` * @param {google.api.HttpBody} request.body * HTTP request body. * @param {string} request.projectId @@ -1095,6 +1114,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); @@ -1907,6 +1927,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to run. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` * @param {string} request.projectId * Required. ID of the project. * @param {string} request.triggerId @@ -1970,6 +1993,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + name: request.name || '', }); this.initialize(); return this.innerApiCalls.runBuildTrigger(request, options, callback); @@ -2285,6 +2309,9 @@ export class CloudBuildClient { * * @param {Object} request * The request object that will be sent. + * @param {string} request.parent + * The parent of the collection of `Triggers`. + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project for which to list BuildTriggers. * @param {number} request.pageSize @@ -2343,6 +2370,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); this.initialize(); return this.innerApiCalls.listBuildTriggers(request, options, callback); @@ -2352,6 +2380,9 @@ export class CloudBuildClient { * 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 + * The parent of the collection of `Triggers`. + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project for which to list BuildTriggers. * @param {number} request.pageSize @@ -2381,6 +2412,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); const callSettings = new gax.CallSettings(options); this.initialize(); @@ -2397,6 +2429,9 @@ export class CloudBuildClient { * `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 + * The parent of the collection of `Triggers`. + * Format: `projects/{project}/locations/{location}` * @param {string} request.projectId * Required. ID of the project for which to list BuildTriggers. * @param {number} request.pageSize @@ -2430,6 +2465,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + parent: request.parent || '', }); options = options || {}; const callSettings = new gax.CallSettings(options); @@ -2444,44 +2480,6 @@ export class CloudBuildClient { // -- Path templates -- // -------------------- - /** - * Return a fully-qualified buildTrigger resource name string. - * - * @param {string} project - * @param {string} trigger - * @returns {string} Resource name string. - */ - buildTriggerPath(project: string, trigger: string) { - return this.pathTemplates.buildTriggerPathTemplate.render({ - project: project, - trigger: trigger, - }); - } - - /** - * Parse the project from BuildTrigger resource. - * - * @param {string} buildTriggerName - * A fully-qualified path representing BuildTrigger resource. - * @returns {string} A string representing the project. - */ - matchProjectFromBuildTriggerName(buildTriggerName: string) { - return this.pathTemplates.buildTriggerPathTemplate.match(buildTriggerName) - .project; - } - - /** - * Parse the trigger from BuildTrigger resource. - * - * @param {string} buildTriggerName - * A fully-qualified path representing BuildTrigger resource. - * @returns {string} A string representing the trigger. - */ - matchTriggerFromBuildTriggerName(buildTriggerName: string) { - return this.pathTemplates.buildTriggerPathTemplate.match(buildTriggerName) - .trigger; - } - /** * Return a fully-qualified cryptoKey resource name string. * @@ -2668,6 +2666,111 @@ export class CloudBuildClient { ).build; } + /** + * Return a fully-qualified projectLocationTrigger resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} trigger + * @returns {string} Resource name string. + */ + projectLocationTriggerPath( + project: string, + location: string, + trigger: string + ) { + return this.pathTemplates.projectLocationTriggerPathTemplate.render({ + project: project, + location: location, + trigger: trigger, + }); + } + + /** + * Parse the project from ProjectLocationTrigger resource. + * + * @param {string} projectLocationTriggerName + * A fully-qualified path representing project_location_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationTriggerName( + projectLocationTriggerName: string + ) { + return this.pathTemplates.projectLocationTriggerPathTemplate.match( + projectLocationTriggerName + ).project; + } + + /** + * Parse the location from ProjectLocationTrigger resource. + * + * @param {string} projectLocationTriggerName + * A fully-qualified path representing project_location_trigger resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationTriggerName( + projectLocationTriggerName: string + ) { + return this.pathTemplates.projectLocationTriggerPathTemplate.match( + projectLocationTriggerName + ).location; + } + + /** + * Parse the trigger from ProjectLocationTrigger resource. + * + * @param {string} projectLocationTriggerName + * A fully-qualified path representing project_location_trigger resource. + * @returns {string} A string representing the trigger. + */ + matchTriggerFromProjectLocationTriggerName( + projectLocationTriggerName: string + ) { + return this.pathTemplates.projectLocationTriggerPathTemplate.match( + projectLocationTriggerName + ).trigger; + } + + /** + * Return a fully-qualified projectTrigger resource name string. + * + * @param {string} project + * @param {string} trigger + * @returns {string} Resource name string. + */ + projectTriggerPath(project: string, trigger: string) { + return this.pathTemplates.projectTriggerPathTemplate.render({ + project: project, + trigger: trigger, + }); + } + + /** + * Parse the project from ProjectTrigger resource. + * + * @param {string} projectTriggerName + * A fully-qualified path representing project_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectTriggerName(projectTriggerName: string) { + return this.pathTemplates.projectTriggerPathTemplate.match( + projectTriggerName + ).project; + } + + /** + * Parse the trigger from ProjectTrigger resource. + * + * @param {string} projectTriggerName + * A fully-qualified path representing project_trigger resource. + * @returns {string} A string representing the trigger. + */ + matchTriggerFromProjectTriggerName(projectTriggerName: string) { + return this.pathTemplates.projectTriggerPathTemplate.match( + projectTriggerName + ).trigger; + } + /** * Return a fully-qualified secretVersion resource name string. * diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 5c528b0a0d37..34f27006c0dd 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -461,7 +461,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -493,7 +494,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -540,7 +542,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -573,7 +576,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -604,7 +608,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -651,7 +656,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -684,7 +690,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -716,7 +723,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -763,7 +771,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -796,7 +805,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.trigger = {}; + request.trigger.resourceName = ''; + const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -828,7 +839,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.trigger = {}; + request.trigger.resourceName = ''; + const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -875,7 +888,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.trigger = {}; + request.trigger.resourceName = ''; + const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -908,7 +923,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -940,7 +956,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -987,7 +1004,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1846,7 +1864,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1879,7 +1898,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1933,7 +1953,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1964,7 +1985,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -2332,7 +2354,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -2371,7 +2394,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -2426,7 +2450,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedOptions = { otherArgs: { headers: { @@ -2457,7 +2482,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -2513,7 +2539,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall(undefined, expectedError); @@ -2558,7 +2585,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -2603,7 +2631,8 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; - const expectedHeaderRequestParams = 'project_id='; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -2631,55 +2660,6 @@ describe('v1.CloudBuildClient', () => { }); describe('Path templates', () => { - describe('buildTrigger', () => { - const fakePath = '/rendered/path/buildTrigger'; - const expectedParameters = { - project: 'projectValue', - trigger: 'triggerValue', - }; - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.buildTriggerPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.buildTriggerPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('buildTriggerPath', () => { - const result = client.buildTriggerPath('projectValue', 'triggerValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.buildTriggerPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromBuildTriggerName', () => { - const result = client.matchProjectFromBuildTriggerName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.buildTriggerPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchTriggerFromBuildTriggerName', () => { - const result = client.matchTriggerFromBuildTriggerName(fakePath); - assert.strictEqual(result, 'triggerValue'); - assert( - (client.pathTemplates.buildTriggerPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - }); - describe('cryptoKey', () => { const fakePath = '/rendered/path/cryptoKey'; const expectedParameters = { @@ -2921,6 +2901,137 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('projectLocationTrigger', () => { + const fakePath = '/rendered/path/projectLocationTrigger'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + trigger: 'triggerValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectLocationTriggerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationTriggerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationTriggerPath', () => { + const result = client.projectLocationTriggerPath( + 'projectValue', + 'locationValue', + 'triggerValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationTriggerPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectLocationTriggerName', () => { + const result = + client.matchProjectFromProjectLocationTriggerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromProjectLocationTriggerName', () => { + const result = + client.matchLocationFromProjectLocationTriggerName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTriggerFromProjectLocationTriggerName', () => { + const result = + client.matchTriggerFromProjectLocationTriggerName(fakePath); + assert.strictEqual(result, 'triggerValue'); + assert( + ( + client.pathTemplates.projectLocationTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('projectTrigger', () => { + const fakePath = '/rendered/path/projectTrigger'; + const expectedParameters = { + project: 'projectValue', + trigger: 'triggerValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.projectTriggerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectTriggerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectTriggerPath', () => { + const result = client.projectTriggerPath( + 'projectValue', + 'triggerValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectTriggerPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromProjectTriggerName', () => { + const result = client.matchProjectFromProjectTriggerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectTriggerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchTriggerFromProjectTriggerName', () => { + const result = client.matchTriggerFromProjectTriggerName(fakePath); + assert.strictEqual(result, 'triggerValue'); + assert( + (client.pathTemplates.projectTriggerPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('secretVersion', () => { const fakePath = '/rendered/path/secretVersion'; const expectedParameters = { From a1b0886cb7fb49fe06678ccdd11b6204efd0cbfd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 1 Jul 2021 02:00:58 +0200 Subject: [PATCH 157/223] chore(deps): update node.js to v16 (#240) --- packages/google-devtools-cloudbuild/cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml index dcacf321fbc1..9eafcc216994 100644 --- a/packages/google-devtools-cloudbuild/cloudbuild.yaml +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -1,7 +1,7 @@ steps: -- name: node:13 +- name: node:16 entrypoint: npm args: ['install'] -- name: node:13 +- name: node:16 entrypoint: npm args: ['test'] From 00a882835bd707fab6d01087449acab098965a04 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 17:07:50 -0700 Subject: [PATCH 158/223] chore: release 2.2.5 (#247) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 0181ee78866a..1ba484270a11 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.5](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.4...v2.2.5) (2021-07-01) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#245](https://www.github.com/googleapis/nodejs-cloudbuild/issues/245)) ([2fbba81](https://www.github.com/googleapis/nodejs-cloudbuild/commit/2fbba81b99e000ff104b76e20f0c37f3f9ea585d)) + ### [2.2.4](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.3...v2.2.4) (2021-06-24) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 585cda3d446a..9c245aeb0c36 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.4", + "version": "2.2.5", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index fd294567e324..0c7f4db1df5c 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.4" + "@google-cloud/cloudbuild": "^2.2.5" }, "devDependencies": { "c8": "^7.0.0", From 019443ebf2f7e34140e1ba607250c9885cd9a056 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:44:29 -0400 Subject: [PATCH 159/223] fix(deps): google-gax v2.17.1 (#249) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 9c245aeb0c36..8d9ba010916c 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -61,6 +61,6 @@ "node": ">=10" }, "dependencies": { - "google-gax": "^2.17.0" + "google-gax": "^2.17.1" } } From ea24b6e26714a2bdeba8d6674d2fea3075f68988 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 15 Jul 2021 16:47:01 -0700 Subject: [PATCH 160/223] chore: release 2.2.6 (#250) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 1ba484270a11..363c8aee3fc2 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.6](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.5...v2.2.6) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#249](https://www.github.com/googleapis/nodejs-cloudbuild/issues/249)) ([e53360f](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e53360f645d0b9e584261acffbd001efd2d2081a)) + ### [2.2.5](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.4...v2.2.5) (2021-07-01) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 8d9ba010916c..9546f285a6d5 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.5", + "version": "2.2.6", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 0c7f4db1df5c..13f3981042b1 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.5" + "@google-cloud/cloudbuild": "^2.2.6" }, "devDependencies": { "c8": "^7.0.0", From b039d4140518a718032d21b18b2c209c41553f0e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 19:08:27 +0000 Subject: [PATCH 161/223] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#251) Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 --- .../src/v1/cloud_build_client.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index caa3c835e7b4..dd42cffd5bc7 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -56,6 +56,7 @@ const version = require('../../../package.json').version; export class CloudBuildClient { 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: {}; @@ -67,6 +68,7 @@ export class CloudBuildClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -111,6 +113,9 @@ export class CloudBuildClient { const staticMembers = this.constructor as typeof CloudBuildClient; 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 = @@ -271,6 +276,9 @@ export class CloudBuildClient { // of calling the API is handled in `google-gax`, with this code // merely providing the destination and request information. this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = gax.warn; } /** @@ -299,7 +307,8 @@ export class CloudBuildClient { ) : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.devtools.cloudbuild.v1.CloudBuild, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides From b2797620fdd620186eb2f2f9dbaed480632ddb4d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:18:12 +0000 Subject: [PATCH 162/223] chore: release 2.2.7 (#252) :robot: I have created a release \*beep\* \*boop\* --- ### [2.2.7](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.6...v2.2.7) (2021-07-21) ### Bug Fixes * Updating WORKSPACE files to use the newest version of the Typescript generator. ([#251](https://www.github.com/googleapis/nodejs-cloudbuild/issues/251)) ([7bc5f7f](https://www.github.com/googleapis/nodejs-cloudbuild/commit/7bc5f7ff6c1485baaf1444a608d8ebb88ad20cfe)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 363c8aee3fc2..e826dbcc2a9f 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.2.7](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.6...v2.2.7) (2021-07-21) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#251](https://www.github.com/googleapis/nodejs-cloudbuild/issues/251)) ([7bc5f7f](https://www.github.com/googleapis/nodejs-cloudbuild/commit/7bc5f7ff6c1485baaf1444a608d8ebb88ad20cfe)) + ### [2.2.6](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.5...v2.2.6) (2021-07-12) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 9546f285a6d5..9055a33d23ee 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.6", + "version": "2.2.7", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 13f3981042b1..34915806e838 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.6" + "@google-cloud/cloudbuild": "^2.2.7" }, "devDependencies": { "c8": "^7.0.0", From 2b6992300a4096db83437e491df6a30f477cdfa4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Jul 2021 09:18:14 -0700 Subject: [PATCH 163/223] feat: add a WorkerPools API (#254) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add a WorkerPools API BREAKING CHANGE: Proto had a prior definitions of WorkerPool resources which were never supported. This change replaces those resources with definitions that are currently supported. Committer: @mwiczer PiperOrigin-RevId: 385610622 Source-Link: https://github.com/googleapis/googleapis/commit/7a1fb837d3aab1e66562e177b1731280f641dd2a Source-Link: https://github.com/googleapis/googleapis-gen/commit/07289aaf2241f2a254f0a8d95885267e2649c220 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: kelsk <38271546+kelsk@users.noreply.github.com> --- .../devtools/cloudbuild/v1/cloudbuild.proto | 465 ++- .../protos/protos.d.ts | 921 ++++- .../protos/protos.js | 3204 ++++++++++++----- .../protos/protos.json | 426 ++- .../src/v1/cloud_build_client.ts | 1146 ++++-- .../src/v1/gapic_metadata.json | 72 +- .../test/gapic_cloud_build_v1.ts | 1475 ++++++-- 7 files changed, 5563 insertions(+), 2146 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 5262e24823e9..3b51e3f98e24 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -279,32 +279,63 @@ service CloudBuild { }; } - // Creates a `WorkerPool` to run the builds, and returns the new worker pool. - // - // This API is experimental. - rpc CreateWorkerPool(CreateWorkerPoolRequest) returns (WorkerPool) {} + // Creates a `WorkerPool`. + rpc CreateWorkerPool(CreateWorkerPoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/workerPools" + body: "worker_pool" + }; + option (google.api.method_signature) = "parent,worker_pool,worker_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "WorkerPool" + metadata_type: "CreateWorkerPoolOperationMetadata" + }; + } - // Returns information about a `WorkerPool`. - // - // This API is experimental. - rpc GetWorkerPool(GetWorkerPoolRequest) returns (WorkerPool) {} + // Returns details of a `WorkerPool`. + rpc GetWorkerPool(GetWorkerPoolRequest) returns (WorkerPool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/workerPools/*}" + }; + option (google.api.method_signature) = "name"; + } - // Deletes a `WorkerPool` by its project ID and WorkerPool name. - // - // This API is experimental. + // Deletes a `WorkerPool`. rpc DeleteWorkerPool(DeleteWorkerPoolRequest) - returns (google.protobuf.Empty) {} + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/workerPools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "DeleteWorkerPoolOperationMetadata" + }; + } - // Update a `WorkerPool`. - // - // This API is experimental. - rpc UpdateWorkerPool(UpdateWorkerPoolRequest) returns (WorkerPool) {} + // Updates a `WorkerPool`. + rpc UpdateWorkerPool(UpdateWorkerPoolRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}" + body: "worker_pool" + }; + option (google.api.method_signature) = "worker_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "WorkerPool" + metadata_type: "UpdateWorkerPoolOperationMetadata" + }; + } - // List project's `WorkerPools`. - // - // This API is experimental. + // Lists `WorkerPool`s. rpc ListWorkerPools(ListWorkerPoolsRequest) - returns (ListWorkerPoolsResponse) {} + returns (ListWorkerPoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/workerPools" + }; + option (google.api.method_signature) = "parent"; + } } // Specifies a build to retry. @@ -1440,6 +1471,22 @@ message UpdateBuildTriggerRequest { // Optional arguments to enable specific features of builds. message BuildOptions { + // Details about how a build should be executed on a `WorkerPool`. + // + // See [running builds in a private + // pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) + // for more information. + message PoolOption { + // The `WorkerPool` resource to execute the build on. + // You must have `cloudbuild.workerpools.use` on the project hosting the + // WorkerPool. + // + // Format projects/{project}/locations/{location}/workerPools/{workerPoolId} + string name = 1 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + }]; + } + // Specifies the manner in which the build should be verified, if at all. enum VerifyOption { // Not a verifiable build. (default) @@ -1551,11 +1598,15 @@ message BuildOptions { // Storage. LogStreamingOption log_streaming_option = 5; - // Option to specify a `WorkerPool` for the build. - // Format: projects/{project}/locations/{location}/workerPools/{workerPool} + // This field deprecated; please use `pool.name` instead. + string worker_pool = 7 [deprecated = true]; + + // Optional. Specification for execution on a `WorkerPool`. // - // This field is in beta and is available only to restricted users. - string worker_pool = 7; + // See [running builds in a private + // pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) + // for more information. + PoolOption pool = 19 [(google.api.field_behavior) = OPTIONAL]; // Option to specify the logging mode, which determines if and where build // logs are stored. @@ -1611,36 +1662,32 @@ message ReceiveTriggerWebhookRequest { // ReceiveTriggerWebhook method. message ReceiveTriggerWebhookResponse {} -// Configuration for a WorkerPool to run the builds. +// Configuration for a `WorkerPool`. +// +// Cloud Build owns and maintains a pool of workers for general use and have no +// access to a project's private network. By default, builds submitted to +// Cloud Build will use a worker from this pool. // -// Workers are machines that Cloud Build uses to run your builds. By default, -// all workers run in a project owned by Cloud Build. To have full control over -// the workers that execute your builds -- such as enabling them to access -// private resources on your private network -- you can request Cloud Build to -// run the workers in your own project by creating a custom workers pool. +// If your build needs access to resources on a private network, +// create and use a `WorkerPool` to run your builds. Private `WorkerPool`s give +// your builds access to any single VPC network that you +// administer, including any on-prem resources connected to that VPC +// network. For an overview of private pools, see +// [Private pools +// overview](https://cloud.google.com/build/docs/private-pools/private-pools-overview). message WorkerPool { - // Supported GCP regions to create the `WorkerPool`. - enum Region { - // no region - REGION_UNSPECIFIED = 0; - - // us-central1 region - US_CENTRAL1 = 1; - - // us-west1 region - US_WEST1 = 2; - - // us-east1 region - US_EAST1 = 3; - - // us-east4 region - US_EAST4 = 4; - } + option (google.api.resource) = { + type: "cloudbuild.googleapis.com/WorkerPool" + pattern: "projects/{project}/locations/{location}/workerPools/{worker_pool}" + plural: "workerPools" + singular: "workerPool" + style: DECLARATIVE_FRIENDLY + }; - // `WorkerPool` status - enum Status { - // Status of the `WorkerPool` is unknown. - STATUS_UNSPECIFIED = 0; + // State of the `WorkerPool`. + enum State { + // State of the `WorkerPool` is unknown. + STATE_UNSPECIFIED = 0; // `WorkerPool` is being created. CREATING = 1; @@ -1655,139 +1702,273 @@ message WorkerPool { DELETED = 4; } - // User-defined name of the `WorkerPool`. - string name = 14; - - // The project ID of the GCP project for which the `WorkerPool` is created. - string project_id = 2; - - // Output only. The service account used to manage the `WorkerPool`. The - // service account must have the Compute Instance Admin (Beta) permission at - // the project level. - string service_account_email = 3; + // Output only. The resource name of the `WorkerPool`, with format + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + // The value of `{worker_pool}` is provided by `worker_pool_id` in + // `CreateWorkerPool` request and the value of `{location}` is determined by + // the endpoint accessed. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Total number of workers to be created across all requested regions. - int64 worker_count = 4; + // A user-specified, human-readable name for the `WorkerPool`. If provided, + // this value must be 1-63 characters. + string display_name = 2; - // Configuration to be used for a creating workers in the `WorkerPool`. - WorkerConfig worker_config = 16; + // Output only. A unique identifier for the `WorkerPool`. + string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // List of regions to create the `WorkerPool`. Regions can't be empty. - // If Cloud Build adds a new GCP region in the future, the existing - // `WorkerPool` will not be enabled in the new region automatically; - // you must add the new region to the `regions` field to enable the - // `WorkerPool` in that region. - repeated Region regions = 9; + // User specified annotations. See https://google.aip.dev/128#annotations + // for more details such as format and size limitations. + map annotations = 4; // Output only. Time at which the request to create the `WorkerPool` was // received. - google.protobuf.Timestamp create_time = 11; + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which the request to update the `WorkerPool` was // received. - google.protobuf.Timestamp update_time = 17; + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Time at which the request to delete the `WorkerPool` was // received. - google.protobuf.Timestamp delete_time = 12; + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. WorkerPool Status. - Status status = 13; -} + // Output only. `WorkerPool` state. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Private Pool configuration for the `WorkerPool`. + oneof config { + // Private Pool using a v1 configuration. + PrivatePoolV1Config private_pool_v1_config = 12; + } -// WorkerConfig defines the configuration to be used for a creating workers in -// the pool. -message WorkerConfig { - // Machine Type of the worker, such as n1-standard-1. - // See https://cloud.google.com/compute/docs/machine-types. - // If left blank, Cloud Build will use a standard unspecified machine to - // create the worker pool. - // `machine_type` is overridden if you specify a different machine type in - // `build_options`. In this case, the VM specified in the `build_options` - // will be created on demand at build time. For more information see - // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes - string machine_type = 1; - - // Size of the disk attached to the worker, in GB. - // See https://cloud.google.com/compute/docs/disks/ - // If `0` is specified, Cloud Build will use a standard disk size. - // `disk_size` is overridden if you specify a different disk size in - // `build_options`. In this case, a VM with a disk size specified in the - // `build_options` will be created on demand at build time. For more - // information see - // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions - int64 disk_size_gb = 2; - - // The network definition used to create the worker. - // If this section is left empty, the workers will be created in - // WorkerPool.project_id on the default network. - Network network = 3; - - // The tag applied to the worker, and the same tag used by the firewall rule. - // It is used to identify the Cloud Build workers among other VMs. - // The default value for tag is `worker`. - string tag = 4; + // Output only. Checksum computed by the server. May be sent on update and + // delete requests to ensure that the client has an up-to-date value before + // proceeding. + string etag = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Network describes the GCP network used to create workers in. -message Network { - // Project id containing the defined network and subnetwork. For a peered VPC, - // this will be the same as the project_id in which the workers are created. - // For a shared VPC, this will be the project sharing the network with the - // project_id project in which workers will be created. For custom workers - // with no VPC, this will be the same as project_id. - string project_id = 1; +// Configuration for a V1 `PrivatePool`. +message PrivatePoolV1Config { + // Defines the configuration to be used for creating workers in + // the pool. + message WorkerConfig { + // Machine type of a worker, such as `e2-medium`. + // See [Worker pool config + // file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). + // If left blank, Cloud Build will use a sensible default. + string machine_type = 1; + + // Size of the disk attached to the worker, in GB. + // See [Worker pool config + // file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema). + // Specify a value of up to 1000. If `0` is specified, Cloud Build will use + // a standard disk size. + int64 disk_size_gb = 2; + } + + // Defines the network configuration for the pool. + message NetworkConfig { + // Defines the egress option for the pool. + enum EgressOption { + // If set, defaults to PUBLIC_EGRESS. + EGRESS_OPTION_UNSPECIFIED = 0; - // Network on which the workers are created. - // "default" network is used if empty. - string network = 2; + // If set, workers are created without any public address, which prevents + // network egress to public IPs unless a network proxy is configured. + NO_PUBLIC_EGRESS = 1; - // Subnetwork on which the workers are created. - // "default" subnetwork is used if empty. - string subnetwork = 3; + // If set, workers are created with a public address which allows for + // public internet egress. + PUBLIC_EGRESS = 2; + } + + // Required. Immutable. The network definition that the workers are peered + // to. If this section is left empty, the workers will be peered to + // `WorkerPool.project_id` on the service producer network. Must be in the + // format `projects/{project}/global/networks/{network}`, where `{project}` + // is a project number, such as `12345`, and `{network}` is the name of a + // VPC network in the project. See + // [Understanding network configuration + // options](https://cloud.google.com/build/docs/private-pools/set-up-private-pool-environment) + string peered_network = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/Network" + } + ]; + + // Option to configure network egress for the workers. + EgressOption egress_option = 2; + } + + // Machine configuration for the workers in the pool. + WorkerConfig worker_config = 1; + + // Network configuration for the pool. + NetworkConfig network_config = 2; } // Request to create a new `WorkerPool`. message CreateWorkerPoolRequest { - // ID of the parent project. - string parent = 1; + // Required. The parent resource where this worker pool will be created. + // Format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; - // `WorkerPool` resource to create. - WorkerPool worker_pool = 2; + // Required. `WorkerPool` resource to create. + WorkerPool worker_pool = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The ID to use for the `WorkerPool`, which will become + // the final component of the resource name. + // + // This value should be 1-63 characters, and valid characters + // are /[a-z][0-9]-/. + string worker_pool_id = 3 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // If set, validate the request and preview the response, but do not actually + // post it. + bool validate_only = 4; } // Request to get a `WorkerPool` with the specified name. message GetWorkerPoolRequest { - // The field will contain name of the resource requested, for example: - // "projects/project-1/workerPools/workerpool-name" - string name = 1; + // Required. The name of the `WorkerPool` to retrieve. + // Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; } // Request to delete a `WorkerPool`. message DeleteWorkerPoolRequest { - // The field will contain name of the resource requested, for example: - // "projects/project-1/workerPools/workerpool-name" - string name = 1; + // Required. The name of the `WorkerPool` to delete. + // Format: + // `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + } + ]; + + // Optional. If this is provided, it must match the server's etag on the + // workerpool for the request to be processed. + string etag = 2; + + // If set to true, and the `WorkerPool` is not found, the request will succeed + // but no action will be taken on the server. + bool allow_missing = 3; + + // If set, validate the request and preview the response, but do not actually + // post it. + bool validate_only = 4; } // Request to update a `WorkerPool`. message UpdateWorkerPoolRequest { - // The field will contain name of the resource requested, for example: - // "projects/project-1/workerPools/workerpool-name" - string name = 2; + // Required. The `WorkerPool` to update. + // + // The `name` field is used to identify the `WorkerPool` to update. + // Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + WorkerPool worker_pool = 1 [(google.api.field_behavior) = REQUIRED]; - // `WorkerPool` resource to update. - WorkerPool worker_pool = 3; + // A mask specifying which fields in `worker_pool` to update. + google.protobuf.FieldMask update_mask = 2; + + // If set, validate the request and preview the response, but do not actually + // post it. + bool validate_only = 4; } -// Request to list `WorkerPools`. +// Request to list `WorkerPool`s. message ListWorkerPoolsRequest { - // ID of the parent project. - string parent = 1; + // Required. The parent of the collection of `WorkerPools`. + // Format: `projects/{project}/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The maximum number of `WorkerPool`s to return. The service may return + // fewer than this value. If omitted, the server will use a sensible default. + int32 page_size = 2; + + // A page token, received from a previous `ListWorkerPools` call. Provide this + // to retrieve the subsequent page. + string page_token = 3; } // Response containing existing `WorkerPools`. message ListWorkerPoolsResponse { - // `WorkerPools` for the project. + // `WorkerPools` for the specified project. repeated WorkerPool worker_pools = 1; + + // Continuation token used to page through large result sets. Provide this + // value in a subsequent ListWorkerPoolsRequest to return the next page of + // results. + string next_page_token = 2; +} + +// Metadata for the `CreateWorkerPool` operation. +message CreateWorkerPoolOperationMetadata { + // The resource name of the `WorkerPool` to create. + // Format: + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + string worker_pool = 1 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + }]; + + // Time the operation was created. + google.protobuf.Timestamp create_time = 2; + + // Time the operation was completed. + google.protobuf.Timestamp complete_time = 3; +} + +// Metadata for the `UpdateWorkerPool` operation. +message UpdateWorkerPoolOperationMetadata { + // The resource name of the `WorkerPool` being updated. + // Format: + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + string worker_pool = 1 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + }]; + + // Time the operation was created. + google.protobuf.Timestamp create_time = 2; + + // Time the operation was completed. + google.protobuf.Timestamp complete_time = 3; +} + +// Metadata for the `DeleteWorkerPool` operation. +message DeleteWorkerPoolOperationMetadata { + // The resource name of the `WorkerPool` being deleted. + // Format: + // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. + string worker_pool = 1 [(google.api.resource_reference) = { + type: "cloudbuild.googleapis.com/WorkerPool" + }]; + + // Time the operation was created. + google.protobuf.Timestamp create_time = 2; + + // Time the operation was completed. + google.protobuf.Timestamp complete_time = 3; } diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 347b724db877..8cf39510d69a 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -217,7 +217,7 @@ export namespace google { /** * Calls CreateWorkerPool. * @param request CreateWorkerPoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WorkerPool + * @param callback Node-style callback called with the error, if any, and Operation */ public createWorkerPool(request: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPoolCallback): void; @@ -226,7 +226,7 @@ export namespace google { * @param request CreateWorkerPoolRequest message or plain object * @returns Promise */ - public createWorkerPool(request: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest): Promise; + public createWorkerPool(request: google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest): Promise; /** * Calls GetWorkerPool. @@ -245,7 +245,7 @@ export namespace google { /** * Calls DeleteWorkerPool. * @param request DeleteWorkerPoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty + * @param callback Node-style callback called with the error, if any, and Operation */ public deleteWorkerPool(request: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPoolCallback): void; @@ -254,12 +254,12 @@ export namespace google { * @param request DeleteWorkerPoolRequest message or plain object * @returns Promise */ - public deleteWorkerPool(request: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest): Promise; + public deleteWorkerPool(request: google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest): Promise; /** * Calls UpdateWorkerPool. * @param request UpdateWorkerPoolRequest message or plain object - * @param callback Node-style callback called with the error, if any, and WorkerPool + * @param callback Node-style callback called with the error, if any, and Operation */ public updateWorkerPool(request: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPoolCallback): void; @@ -268,7 +268,7 @@ export namespace google { * @param request UpdateWorkerPoolRequest message or plain object * @returns Promise */ - public updateWorkerPool(request: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest): Promise; + public updateWorkerPool(request: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest): Promise; /** * Calls ListWorkerPools. @@ -374,9 +374,9 @@ export namespace google { /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. * @param error Error, if any - * @param [response] WorkerPool + * @param [response] Operation */ - type CreateWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; + type CreateWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getWorkerPool}. @@ -388,16 +388,16 @@ export namespace google { /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteWorkerPool}. * @param error Error, if any - * @param [response] Empty + * @param [response] Operation */ - type DeleteWorkerPoolCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + type DeleteWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateWorkerPool}. * @param error Error, if any - * @param [response] WorkerPool + * @param [response] Operation */ - type UpdateWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; + type UpdateWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listWorkerPools}. @@ -4997,6 +4997,9 @@ export namespace google { /** BuildOptions workerPool */ workerPool?: (string|null); + /** BuildOptions pool */ + pool?: (google.devtools.cloudbuild.v1.BuildOptions.IPoolOption|null); + /** BuildOptions logging */ logging?: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null); @@ -5043,6 +5046,9 @@ export namespace google { /** BuildOptions workerPool. */ public workerPool: string; + /** BuildOptions pool. */ + public pool?: (google.devtools.cloudbuild.v1.BuildOptions.IPoolOption|null); + /** BuildOptions logging. */ public logging: (google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|keyof typeof google.devtools.cloudbuild.v1.BuildOptions.LoggingMode); @@ -5128,6 +5134,96 @@ export namespace google { namespace BuildOptions { + /** Properties of a PoolOption. */ + interface IPoolOption { + + /** PoolOption name */ + name?: (string|null); + } + + /** Represents a PoolOption. */ + class PoolOption implements IPoolOption { + + /** + * Constructs a new PoolOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.BuildOptions.IPoolOption); + + /** PoolOption name. */ + public name: string; + + /** + * Creates a new PoolOption instance using the specified properties. + * @param [properties] Properties to set + * @returns PoolOption instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.BuildOptions.IPoolOption): google.devtools.cloudbuild.v1.BuildOptions.PoolOption; + + /** + * Encodes the specified PoolOption message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.PoolOption.verify|verify} messages. + * @param message PoolOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.BuildOptions.IPoolOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PoolOption message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.PoolOption.verify|verify} messages. + * @param message PoolOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.BuildOptions.IPoolOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PoolOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PoolOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildOptions.PoolOption; + + /** + * Decodes a PoolOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PoolOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildOptions.PoolOption; + + /** + * Verifies a PoolOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PoolOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PoolOption + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildOptions.PoolOption; + + /** + * Creates a plain object from a PoolOption message. Also converts values to other types if specified. + * @param message PoolOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildOptions.PoolOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PoolOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** VerifyOption enum. */ enum VerifyOption { NOT_VERIFIED = 0, @@ -5371,20 +5467,14 @@ export namespace google { /** WorkerPool name */ name?: (string|null); - /** WorkerPool projectId */ - projectId?: (string|null); - - /** WorkerPool serviceAccountEmail */ - serviceAccountEmail?: (string|null); - - /** WorkerPool workerCount */ - workerCount?: (number|Long|string|null); + /** WorkerPool displayName */ + displayName?: (string|null); - /** WorkerPool workerConfig */ - workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); + /** WorkerPool uid */ + uid?: (string|null); - /** WorkerPool regions */ - regions?: (google.devtools.cloudbuild.v1.WorkerPool.Region[]|null); + /** WorkerPool annotations */ + annotations?: ({ [k: string]: string }|null); /** WorkerPool createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -5395,8 +5485,14 @@ export namespace google { /** WorkerPool deleteTime */ deleteTime?: (google.protobuf.ITimestamp|null); - /** WorkerPool status */ - status?: (google.devtools.cloudbuild.v1.WorkerPool.Status|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.Status|null); + /** WorkerPool state */ + state?: (google.devtools.cloudbuild.v1.WorkerPool.State|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.State|null); + + /** WorkerPool privatePoolV1Config */ + privatePoolV1Config?: (google.devtools.cloudbuild.v1.IPrivatePoolV1Config|null); + + /** WorkerPool etag */ + etag?: (string|null); } /** Represents a WorkerPool. */ @@ -5411,20 +5507,14 @@ export namespace google { /** WorkerPool name. */ public name: string; - /** WorkerPool projectId. */ - public projectId: string; - - /** WorkerPool serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** WorkerPool workerCount. */ - public workerCount: (number|Long|string); + /** WorkerPool displayName. */ + public displayName: string; - /** WorkerPool workerConfig. */ - public workerConfig?: (google.devtools.cloudbuild.v1.IWorkerConfig|null); + /** WorkerPool uid. */ + public uid: string; - /** WorkerPool regions. */ - public regions: google.devtools.cloudbuild.v1.WorkerPool.Region[]; + /** WorkerPool annotations. */ + public annotations: { [k: string]: string }; /** WorkerPool createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -5435,8 +5525,17 @@ export namespace google { /** WorkerPool deleteTime. */ public deleteTime?: (google.protobuf.ITimestamp|null); - /** WorkerPool status. */ - public status: (google.devtools.cloudbuild.v1.WorkerPool.Status|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.Status); + /** WorkerPool state. */ + public state: (google.devtools.cloudbuild.v1.WorkerPool.State|keyof typeof google.devtools.cloudbuild.v1.WorkerPool.State); + + /** WorkerPool privatePoolV1Config. */ + public privatePoolV1Config?: (google.devtools.cloudbuild.v1.IPrivatePoolV1Config|null); + + /** WorkerPool etag. */ + public etag: string; + + /** WorkerPool config. */ + public config?: "privatePoolV1Config"; /** * Creates a new WorkerPool instance using the specified properties. @@ -5511,18 +5610,9 @@ export namespace google { namespace WorkerPool { - /** Region enum. */ - enum Region { - REGION_UNSPECIFIED = 0, - US_CENTRAL1 = 1, - US_WEST1 = 2, - US_EAST1 = 3, - US_EAST4 = 4 - } - - /** Status enum. */ - enum Status { - STATUS_UNSPECIFIED = 0, + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, CREATING = 1, RUNNING = 2, DELETING = 3, @@ -5530,214 +5620,305 @@ export namespace google { } } - /** Properties of a WorkerConfig. */ - interface IWorkerConfig { - - /** WorkerConfig machineType */ - machineType?: (string|null); - - /** WorkerConfig diskSizeGb */ - diskSizeGb?: (number|Long|string|null); + /** Properties of a PrivatePoolV1Config. */ + interface IPrivatePoolV1Config { - /** WorkerConfig network */ - network?: (google.devtools.cloudbuild.v1.INetwork|null); + /** PrivatePoolV1Config workerConfig */ + workerConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig|null); - /** WorkerConfig tag */ - tag?: (string|null); + /** PrivatePoolV1Config networkConfig */ + networkConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null); } - /** Represents a WorkerConfig. */ - class WorkerConfig implements IWorkerConfig { + /** Represents a PrivatePoolV1Config. */ + class PrivatePoolV1Config implements IPrivatePoolV1Config { /** - * Constructs a new WorkerConfig. + * Constructs a new PrivatePoolV1Config. * @param [properties] Properties to set */ - constructor(properties?: google.devtools.cloudbuild.v1.IWorkerConfig); + constructor(properties?: google.devtools.cloudbuild.v1.IPrivatePoolV1Config); - /** WorkerConfig machineType. */ - public machineType: string; - - /** WorkerConfig diskSizeGb. */ - public diskSizeGb: (number|Long|string); + /** PrivatePoolV1Config workerConfig. */ + public workerConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig|null); - /** WorkerConfig network. */ - public network?: (google.devtools.cloudbuild.v1.INetwork|null); - - /** WorkerConfig tag. */ - public tag: string; + /** PrivatePoolV1Config networkConfig. */ + public networkConfig?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null); /** - * Creates a new WorkerConfig instance using the specified properties. + * Creates a new PrivatePoolV1Config instance using the specified properties. * @param [properties] Properties to set - * @returns WorkerConfig instance + * @returns PrivatePoolV1Config instance */ - public static create(properties?: google.devtools.cloudbuild.v1.IWorkerConfig): google.devtools.cloudbuild.v1.WorkerConfig; + public static create(properties?: google.devtools.cloudbuild.v1.IPrivatePoolV1Config): google.devtools.cloudbuild.v1.PrivatePoolV1Config; /** - * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. - * @param message WorkerConfig message or plain object to encode + * Encodes the specified PrivatePoolV1Config message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.verify|verify} messages. + * @param message PrivatePoolV1Config message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.devtools.cloudbuild.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.devtools.cloudbuild.v1.IPrivatePoolV1Config, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. - * @param message WorkerConfig message or plain object to encode + * Encodes the specified PrivatePoolV1Config message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.verify|verify} messages. + * @param message PrivatePoolV1Config message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.devtools.cloudbuild.v1.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IPrivatePoolV1Config, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a WorkerConfig message from the specified reader or buffer. + * Decodes a PrivatePoolV1Config message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns WorkerConfig + * @returns PrivatePoolV1Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.WorkerConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PrivatePoolV1Config; /** - * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * Decodes a PrivatePoolV1Config message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns WorkerConfig + * @returns PrivatePoolV1Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.WorkerConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PrivatePoolV1Config; /** - * Verifies a WorkerConfig message. + * Verifies a PrivatePoolV1Config message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PrivatePoolV1Config message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns WorkerConfig + * @returns PrivatePoolV1Config */ - public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.WorkerConfig; + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PrivatePoolV1Config; /** - * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. - * @param message WorkerConfig + * Creates a plain object from a PrivatePoolV1Config message. Also converts values to other types if specified. + * @param message PrivatePoolV1Config * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.devtools.cloudbuild.v1.WorkerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this WorkerConfig to JSON. + * Converts this PrivatePoolV1Config to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Network. */ - interface INetwork { + namespace PrivatePoolV1Config { - /** Network projectId */ - projectId?: (string|null); + /** Properties of a WorkerConfig. */ + interface IWorkerConfig { - /** Network network */ - network?: (string|null); + /** WorkerConfig machineType */ + machineType?: (string|null); - /** Network subnetwork */ - subnetwork?: (string|null); - } + /** WorkerConfig diskSizeGb */ + diskSizeGb?: (number|Long|string|null); + } - /** Represents a Network. */ - class Network implements INetwork { + /** Represents a WorkerConfig. */ + class WorkerConfig implements IWorkerConfig { - /** - * Constructs a new Network. - * @param [properties] Properties to set - */ - constructor(properties?: google.devtools.cloudbuild.v1.INetwork); + /** + * Constructs a new WorkerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig); - /** Network projectId. */ - public projectId: string; + /** WorkerConfig machineType. */ + public machineType: string; - /** Network network. */ - public network: string; + /** WorkerConfig diskSizeGb. */ + public diskSizeGb: (number|Long|string); - /** Network subnetwork. */ - public subnetwork: string; + /** + * Creates a new WorkerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig): google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig; - /** - * Creates a new Network instance using the specified properties. - * @param [properties] Properties to set - * @returns Network instance - */ - public static create(properties?: google.devtools.cloudbuild.v1.INetwork): google.devtools.cloudbuild.v1.Network; + /** + * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.verify|verify} messages. + * @param message WorkerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Network message. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. - * @param message Network message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.devtools.cloudbuild.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.verify|verify} messages. + * @param message WorkerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified Network message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. - * @param message Network message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.devtools.cloudbuild.v1.INetwork, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Decodes a WorkerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig; - /** - * Decodes a Network message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Network - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Network; + /** + * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig; - /** - * Decodes a Network message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Network - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Network; + /** + * Verifies a WorkerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Verifies a Network message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig; - /** - * Creates a Network message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Network - */ - public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Network; + /** + * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. + * @param message WorkerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a Network message. Also converts values to other types if specified. - * @param message Network - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.devtools.cloudbuild.v1.Network, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this WorkerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } - /** - * Converts this Network to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Properties of a NetworkConfig. */ + interface INetworkConfig { + + /** NetworkConfig peeredNetwork */ + peeredNetwork?: (string|null); + + /** NetworkConfig egressOption */ + egressOption?: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|keyof typeof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|null); + } + + /** Represents a NetworkConfig. */ + class NetworkConfig implements INetworkConfig { + + /** + * Constructs a new NetworkConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig); + + /** NetworkConfig peeredNetwork. */ + public peeredNetwork: string; + + /** NetworkConfig egressOption. */ + public egressOption: (google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|keyof typeof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption); + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig): google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.verify|verify} messages. + * @param message NetworkConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig; + + /** + * Verifies a NetworkConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @param message NetworkConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace NetworkConfig { + + /** EgressOption enum. */ + enum EgressOption { + EGRESS_OPTION_UNSPECIFIED = 0, + NO_PUBLIC_EGRESS = 1, + PUBLIC_EGRESS = 2 + } + } } /** Properties of a CreateWorkerPoolRequest. */ @@ -5748,6 +5929,12 @@ export namespace google { /** CreateWorkerPoolRequest workerPool */ workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + + /** CreateWorkerPoolRequest workerPoolId */ + workerPoolId?: (string|null); + + /** CreateWorkerPoolRequest validateOnly */ + validateOnly?: (boolean|null); } /** Represents a CreateWorkerPoolRequest. */ @@ -5765,6 +5952,12 @@ export namespace google { /** CreateWorkerPoolRequest workerPool. */ public workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + /** CreateWorkerPoolRequest workerPoolId. */ + public workerPoolId: string; + + /** CreateWorkerPoolRequest validateOnly. */ + public validateOnly: boolean; + /** * Creates a new CreateWorkerPoolRequest instance using the specified properties. * @param [properties] Properties to set @@ -5931,6 +6124,15 @@ export namespace google { /** DeleteWorkerPoolRequest name */ name?: (string|null); + + /** DeleteWorkerPoolRequest etag */ + etag?: (string|null); + + /** DeleteWorkerPoolRequest allowMissing */ + allowMissing?: (boolean|null); + + /** DeleteWorkerPoolRequest validateOnly */ + validateOnly?: (boolean|null); } /** Represents a DeleteWorkerPoolRequest. */ @@ -5945,6 +6147,15 @@ export namespace google { /** DeleteWorkerPoolRequest name. */ public name: string; + /** DeleteWorkerPoolRequest etag. */ + public etag: string; + + /** DeleteWorkerPoolRequest allowMissing. */ + public allowMissing: boolean; + + /** DeleteWorkerPoolRequest validateOnly. */ + public validateOnly: boolean; + /** * Creates a new DeleteWorkerPoolRequest instance using the specified properties. * @param [properties] Properties to set @@ -6019,11 +6230,14 @@ export namespace google { /** Properties of an UpdateWorkerPoolRequest. */ interface IUpdateWorkerPoolRequest { - /** UpdateWorkerPoolRequest name */ - name?: (string|null); - /** UpdateWorkerPoolRequest workerPool */ workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + + /** UpdateWorkerPoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateWorkerPoolRequest validateOnly */ + validateOnly?: (boolean|null); } /** Represents an UpdateWorkerPoolRequest. */ @@ -6035,12 +6249,15 @@ export namespace google { */ constructor(properties?: google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest); - /** UpdateWorkerPoolRequest name. */ - public name: string; - /** UpdateWorkerPoolRequest workerPool. */ public workerPool?: (google.devtools.cloudbuild.v1.IWorkerPool|null); + /** UpdateWorkerPoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateWorkerPoolRequest validateOnly. */ + public validateOnly: boolean; + /** * Creates a new UpdateWorkerPoolRequest instance using the specified properties. * @param [properties] Properties to set @@ -6117,6 +6334,12 @@ export namespace google { /** ListWorkerPoolsRequest parent */ parent?: (string|null); + + /** ListWorkerPoolsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkerPoolsRequest pageToken */ + pageToken?: (string|null); } /** Represents a ListWorkerPoolsRequest. */ @@ -6131,6 +6354,12 @@ export namespace google { /** ListWorkerPoolsRequest parent. */ public parent: string; + /** ListWorkerPoolsRequest pageSize. */ + public pageSize: number; + + /** ListWorkerPoolsRequest pageToken. */ + public pageToken: string; + /** * Creates a new ListWorkerPoolsRequest instance using the specified properties. * @param [properties] Properties to set @@ -6207,6 +6436,9 @@ export namespace google { /** ListWorkerPoolsResponse workerPools */ workerPools?: (google.devtools.cloudbuild.v1.IWorkerPool[]|null); + + /** ListWorkerPoolsResponse nextPageToken */ + nextPageToken?: (string|null); } /** Represents a ListWorkerPoolsResponse. */ @@ -6221,6 +6453,9 @@ export namespace google { /** ListWorkerPoolsResponse workerPools. */ public workerPools: google.devtools.cloudbuild.v1.IWorkerPool[]; + /** ListWorkerPoolsResponse nextPageToken. */ + public nextPageToken: string; + /** * Creates a new ListWorkerPoolsResponse instance using the specified properties. * @param [properties] Properties to set @@ -6291,6 +6526,312 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } + + /** Properties of a CreateWorkerPoolOperationMetadata. */ + interface ICreateWorkerPoolOperationMetadata { + + /** CreateWorkerPoolOperationMetadata workerPool */ + workerPool?: (string|null); + + /** CreateWorkerPoolOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CreateWorkerPoolOperationMetadata completeTime */ + completeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a CreateWorkerPoolOperationMetadata. */ + class CreateWorkerPoolOperationMetadata implements ICreateWorkerPoolOperationMetadata { + + /** + * Constructs a new CreateWorkerPoolOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata); + + /** CreateWorkerPoolOperationMetadata workerPool. */ + public workerPool: string; + + /** CreateWorkerPoolOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CreateWorkerPoolOperationMetadata completeTime. */ + public completeTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new CreateWorkerPoolOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateWorkerPoolOperationMetadata instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata): google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata; + + /** + * Encodes the specified CreateWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.verify|verify} messages. + * @param message CreateWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.verify|verify} messages. + * @param message CreateWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateWorkerPoolOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata; + + /** + * Decodes a CreateWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata; + + /** + * Verifies a CreateWorkerPoolOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateWorkerPoolOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata; + + /** + * Creates a plain object from a CreateWorkerPoolOperationMetadata message. Also converts values to other types if specified. + * @param message CreateWorkerPoolOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateWorkerPoolOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateWorkerPoolOperationMetadata. */ + interface IUpdateWorkerPoolOperationMetadata { + + /** UpdateWorkerPoolOperationMetadata workerPool */ + workerPool?: (string|null); + + /** UpdateWorkerPoolOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** UpdateWorkerPoolOperationMetadata completeTime */ + completeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an UpdateWorkerPoolOperationMetadata. */ + class UpdateWorkerPoolOperationMetadata implements IUpdateWorkerPoolOperationMetadata { + + /** + * Constructs a new UpdateWorkerPoolOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata); + + /** UpdateWorkerPoolOperationMetadata workerPool. */ + public workerPool: string; + + /** UpdateWorkerPoolOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** UpdateWorkerPoolOperationMetadata completeTime. */ + public completeTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new UpdateWorkerPoolOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateWorkerPoolOperationMetadata instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata): google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata; + + /** + * Encodes the specified UpdateWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.verify|verify} messages. + * @param message UpdateWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.verify|verify} messages. + * @param message UpdateWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateWorkerPoolOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata; + + /** + * Decodes an UpdateWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata; + + /** + * Verifies an UpdateWorkerPoolOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateWorkerPoolOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata; + + /** + * Creates a plain object from an UpdateWorkerPoolOperationMetadata message. Also converts values to other types if specified. + * @param message UpdateWorkerPoolOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateWorkerPoolOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteWorkerPoolOperationMetadata. */ + interface IDeleteWorkerPoolOperationMetadata { + + /** DeleteWorkerPoolOperationMetadata workerPool */ + workerPool?: (string|null); + + /** DeleteWorkerPoolOperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteWorkerPoolOperationMetadata completeTime */ + completeTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DeleteWorkerPoolOperationMetadata. */ + class DeleteWorkerPoolOperationMetadata implements IDeleteWorkerPoolOperationMetadata { + + /** + * Constructs a new DeleteWorkerPoolOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata); + + /** DeleteWorkerPoolOperationMetadata workerPool. */ + public workerPool: string; + + /** DeleteWorkerPoolOperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeleteWorkerPoolOperationMetadata completeTime. */ + public completeTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DeleteWorkerPoolOperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteWorkerPoolOperationMetadata instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata): google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata; + + /** + * Encodes the specified DeleteWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.verify|verify} messages. + * @param message DeleteWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.verify|verify} messages. + * @param message DeleteWorkerPoolOperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteWorkerPoolOperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata; + + /** + * Decodes a DeleteWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteWorkerPoolOperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata; + + /** + * Verifies a DeleteWorkerPoolOperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteWorkerPoolOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata; + + /** + * Creates a plain object from a DeleteWorkerPoolOperationMetadata message. Also converts values to other types if specified. + * @param message DeleteWorkerPoolOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteWorkerPoolOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } } } } diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 7ed7d925a371..c8d59321646e 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -500,7 +500,7 @@ * @typedef CreateWorkerPoolCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.devtools.cloudbuild.v1.WorkerPool} [response] WorkerPool + * @param {google.longrunning.Operation} [response] Operation */ /** @@ -509,12 +509,12 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} request CreateWorkerPoolRequest message or plain object - * @param {google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPoolCallback} callback Node-style callback called with the error, if any, and WorkerPool + * @param {google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPoolCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudBuild.prototype.createWorkerPool = function createWorkerPool(request, callback) { - return this.rpcCall(createWorkerPool, $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest, $root.google.devtools.cloudbuild.v1.WorkerPool, request, callback); + return this.rpcCall(createWorkerPool, $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "CreateWorkerPool" }); /** @@ -523,7 +523,7 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} request CreateWorkerPoolRequest message or plain object - * @returns {Promise} Promise + * @returns {Promise} Promise * @variation 2 */ @@ -566,7 +566,7 @@ * @typedef DeleteWorkerPoolCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty + * @param {google.longrunning.Operation} [response] Operation */ /** @@ -575,12 +575,12 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} request DeleteWorkerPoolRequest message or plain object - * @param {google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPoolCallback} callback Node-style callback called with the error, if any, and Empty + * @param {google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPoolCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudBuild.prototype.deleteWorkerPool = function deleteWorkerPool(request, callback) { - return this.rpcCall(deleteWorkerPool, $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest, $root.google.protobuf.Empty, request, callback); + return this.rpcCall(deleteWorkerPool, $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "DeleteWorkerPool" }); /** @@ -589,7 +589,7 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} request DeleteWorkerPoolRequest message or plain object - * @returns {Promise} Promise + * @returns {Promise} Promise * @variation 2 */ @@ -599,7 +599,7 @@ * @typedef UpdateWorkerPoolCallback * @type {function} * @param {Error|null} error Error, if any - * @param {google.devtools.cloudbuild.v1.WorkerPool} [response] WorkerPool + * @param {google.longrunning.Operation} [response] Operation */ /** @@ -608,12 +608,12 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} request UpdateWorkerPoolRequest message or plain object - * @param {google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPoolCallback} callback Node-style callback called with the error, if any, and WorkerPool + * @param {google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPoolCallback} callback Node-style callback called with the error, if any, and Operation * @returns {undefined} * @variation 1 */ Object.defineProperty(CloudBuild.prototype.updateWorkerPool = function updateWorkerPool(request, callback) { - return this.rpcCall(updateWorkerPool, $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest, $root.google.devtools.cloudbuild.v1.WorkerPool, request, callback); + return this.rpcCall(updateWorkerPool, $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest, $root.google.longrunning.Operation, request, callback); }, "name", { value: "UpdateWorkerPool" }); /** @@ -622,7 +622,7 @@ * @memberof google.devtools.cloudbuild.v1.CloudBuild * @instance * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} request UpdateWorkerPoolRequest message or plain object - * @returns {Promise} Promise + * @returns {Promise} Promise * @variation 2 */ @@ -12720,6 +12720,7 @@ * @property {boolean|null} [dynamicSubstitutions] BuildOptions dynamicSubstitutions * @property {google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption|null} [logStreamingOption] BuildOptions logStreamingOption * @property {string|null} [workerPool] BuildOptions workerPool + * @property {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption|null} [pool] BuildOptions pool * @property {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode|null} [logging] BuildOptions logging * @property {Array.|null} [env] BuildOptions env * @property {Array.|null} [secretEnv] BuildOptions secretEnv @@ -12809,6 +12810,14 @@ */ BuildOptions.prototype.workerPool = ""; + /** + * BuildOptions pool. + * @member {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption|null|undefined} pool + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @instance + */ + BuildOptions.prototype.pool = null; + /** * BuildOptions logging. * @member {google.devtools.cloudbuild.v1.BuildOptions.LoggingMode} logging @@ -12896,6 +12905,8 @@ $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.dynamicSubstitutions != null && Object.hasOwnProperty.call(message, "dynamicSubstitutions")) writer.uint32(/* id 17, wireType 0 =*/136).bool(message.dynamicSubstitutions); + if (message.pool != null && Object.hasOwnProperty.call(message, "pool")) + $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.encode(message.pool, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); return writer; }; @@ -12961,6 +12972,9 @@ case 7: message.workerPool = reader.string(); break; + case 19: + message.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.decode(reader, reader.uint32()); + break; case 11: message.logging = reader.int32(); break; @@ -13072,6 +13086,11 @@ if (message.workerPool != null && message.hasOwnProperty("workerPool")) if (!$util.isString(message.workerPool)) return "workerPool: string expected"; + if (message.pool != null && message.hasOwnProperty("pool")) { + var error = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.verify(message.pool); + if (error) + return "pool." + error; + } if (message.logging != null && message.hasOwnProperty("logging")) switch (message.logging) { default: @@ -13212,6 +13231,11 @@ } if (object.workerPool != null) message.workerPool = String(object.workerPool); + if (object.pool != null) { + if (typeof object.pool !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildOptions.pool: object expected"); + message.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.fromObject(object.pool); + } switch (object.logging) { case "LOGGING_UNSPECIFIED": case 0: @@ -13297,6 +13321,7 @@ object.workerPool = ""; object.logging = options.enums === String ? "LOGGING_UNSPECIFIED" : 0; object.dynamicSubstitutions = false; + object.pool = null; } if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { object.sourceProvenanceHash = []; @@ -13337,6 +13362,8 @@ } if (message.dynamicSubstitutions != null && message.hasOwnProperty("dynamicSubstitutions")) object.dynamicSubstitutions = message.dynamicSubstitutions; + if (message.pool != null && message.hasOwnProperty("pool")) + object.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.toObject(message.pool, options); return object; }; @@ -13351,6 +13378,193 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + BuildOptions.PoolOption = (function() { + + /** + * Properties of a PoolOption. + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @interface IPoolOption + * @property {string|null} [name] PoolOption name + */ + + /** + * Constructs a new PoolOption. + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @classdesc Represents a PoolOption. + * @implements IPoolOption + * @constructor + * @param {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption=} [properties] Properties to set + */ + function PoolOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PoolOption name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @instance + */ + PoolOption.prototype.name = ""; + + /** + * Creates a new PoolOption instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildOptions.PoolOption} PoolOption instance + */ + PoolOption.create = function create(properties) { + return new PoolOption(properties); + }; + + /** + * Encodes the specified PoolOption message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.PoolOption.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption} message PoolOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PoolOption.encode = function encode(message, writer) { + 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 PoolOption message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildOptions.PoolOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions.IPoolOption} message PoolOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PoolOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PoolOption message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildOptions.PoolOption} PoolOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PoolOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption(); + 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 PoolOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildOptions.PoolOption} PoolOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PoolOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PoolOption message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PoolOption.verify = function verify(message) { + if (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 PoolOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildOptions.PoolOption} PoolOption + */ + PoolOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PoolOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {google.devtools.cloudbuild.v1.BuildOptions.PoolOption} message PoolOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PoolOption.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 PoolOption to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @instance + * @returns {Object.} JSON object + */ + PoolOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PoolOption; + })(); + /** * VerifyOption enum. * @name google.devtools.cloudbuild.v1.BuildOptions.VerifyOption @@ -13888,15 +14102,15 @@ * @memberof google.devtools.cloudbuild.v1 * @interface IWorkerPool * @property {string|null} [name] WorkerPool name - * @property {string|null} [projectId] WorkerPool projectId - * @property {string|null} [serviceAccountEmail] WorkerPool serviceAccountEmail - * @property {number|Long|null} [workerCount] WorkerPool workerCount - * @property {google.devtools.cloudbuild.v1.IWorkerConfig|null} [workerConfig] WorkerPool workerConfig - * @property {Array.|null} [regions] WorkerPool regions + * @property {string|null} [displayName] WorkerPool displayName + * @property {string|null} [uid] WorkerPool uid + * @property {Object.|null} [annotations] WorkerPool annotations * @property {google.protobuf.ITimestamp|null} [createTime] WorkerPool createTime * @property {google.protobuf.ITimestamp|null} [updateTime] WorkerPool updateTime * @property {google.protobuf.ITimestamp|null} [deleteTime] WorkerPool deleteTime - * @property {google.devtools.cloudbuild.v1.WorkerPool.Status|null} [status] WorkerPool status + * @property {google.devtools.cloudbuild.v1.WorkerPool.State|null} [state] WorkerPool state + * @property {google.devtools.cloudbuild.v1.IPrivatePoolV1Config|null} [privatePoolV1Config] WorkerPool privatePoolV1Config + * @property {string|null} [etag] WorkerPool etag */ /** @@ -13908,7 +14122,7 @@ * @param {google.devtools.cloudbuild.v1.IWorkerPool=} [properties] Properties to set */ function WorkerPool(properties) { - this.regions = []; + this.annotations = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13924,76 +14138,90 @@ WorkerPool.prototype.name = ""; /** - * WorkerPool projectId. - * @member {string} projectId + * WorkerPool displayName. + * @member {string} displayName * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.projectId = ""; + WorkerPool.prototype.displayName = ""; /** - * WorkerPool serviceAccountEmail. - * @member {string} serviceAccountEmail + * WorkerPool uid. + * @member {string} uid * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.serviceAccountEmail = ""; + WorkerPool.prototype.uid = ""; /** - * WorkerPool workerCount. - * @member {number|Long} workerCount + * WorkerPool annotations. + * @member {Object.} annotations * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.workerCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + WorkerPool.prototype.annotations = $util.emptyObject; /** - * WorkerPool workerConfig. - * @member {google.devtools.cloudbuild.v1.IWorkerConfig|null|undefined} workerConfig + * WorkerPool createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.workerConfig = null; + WorkerPool.prototype.createTime = null; /** - * WorkerPool regions. - * @member {Array.} regions + * WorkerPool updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.regions = $util.emptyArray; + WorkerPool.prototype.updateTime = null; /** - * WorkerPool createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime + * WorkerPool deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.createTime = null; + WorkerPool.prototype.deleteTime = null; /** - * WorkerPool updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * WorkerPool state. + * @member {google.devtools.cloudbuild.v1.WorkerPool.State} state * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.updateTime = null; + WorkerPool.prototype.state = 0; /** - * WorkerPool deleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * WorkerPool privatePoolV1Config. + * @member {google.devtools.cloudbuild.v1.IPrivatePoolV1Config|null|undefined} privatePoolV1Config * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.deleteTime = null; + WorkerPool.prototype.privatePoolV1Config = null; + + /** + * WorkerPool etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @instance + */ + WorkerPool.prototype.etag = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * WorkerPool status. - * @member {google.devtools.cloudbuild.v1.WorkerPool.Status} status + * WorkerPool config. + * @member {"privatePoolV1Config"|undefined} config * @memberof google.devtools.cloudbuild.v1.WorkerPool * @instance */ - WorkerPool.prototype.status = 0; + Object.defineProperty(WorkerPool.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["privatePoolV1Config"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new WorkerPool instance using the specified properties. @@ -14019,30 +14247,27 @@ WorkerPool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); - if (message.workerCount != null && Object.hasOwnProperty.call(message, "workerCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.workerCount); - if (message.regions != null && message.regions.length) { - writer.uint32(/* id 9, wireType 2 =*/74).fork(); - for (var i = 0; i < message.regions.length; ++i) - writer.int32(message.regions[i]); - writer.ldelim(); - } - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.status); if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 14, wireType 2 =*/114).string(message.name); - if (message.workerConfig != null && Object.hasOwnProperty.call(message, "workerConfig")) - $root.google.devtools.cloudbuild.v1.WorkerConfig.encode(message.workerConfig, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uid); + if (message.annotations != null && Object.hasOwnProperty.call(message, "annotations")) + for (var keys = Object.keys(message.annotations), 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.annotations[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.privatePoolV1Config != null && Object.hasOwnProperty.call(message, "privatePoolV1Config")) + $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.encode(message.privatePoolV1Config, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); return writer; }; @@ -14073,46 +14298,58 @@ WorkerPool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WorkerPool(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WorkerPool(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 14: + case 1: message.name = reader.string(); break; case 2: - message.projectId = reader.string(); + message.displayName = reader.string(); break; case 3: - message.serviceAccountEmail = reader.string(); + message.uid = reader.string(); break; case 4: - message.workerCount = reader.int64(); - break; - case 16: - message.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.regions && message.regions.length)) - message.regions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.regions.push(reader.int32()); - } else - message.regions.push(reader.int32()); + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.annotations[key] = value; break; - case 11: + case 5: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 17: + case 6: message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 12: + case 7: message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 13: - message.status = reader.int32(); + case 8: + message.state = reader.int32(); + break; + case 12: + message.privatePoolV1Config = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.decode(reader, reader.uint32()); + break; + case 11: + message.etag = reader.string(); break; default: reader.skipType(tag & 7); @@ -14149,37 +14386,23 @@ WorkerPool.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.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - if (message.workerCount != null && message.hasOwnProperty("workerCount")) - if (!$util.isInteger(message.workerCount) && !(message.workerCount && $util.isInteger(message.workerCount.low) && $util.isInteger(message.workerCount.high))) - return "workerCount: integer|Long expected"; - if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) { - var error = $root.google.devtools.cloudbuild.v1.WorkerConfig.verify(message.workerConfig); - if (error) - return "workerConfig." + error; - } - if (message.regions != null && message.hasOwnProperty("regions")) { - if (!Array.isArray(message.regions)) - return "regions: array expected"; - for (var i = 0; i < message.regions.length; ++i) - switch (message.regions[i]) { - default: - return "regions: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.annotations != null && message.hasOwnProperty("annotations")) { + if (!$util.isObject(message.annotations)) + return "annotations: object expected"; + var key = Object.keys(message.annotations); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.annotations[key[i]])) + return "annotations: string{k:string} expected"; } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); @@ -14196,10 +14419,10 @@ if (error) return "deleteTime." + error; } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { default: - return "status: enum value expected"; + return "state: enum value expected"; case 0: case 1: case 2: @@ -14207,7 +14430,18 @@ case 4: break; } - return null; + if (message.privatePoolV1Config != null && message.hasOwnProperty("privatePoolV1Config")) { + properties.config = 1; + { + var error = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.verify(message.privatePoolV1Config); + if (error) + return "privatePoolV1Config." + error; + } + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; }; /** @@ -14224,52 +14458,16 @@ var message = new $root.google.devtools.cloudbuild.v1.WorkerPool(); if (object.name != null) message.name = String(object.name); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - if (object.workerCount != null) - if ($util.Long) - (message.workerCount = $util.Long.fromValue(object.workerCount)).unsigned = false; - else if (typeof object.workerCount === "string") - message.workerCount = parseInt(object.workerCount, 10); - else if (typeof object.workerCount === "number") - message.workerCount = object.workerCount; - else if (typeof object.workerCount === "object") - message.workerCount = new $util.LongBits(object.workerCount.low >>> 0, object.workerCount.high >>> 0).toNumber(); - if (object.workerConfig != null) { - if (typeof object.workerConfig !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.workerConfig: object expected"); - message.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.fromObject(object.workerConfig); - } - if (object.regions) { - if (!Array.isArray(object.regions)) - throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.regions: array expected"); - message.regions = []; - for (var i = 0; i < object.regions.length; ++i) - switch (object.regions[i]) { - default: - case "REGION_UNSPECIFIED": - case 0: - message.regions[i] = 0; - break; - case "US_CENTRAL1": - case 1: - message.regions[i] = 1; - break; - case "US_WEST1": - case 2: - message.regions[i] = 2; - break; - case "US_EAST1": - case 3: - message.regions[i] = 3; - break; - case "US_EAST4": - case 4: - message.regions[i] = 4; - break; - } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.uid != null) + message.uid = String(object.uid); + if (object.annotations) { + if (typeof object.annotations !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.annotations: object expected"); + message.annotations = {}; + for (var keys = Object.keys(object.annotations), i = 0; i < keys.length; ++i) + message.annotations[keys[i]] = String(object.annotations[keys[i]]); } if (object.createTime != null) { if (typeof object.createTime !== "object") @@ -14286,28 +14484,35 @@ throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); } - switch (object.status) { - case "STATUS_UNSPECIFIED": + switch (object.state) { + case "STATE_UNSPECIFIED": case 0: - message.status = 0; + message.state = 0; break; case "CREATING": case 1: - message.status = 1; + message.state = 1; break; case "RUNNING": case 2: - message.status = 2; + message.state = 2; break; case "DELETING": case 3: - message.status = 3; + message.state = 3; break; case "DELETED": case 4: - message.status = 4; + message.state = 4; break; } + if (object.privatePoolV1Config != null) { + if (typeof object.privatePoolV1Config !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.WorkerPool.privatePoolV1Config: object expected"); + message.privatePoolV1Config = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.fromObject(object.privatePoolV1Config); + } + if (object.etag != null) + message.etag = String(object.etag); return message; }; @@ -14324,49 +14529,45 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.regions = []; + if (options.objects || options.defaults) + object.annotations = {}; if (options.defaults) { - object.projectId = ""; - object.serviceAccountEmail = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.workerCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.workerCount = options.longs === String ? "0" : 0; - object.createTime = null; - object.deleteTime = null; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; object.name = ""; - object.workerConfig = null; + object.displayName = ""; + object.uid = ""; + object.createTime = null; object.updateTime = null; + object.deleteTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.etag = ""; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - if (message.workerCount != null && message.hasOwnProperty("workerCount")) - if (typeof message.workerCount === "number") - object.workerCount = options.longs === String ? String(message.workerCount) : message.workerCount; - else - object.workerCount = options.longs === String ? $util.Long.prototype.toString.call(message.workerCount) : options.longs === Number ? new $util.LongBits(message.workerCount.low >>> 0, message.workerCount.high >>> 0).toNumber() : message.workerCount; - if (message.regions && message.regions.length) { - object.regions = []; - for (var j = 0; j < message.regions.length; ++j) - object.regions[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.Region[message.regions[j]] : message.regions[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + var keys2; + if (message.annotations && (keys2 = Object.keys(message.annotations)).length) { + object.annotations = {}; + for (var j = 0; j < keys2.length; ++j) + object.annotations[keys2[j]] = message.annotations[keys2[j]]; } if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.Status[message.status] : message.status; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) - object.workerConfig = $root.google.devtools.cloudbuild.v1.WorkerConfig.toObject(message.workerConfig, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.State[message.state] : message.state; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.privatePoolV1Config != null && message.hasOwnProperty("privatePoolV1Config")) { + object.privatePoolV1Config = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.toObject(message.privatePoolV1Config, options); + if (options.oneofs) + object.config = "privatePoolV1Config"; + } return object; }; @@ -14382,38 +14583,18 @@ }; /** - * Region enum. - * @name google.devtools.cloudbuild.v1.WorkerPool.Region - * @enum {number} - * @property {number} REGION_UNSPECIFIED=0 REGION_UNSPECIFIED value - * @property {number} US_CENTRAL1=1 US_CENTRAL1 value - * @property {number} US_WEST1=2 US_WEST1 value - * @property {number} US_EAST1=3 US_EAST1 value - * @property {number} US_EAST4=4 US_EAST4 value - */ - WorkerPool.Region = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REGION_UNSPECIFIED"] = 0; - values[valuesById[1] = "US_CENTRAL1"] = 1; - values[valuesById[2] = "US_WEST1"] = 2; - values[valuesById[3] = "US_EAST1"] = 3; - values[valuesById[4] = "US_EAST4"] = 4; - return values; - })(); - - /** - * Status enum. - * @name google.devtools.cloudbuild.v1.WorkerPool.Status + * State enum. + * @name google.devtools.cloudbuild.v1.WorkerPool.State * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value * @property {number} CREATING=1 CREATING value * @property {number} RUNNING=2 RUNNING value * @property {number} DELETING=3 DELETING value * @property {number} DELETED=4 DELETED value */ - WorkerPool.Status = (function() { + WorkerPool.State = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; values[valuesById[1] = "CREATING"] = 1; values[valuesById[2] = "RUNNING"] = 2; values[valuesById[3] = "DELETING"] = 3; @@ -14424,27 +14605,25 @@ return WorkerPool; })(); - v1.WorkerConfig = (function() { + v1.PrivatePoolV1Config = (function() { /** - * Properties of a WorkerConfig. + * Properties of a PrivatePoolV1Config. * @memberof google.devtools.cloudbuild.v1 - * @interface IWorkerConfig - * @property {string|null} [machineType] WorkerConfig machineType - * @property {number|Long|null} [diskSizeGb] WorkerConfig diskSizeGb - * @property {google.devtools.cloudbuild.v1.INetwork|null} [network] WorkerConfig network - * @property {string|null} [tag] WorkerConfig tag + * @interface IPrivatePoolV1Config + * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig|null} [workerConfig] PrivatePoolV1Config workerConfig + * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null} [networkConfig] PrivatePoolV1Config networkConfig */ /** - * Constructs a new WorkerConfig. + * Constructs a new PrivatePoolV1Config. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a WorkerConfig. - * @implements IWorkerConfig + * @classdesc Represents a PrivatePoolV1Config. + * @implements IPrivatePoolV1Config * @constructor - * @param {google.devtools.cloudbuild.v1.IWorkerConfig=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IPrivatePoolV1Config=} [properties] Properties to set */ - function WorkerConfig(properties) { + function PrivatePoolV1Config(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14452,114 +14631,88 @@ } /** - * WorkerConfig machineType. - * @member {string} machineType - * @memberof google.devtools.cloudbuild.v1.WorkerConfig - * @instance - */ - WorkerConfig.prototype.machineType = ""; - - /** - * WorkerConfig diskSizeGb. - * @member {number|Long} diskSizeGb - * @memberof google.devtools.cloudbuild.v1.WorkerConfig - * @instance - */ - WorkerConfig.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * WorkerConfig network. - * @member {google.devtools.cloudbuild.v1.INetwork|null|undefined} network - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * PrivatePoolV1Config workerConfig. + * @member {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig|null|undefined} workerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @instance */ - WorkerConfig.prototype.network = null; + PrivatePoolV1Config.prototype.workerConfig = null; /** - * WorkerConfig tag. - * @member {string} tag - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * PrivatePoolV1Config networkConfig. + * @member {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig|null|undefined} networkConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @instance */ - WorkerConfig.prototype.tag = ""; + PrivatePoolV1Config.prototype.networkConfig = null; /** - * Creates a new WorkerConfig instance using the specified properties. + * Creates a new PrivatePoolV1Config instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static - * @param {google.devtools.cloudbuild.v1.IWorkerConfig=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig instance + * @param {google.devtools.cloudbuild.v1.IPrivatePoolV1Config=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config} PrivatePoolV1Config instance */ - WorkerConfig.create = function create(properties) { - return new WorkerConfig(properties); + PrivatePoolV1Config.create = function create(properties) { + return new PrivatePoolV1Config(properties); }; /** - * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * Encodes the specified PrivatePoolV1Config message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static - * @param {google.devtools.cloudbuild.v1.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPrivatePoolV1Config} message PrivatePoolV1Config message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkerConfig.encode = function encode(message, writer) { + PrivatePoolV1Config.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diskSizeGb); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - $root.google.devtools.cloudbuild.v1.Network.encode(message.network, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.tag); + if (message.workerConfig != null && Object.hasOwnProperty.call(message, "workerConfig")) + $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.encode(message.workerConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.networkConfig != null && Object.hasOwnProperty.call(message, "networkConfig")) + $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.encode(message.networkConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.WorkerConfig.verify|verify} messages. + * Encodes the specified PrivatePoolV1Config message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static - * @param {google.devtools.cloudbuild.v1.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IPrivatePoolV1Config} message PrivatePoolV1Config message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - WorkerConfig.encodeDelimited = function encodeDelimited(message, writer) { + PrivatePoolV1Config.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a WorkerConfig message from the specified reader or buffer. + * Decodes a PrivatePoolV1Config message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config} PrivatePoolV1Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkerConfig.decode = function decode(reader, length) { + PrivatePoolV1Config.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.WorkerConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.machineType = reader.string(); + message.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.decode(reader, reader.uint32()); break; case 2: - message.diskSizeGb = reader.int64(); - break; - case 3: - message.network = $root.google.devtools.cloudbuild.v1.Network.decode(reader, reader.uint32()); - break; - case 4: - message.tag = reader.string(); + message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -14570,255 +14723,1158 @@ }; /** - * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * Decodes a PrivatePoolV1Config message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config} PrivatePoolV1Config * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - WorkerConfig.decodeDelimited = function decodeDelimited(reader) { + PrivatePoolV1Config.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a WorkerConfig message. + * Verifies a PrivatePoolV1Config message. * @function verify - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - WorkerConfig.verify = function verify(message) { + PrivatePoolV1Config.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) - return "diskSizeGb: integer|Long expected"; - if (message.network != null && message.hasOwnProperty("network")) { - var error = $root.google.devtools.cloudbuild.v1.Network.verify(message.network); + if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) { + var error = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.verify(message.workerConfig); if (error) - return "network." + error; + return "workerConfig." + error; + } + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) { + var error = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.verify(message.networkConfig); + if (error) + return "networkConfig." + error; } - if (message.tag != null && message.hasOwnProperty("tag")) - if (!$util.isString(message.tag)) - return "tag: string expected"; return null; }; /** - * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * Creates a PrivatePoolV1Config message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.WorkerConfig} WorkerConfig + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config} PrivatePoolV1Config */ - WorkerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.WorkerConfig) + PrivatePoolV1Config.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config) return object; - var message = new $root.google.devtools.cloudbuild.v1.WorkerConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.diskSizeGb != null) - if ($util.Long) - (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; - else if (typeof object.diskSizeGb === "string") - message.diskSizeGb = parseInt(object.diskSizeGb, 10); - else if (typeof object.diskSizeGb === "number") - message.diskSizeGb = object.diskSizeGb; - else if (typeof object.diskSizeGb === "object") - message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); - if (object.network != null) { - if (typeof object.network !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.WorkerConfig.network: object expected"); - message.network = $root.google.devtools.cloudbuild.v1.Network.fromObject(object.network); + var message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config(); + if (object.workerConfig != null) { + if (typeof object.workerConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.PrivatePoolV1Config.workerConfig: object expected"); + message.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.fromObject(object.workerConfig); + } + if (object.networkConfig != null) { + if (typeof object.networkConfig !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.PrivatePoolV1Config.networkConfig: object expected"); + message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.fromObject(object.networkConfig); } - if (object.tag != null) - message.tag = String(object.tag); return message; }; /** - * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. + * Creates a plain object from a PrivatePoolV1Config message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @static - * @param {google.devtools.cloudbuild.v1.WorkerConfig} message WorkerConfig + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config} message PrivatePoolV1Config * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - WorkerConfig.toObject = function toObject(message, options) { + PrivatePoolV1Config.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.machineType = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.diskSizeGb = options.longs === String ? "0" : 0; - object.network = null; - object.tag = ""; + object.workerConfig = null; + object.networkConfig = null; } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (typeof message.diskSizeGb === "number") - object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; - else - object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; - if (message.network != null && message.hasOwnProperty("network")) - object.network = $root.google.devtools.cloudbuild.v1.Network.toObject(message.network, options); - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = message.tag; + if (message.workerConfig != null && message.hasOwnProperty("workerConfig")) + object.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.toObject(message.workerConfig, options); + if (message.networkConfig != null && message.hasOwnProperty("networkConfig")) + object.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.toObject(message.networkConfig, options); return object; }; /** - * Converts this WorkerConfig to JSON. + * Converts this PrivatePoolV1Config to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.WorkerConfig + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config * @instance * @returns {Object.} JSON object */ - WorkerConfig.prototype.toJSON = function toJSON() { + PrivatePoolV1Config.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return WorkerConfig; - })(); - - v1.Network = (function() { + PrivatePoolV1Config.WorkerConfig = (function() { - /** - * Properties of a Network. - * @memberof google.devtools.cloudbuild.v1 - * @interface INetwork - * @property {string|null} [projectId] Network projectId - * @property {string|null} [network] Network network - * @property {string|null} [subnetwork] Network subnetwork - */ + /** + * Properties of a WorkerConfig. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @interface IWorkerConfig + * @property {string|null} [machineType] WorkerConfig machineType + * @property {number|Long|null} [diskSizeGb] WorkerConfig diskSizeGb + */ - /** - * Constructs a new Network. - * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a Network. - * @implements INetwork - * @constructor - * @param {google.devtools.cloudbuild.v1.INetwork=} [properties] Properties to set - */ - function Network(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new WorkerConfig. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @classdesc Represents a WorkerConfig. + * @implements IWorkerConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig=} [properties] Properties to set + */ + function WorkerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Network projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.Network - * @instance - */ - Network.prototype.projectId = ""; + /** + * WorkerConfig machineType. + * @member {string} machineType + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @instance + */ + WorkerConfig.prototype.machineType = ""; - /** - * Network network. - * @member {string} network - * @memberof google.devtools.cloudbuild.v1.Network - * @instance - */ - Network.prototype.network = ""; + /** + * WorkerConfig diskSizeGb. + * @member {number|Long} diskSizeGb + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @instance + */ + WorkerConfig.prototype.diskSizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Network subnetwork. - * @member {string} subnetwork - * @memberof google.devtools.cloudbuild.v1.Network - * @instance - */ - Network.prototype.subnetwork = ""; + /** + * Creates a new WorkerConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig} WorkerConfig instance + */ + WorkerConfig.create = function create(properties) { + return new WorkerConfig(properties); + }; - /** - * Creates a new Network instance using the specified properties. - * @function create - * @memberof google.devtools.cloudbuild.v1.Network - * @static - * @param {google.devtools.cloudbuild.v1.INetwork=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Network} Network instance - */ - Network.create = function create(properties) { - return new Network(properties); - }; + /** + * Encodes the specified WorkerConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.diskSizeGb); + return writer; + }; - /** - * Encodes the specified Network message. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. - * @function encode - * @memberof google.devtools.cloudbuild.v1.Network - * @static - * @param {google.devtools.cloudbuild.v1.INetwork} message Network message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Network.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subnetwork); - return writer; - }; + /** + * Encodes the specified WorkerConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.IWorkerConfig} message WorkerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified Network message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Network.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Network - * @static - * @param {google.devtools.cloudbuild.v1.INetwork} message Network message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Network.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a WorkerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig} WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.machineType = reader.string(); + break; + case 2: + message.diskSizeGb = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Network message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.cloudbuild.v1.Network - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Network} Network - * @throws {Error} If the payload is not a reader or valid buffer + /** + * Decodes a WorkerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig} WorkerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb) && !(message.diskSizeGb && $util.isInteger(message.diskSizeGb.low) && $util.isInteger(message.diskSizeGb.high))) + return "diskSizeGb: integer|Long expected"; + return null; + }; + + /** + * Creates a WorkerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig} WorkerConfig + */ + WorkerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.diskSizeGb != null) + if ($util.Long) + (message.diskSizeGb = $util.Long.fromValue(object.diskSizeGb)).unsigned = false; + else if (typeof object.diskSizeGb === "string") + message.diskSizeGb = parseInt(object.diskSizeGb, 10); + else if (typeof object.diskSizeGb === "number") + message.diskSizeGb = object.diskSizeGb; + else if (typeof object.diskSizeGb === "object") + message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a WorkerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig} message WorkerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.machineType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.diskSizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.diskSizeGb = options.longs === String ? "0" : 0; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (typeof message.diskSizeGb === "number") + object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; + else + object.diskSizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.diskSizeGb) : options.longs === Number ? new $util.LongBits(message.diskSizeGb.low >>> 0, message.diskSizeGb.high >>> 0).toNumber() : message.diskSizeGb; + return object; + }; + + /** + * Converts this WorkerConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @instance + * @returns {Object.} JSON object + */ + WorkerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WorkerConfig; + })(); + + PrivatePoolV1Config.NetworkConfig = (function() { + + /** + * Properties of a NetworkConfig. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @interface INetworkConfig + * @property {string|null} [peeredNetwork] NetworkConfig peeredNetwork + * @property {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption|null} [egressOption] NetworkConfig egressOption + */ + + /** + * Constructs a new NetworkConfig. + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @classdesc Represents a NetworkConfig. + * @implements INetworkConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig=} [properties] Properties to set + */ + function NetworkConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkConfig peeredNetwork. + * @member {string} peeredNetwork + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @instance + */ + NetworkConfig.prototype.peeredNetwork = ""; + + /** + * NetworkConfig egressOption. + * @member {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption} egressOption + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @instance + */ + NetworkConfig.prototype.egressOption = 0; + + /** + * Creates a new NetworkConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig} NetworkConfig instance + */ + NetworkConfig.create = function create(properties) { + return new NetworkConfig(properties); + }; + + /** + * Encodes the specified NetworkConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.peeredNetwork != null && Object.hasOwnProperty.call(message, "peeredNetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.peeredNetwork); + if (message.egressOption != null && Object.hasOwnProperty.call(message, "egressOption")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.egressOption); + return writer; + }; + + /** + * Encodes the specified NetworkConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.INetworkConfig} message NetworkConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.peeredNetwork = reader.string(); + break; + case 2: + message.egressOption = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig} NetworkConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) + if (!$util.isString(message.peeredNetwork)) + return "peeredNetwork: string expected"; + if (message.egressOption != null && message.hasOwnProperty("egressOption")) + switch (message.egressOption) { + default: + return "egressOption: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a NetworkConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig} NetworkConfig + */ + NetworkConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig(); + if (object.peeredNetwork != null) + message.peeredNetwork = String(object.peeredNetwork); + switch (object.egressOption) { + case "EGRESS_OPTION_UNSPECIFIED": + case 0: + message.egressOption = 0; + break; + case "NO_PUBLIC_EGRESS": + case 1: + message.egressOption = 1; + break; + case "PUBLIC_EGRESS": + case 2: + message.egressOption = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig} message NetworkConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.peeredNetwork = ""; + object.egressOption = options.enums === String ? "EGRESS_OPTION_UNSPECIFIED" : 0; + } + if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) + object.peeredNetwork = message.peeredNetwork; + if (message.egressOption != null && message.hasOwnProperty("egressOption")) + object.egressOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] : message.egressOption; + return object; + }; + + /** + * Converts this NetworkConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EgressOption enum. + * @name google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption + * @enum {number} + * @property {number} EGRESS_OPTION_UNSPECIFIED=0 EGRESS_OPTION_UNSPECIFIED value + * @property {number} NO_PUBLIC_EGRESS=1 NO_PUBLIC_EGRESS value + * @property {number} PUBLIC_EGRESS=2 PUBLIC_EGRESS value + */ + NetworkConfig.EgressOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EGRESS_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "NO_PUBLIC_EGRESS"] = 1; + values[valuesById[2] = "PUBLIC_EGRESS"] = 2; + return values; + })(); + + return NetworkConfig; + })(); + + return PrivatePoolV1Config; + })(); + + v1.CreateWorkerPoolRequest = (function() { + + /** + * Properties of a CreateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface ICreateWorkerPoolRequest + * @property {string|null} [parent] CreateWorkerPoolRequest parent + * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] CreateWorkerPoolRequest workerPool + * @property {string|null} [workerPoolId] CreateWorkerPoolRequest workerPoolId + * @property {boolean|null} [validateOnly] CreateWorkerPoolRequest validateOnly + */ + + /** + * Constructs a new CreateWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a CreateWorkerPoolRequest. + * @implements ICreateWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set + */ + function CreateWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateWorkerPoolRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.parent = ""; + + /** + * CreateWorkerPoolRequest workerPool. + * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.workerPool = null; + + /** + * CreateWorkerPoolRequest workerPoolId. + * @member {string} workerPoolId + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.workerPoolId = ""; + + /** + * CreateWorkerPoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + */ + CreateWorkerPoolRequest.prototype.validateOnly = false; + + /** + * Creates a new CreateWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest instance + */ + CreateWorkerPoolRequest.create = function create(properties) { + return new CreateWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified CreateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkerPoolRequest.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.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.workerPoolId != null && Object.hasOwnProperty.call(message, "workerPoolId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.workerPoolId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified CreateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + break; + case 3: + message.workerPoolId = reader.string(); + break; + case 4: + message.validateOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateWorkerPoolRequest.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.workerPool != null && message.hasOwnProperty("workerPool")) { + var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPool); + if (error) + return "workerPool." + error; + } + if (message.workerPoolId != null && message.hasOwnProperty("workerPoolId")) + if (!$util.isString(message.workerPoolId)) + return "workerPoolId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + return null; + }; + + /** + * Creates a CreateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + */ + CreateWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.workerPool != null) { + if (typeof object.workerPool !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.workerPool: object expected"); + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPool); + } + if (object.workerPoolId != null) + message.workerPoolId = String(object.workerPoolId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + return message; + }; + + /** + * Creates a plain object from a CreateWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} message CreateWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateWorkerPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.workerPool = null; + object.workerPoolId = ""; + object.validateOnly = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPool, options); + if (message.workerPoolId != null && message.hasOwnProperty("workerPoolId")) + object.workerPoolId = message.workerPoolId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + return object; + }; + + /** + * Converts this CreateWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateWorkerPoolRequest; + })(); + + v1.GetWorkerPoolRequest = (function() { + + /** + * Properties of a GetWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IGetWorkerPoolRequest + * @property {string|null} [name] GetWorkerPoolRequest name + */ + + /** + * Constructs a new GetWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a GetWorkerPoolRequest. + * @implements IGetWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set + */ + function GetWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetWorkerPoolRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @instance + */ + GetWorkerPoolRequest.prototype.name = ""; + + /** + * Creates a new GetWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest instance + */ + GetWorkerPoolRequest.create = function create(properties) { + return new GetWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified GetWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkerPoolRequest.encode = function encode(message, writer) { + 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 GetWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkerPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); + 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 GetWorkerPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetWorkerPoolRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetWorkerPoolRequest.verify = function verify(message) { + if (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 GetWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + */ + GetWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetWorkerPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} message GetWorkerPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetWorkerPoolRequest.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 GetWorkerPoolRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetWorkerPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetWorkerPoolRequest; + })(); + + v1.DeleteWorkerPoolRequest = (function() { + + /** + * Properties of a DeleteWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IDeleteWorkerPoolRequest + * @property {string|null} [name] DeleteWorkerPoolRequest name + * @property {string|null} [etag] DeleteWorkerPoolRequest etag + * @property {boolean|null} [allowMissing] DeleteWorkerPoolRequest allowMissing + * @property {boolean|null} [validateOnly] DeleteWorkerPoolRequest validateOnly + */ + + /** + * Constructs a new DeleteWorkerPoolRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a DeleteWorkerPoolRequest. + * @implements IDeleteWorkerPoolRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set + */ + function DeleteWorkerPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteWorkerPoolRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + */ + DeleteWorkerPoolRequest.prototype.name = ""; + + /** + * DeleteWorkerPoolRequest etag. + * @member {string} etag + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + */ + DeleteWorkerPoolRequest.prototype.etag = ""; + + /** + * DeleteWorkerPoolRequest allowMissing. + * @member {boolean} allowMissing + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + */ + DeleteWorkerPoolRequest.prototype.allowMissing = false; + + /** + * DeleteWorkerPoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @instance + */ + DeleteWorkerPoolRequest.prototype.validateOnly = false; + + /** + * Creates a new DeleteWorkerPoolRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest instance + */ + DeleteWorkerPoolRequest.create = function create(properties) { + return new DeleteWorkerPoolRequest(properties); + }; + + /** + * Encodes the specified DeleteWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkerPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.allowMissing != null && Object.hasOwnProperty.call(message, "allowMissing")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowMissing); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); + return writer; + }; + + /** + * Encodes the specified DeleteWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.decode = function decode(reader, length) { + DeleteWorkerPoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Network(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.projectId = reader.string(); + message.name = reader.string(); break; case 2: - message.network = reader.string(); + message.etag = reader.string(); break; case 3: - message.subnetwork = reader.string(); + message.allowMissing = reader.bool(); + break; + case 4: + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -14829,125 +15885,134 @@ }; /** - * Decodes a Network message from the specified reader or buffer, length delimited. + * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Network + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Network} Network + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Network.decodeDelimited = function decodeDelimited(reader) { + DeleteWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Network message. + * Verifies a DeleteWorkerPoolRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Network + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Network.verify = function verify(message) { + DeleteWorkerPoolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + if (typeof message.allowMissing !== "boolean") + return "allowMissing: boolean expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a Network message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Network + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Network} Network + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest */ - Network.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Network) + DeleteWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.Network(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); + var message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + if (object.allowMissing != null) + message.allowMissing = Boolean(object.allowMissing); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a Network message. Also converts values to other types if specified. + * Creates a plain object from a DeleteWorkerPoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.Network + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest * @static - * @param {google.devtools.cloudbuild.v1.Network} message Network + * @param {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} message DeleteWorkerPoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Network.toObject = function toObject(message, options) { + DeleteWorkerPoolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.network = ""; - object.subnetwork = ""; + object.name = ""; + object.etag = ""; + object.allowMissing = false; + object.validateOnly = false; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.allowMissing != null && message.hasOwnProperty("allowMissing")) + object.allowMissing = message.allowMissing; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this Network to JSON. + * Converts this DeleteWorkerPoolRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Network + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest * @instance * @returns {Object.} JSON object */ - Network.prototype.toJSON = function toJSON() { + DeleteWorkerPoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Network; + return DeleteWorkerPoolRequest; })(); - v1.CreateWorkerPoolRequest = (function() { + v1.UpdateWorkerPoolRequest = (function() { /** - * Properties of a CreateWorkerPoolRequest. + * Properties of an UpdateWorkerPoolRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface ICreateWorkerPoolRequest - * @property {string|null} [parent] CreateWorkerPoolRequest parent - * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] CreateWorkerPoolRequest workerPool + * @interface IUpdateWorkerPoolRequest + * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] UpdateWorkerPoolRequest workerPool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateWorkerPoolRequest updateMask + * @property {boolean|null} [validateOnly] UpdateWorkerPoolRequest validateOnly */ /** - * Constructs a new CreateWorkerPoolRequest. + * Constructs a new UpdateWorkerPoolRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a CreateWorkerPoolRequest. - * @implements ICreateWorkerPoolRequest + * @classdesc Represents an UpdateWorkerPoolRequest. + * @implements IUpdateWorkerPoolRequest * @constructor - * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set */ - function CreateWorkerPoolRequest(properties) { + function UpdateWorkerPoolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14955,88 +16020,101 @@ } /** - * CreateWorkerPoolRequest parent. - * @member {string} parent - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * UpdateWorkerPoolRequest workerPool. + * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @instance */ - CreateWorkerPoolRequest.prototype.parent = ""; + UpdateWorkerPoolRequest.prototype.workerPool = null; /** - * CreateWorkerPoolRequest workerPool. - * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * UpdateWorkerPoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @instance */ - CreateWorkerPoolRequest.prototype.workerPool = null; + UpdateWorkerPoolRequest.prototype.updateMask = null; /** - * Creates a new CreateWorkerPoolRequest instance using the specified properties. + * UpdateWorkerPoolRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @instance + */ + UpdateWorkerPoolRequest.prototype.validateOnly = false; + + /** + * Creates a new UpdateWorkerPoolRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static - * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest instance - */ - CreateWorkerPoolRequest.create = function create(properties) { - return new CreateWorkerPoolRequest(properties); + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest instance + */ + UpdateWorkerPoolRequest.create = function create(properties) { + return new UpdateWorkerPoolRequest(properties); }; /** - * Encodes the specified CreateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * Encodes the specified UpdateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static - * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateWorkerPoolRequest.encode = function encode(message, writer) { + UpdateWorkerPoolRequest.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.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.validateOnly); return writer; }; /** - * Encodes the specified CreateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.verify|verify} messages. + * Encodes the specified UpdateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static - * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest} message CreateWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer. + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateWorkerPoolRequest.decode = function decode(reader, length) { + UpdateWorkerPoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); break; case 2: - message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 4: + message.validateOnly = reader.bool(); break; default: reader.skipType(tag & 7); @@ -15047,121 +16125,136 @@ }; /** - * Decodes a CreateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateWorkerPoolRequest message. + * Verifies an UpdateWorkerPoolRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateWorkerPoolRequest.verify = function verify(message) { + UpdateWorkerPoolRequest.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.workerPool != null && message.hasOwnProperty("workerPool")) { var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPool); if (error) return "workerPool." + error; } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; return null; }; /** - * Creates a CreateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} CreateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest */ - CreateWorkerPoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest) + UpdateWorkerPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); if (object.workerPool != null) { if (typeof object.workerPool !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.CreateWorkerPoolRequest.workerPool: object expected"); + throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.workerPool: object expected"); message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPool); } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); return message; }; /** - * Creates a plain object from a CreateWorkerPoolRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateWorkerPoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @static - * @param {google.devtools.cloudbuild.v1.CreateWorkerPoolRequest} message CreateWorkerPoolRequest + * @param {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} message UpdateWorkerPoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateWorkerPoolRequest.toObject = function toObject(message, options) { + UpdateWorkerPoolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; object.workerPool = null; + object.updateMask = null; + object.validateOnly = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; if (message.workerPool != null && message.hasOwnProperty("workerPool")) object.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; return object; }; /** - * Converts this CreateWorkerPoolRequest to JSON. + * Converts this UpdateWorkerPoolRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest * @instance * @returns {Object.} JSON object */ - CreateWorkerPoolRequest.prototype.toJSON = function toJSON() { + UpdateWorkerPoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateWorkerPoolRequest; + return UpdateWorkerPoolRequest; })(); - v1.GetWorkerPoolRequest = (function() { + v1.ListWorkerPoolsRequest = (function() { /** - * Properties of a GetWorkerPoolRequest. + * Properties of a ListWorkerPoolsRequest. * @memberof google.devtools.cloudbuild.v1 - * @interface IGetWorkerPoolRequest - * @property {string|null} [name] GetWorkerPoolRequest name + * @interface IListWorkerPoolsRequest + * @property {string|null} [parent] ListWorkerPoolsRequest parent + * @property {number|null} [pageSize] ListWorkerPoolsRequest pageSize + * @property {string|null} [pageToken] ListWorkerPoolsRequest pageToken */ /** - * Constructs a new GetWorkerPoolRequest. + * Constructs a new ListWorkerPoolsRequest. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a GetWorkerPoolRequest. - * @implements IGetWorkerPoolRequest + * @classdesc Represents a ListWorkerPoolsRequest. + * @implements IListWorkerPoolsRequest * @constructor - * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set */ - function GetWorkerPoolRequest(properties) { + function ListWorkerPoolsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15169,75 +16262,101 @@ } /** - * GetWorkerPoolRequest name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * ListWorkerPoolsRequest parent. + * @member {string} parent + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @instance */ - GetWorkerPoolRequest.prototype.name = ""; + ListWorkerPoolsRequest.prototype.parent = ""; /** - * Creates a new GetWorkerPoolRequest instance using the specified properties. + * ListWorkerPoolsRequest pageSize. + * @member {number} pageSize + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @instance + */ + ListWorkerPoolsRequest.prototype.pageSize = 0; + + /** + * ListWorkerPoolsRequest pageToken. + * @member {string} pageToken + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @instance + */ + ListWorkerPoolsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListWorkerPoolsRequest instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static - * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest instance + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest instance */ - GetWorkerPoolRequest.create = function create(properties) { - return new GetWorkerPoolRequest(properties); + ListWorkerPoolsRequest.create = function create(properties) { + return new ListWorkerPoolsRequest(properties); }; /** - * Encodes the specified GetWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * Encodes the specified ListWorkerPoolsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static - * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkerPoolRequest.encode = function encode(message, writer) { + ListWorkerPoolsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified GetWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.GetWorkerPoolRequest.verify|verify} messages. + * Encodes the specified ListWorkerPoolsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static - * @param {google.devtools.cloudbuild.v1.IGetWorkerPoolRequest} message GetWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListWorkerPoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetWorkerPoolRequest message from the specified reader or buffer. + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkerPoolRequest.decode = function decode(reader, length) { + ListWorkerPoolsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.parent = reader.string(); + break; + case 2: + message.pageSize = reader.int32(); + break; + case 3: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -15248,107 +16367,126 @@ }; /** - * Decodes a GetWorkerPoolRequest message from the specified reader or buffer, length delimited. + * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + ListWorkerPoolsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetWorkerPoolRequest message. + * Verifies a ListWorkerPoolsRequest message. * @function verify - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetWorkerPoolRequest.verify = function verify(message) { + ListWorkerPoolsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a GetWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListWorkerPoolsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} GetWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest */ - GetWorkerPoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest) + ListWorkerPoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest) return object; - var message = new $root.google.devtools.cloudbuild.v1.GetWorkerPoolRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); + 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 GetWorkerPoolRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListWorkerPoolsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @static - * @param {google.devtools.cloudbuild.v1.GetWorkerPoolRequest} message GetWorkerPoolRequest + * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} message ListWorkerPoolsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetWorkerPoolRequest.toObject = function toObject(message, options) { + ListWorkerPoolsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.parent = ""; + object.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 GetWorkerPoolRequest to JSON. + * Converts this ListWorkerPoolsRequest to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest * @instance * @returns {Object.} JSON object */ - GetWorkerPoolRequest.prototype.toJSON = function toJSON() { + ListWorkerPoolsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetWorkerPoolRequest; + return ListWorkerPoolsRequest; })(); - v1.DeleteWorkerPoolRequest = (function() { + v1.ListWorkerPoolsResponse = (function() { /** - * Properties of a DeleteWorkerPoolRequest. + * Properties of a ListWorkerPoolsResponse. * @memberof google.devtools.cloudbuild.v1 - * @interface IDeleteWorkerPoolRequest - * @property {string|null} [name] DeleteWorkerPoolRequest name + * @interface IListWorkerPoolsResponse + * @property {Array.|null} [workerPools] ListWorkerPoolsResponse workerPools + * @property {string|null} [nextPageToken] ListWorkerPoolsResponse nextPageToken */ /** - * Constructs a new DeleteWorkerPoolRequest. + * Constructs a new ListWorkerPoolsResponse. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a DeleteWorkerPoolRequest. - * @implements IDeleteWorkerPoolRequest + * @classdesc Represents a ListWorkerPoolsResponse. + * @implements IListWorkerPoolsResponse * @constructor - * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set */ - function DeleteWorkerPoolRequest(properties) { + function ListWorkerPoolsResponse(properties) { + this.workerPools = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15356,75 +16494,91 @@ } /** - * DeleteWorkerPoolRequest name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * ListWorkerPoolsResponse workerPools. + * @member {Array.} workerPools + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @instance */ - DeleteWorkerPoolRequest.prototype.name = ""; + ListWorkerPoolsResponse.prototype.workerPools = $util.emptyArray; /** - * Creates a new DeleteWorkerPoolRequest instance using the specified properties. + * ListWorkerPoolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @instance + */ + ListWorkerPoolsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkerPoolsResponse instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static - * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest instance + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse instance */ - DeleteWorkerPoolRequest.create = function create(properties) { - return new DeleteWorkerPoolRequest(properties); + ListWorkerPoolsResponse.create = function create(properties) { + return new ListWorkerPoolsResponse(properties); }; /** - * Encodes the specified DeleteWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * Encodes the specified ListWorkerPoolsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static - * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWorkerPoolRequest.encode = function encode(message, writer) { + ListWorkerPoolsResponse.encode = function encode(message, writer) { 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.workerPools != null && message.workerPools.length) + for (var i = 0; i < message.workerPools.length; ++i) + $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPools[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 DeleteWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest.verify|verify} messages. + * Encodes the specified ListWorkerPoolsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static - * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest} message DeleteWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListWorkerPoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer. + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWorkerPoolRequest.decode = function decode(reader, length) { + ListWorkerPoolsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.workerPools && message.workerPools.length)) + message.workerPools = []; + message.workerPools.push($root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -15435,108 +16589,135 @@ }; /** - * Decodes a DeleteWorkerPoolRequest message from the specified reader or buffer, length delimited. + * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + ListWorkerPoolsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteWorkerPoolRequest message. + * Verifies a ListWorkerPoolsResponse message. * @function verify - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteWorkerPoolRequest.verify = function verify(message) { + ListWorkerPoolsResponse.verify = function verify(message) { if (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.workerPools != null && message.hasOwnProperty("workerPools")) { + if (!Array.isArray(message.workerPools)) + return "workerPools: array expected"; + for (var i = 0; i < message.workerPools.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPools[i]); + if (error) + return "workerPools." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a DeleteWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListWorkerPoolsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} DeleteWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse */ - DeleteWorkerPoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest) + ListWorkerPoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse) return object; - var message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); + if (object.workerPools) { + if (!Array.isArray(object.workerPools)) + throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: array expected"); + message.workerPools = []; + for (var i = 0; i < object.workerPools.length; ++i) { + if (typeof object.workerPools[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: object expected"); + message.workerPools[i] = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPools[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a DeleteWorkerPoolRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListWorkerPoolsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @static - * @param {google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest} message DeleteWorkerPoolRequest + * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} message ListWorkerPoolsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteWorkerPoolRequest.toObject = function toObject(message, options) { + ListWorkerPoolsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.workerPools = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.workerPools && message.workerPools.length) { + object.workerPools = []; + for (var j = 0; j < message.workerPools.length; ++j) + object.workerPools[j] = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPools[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this DeleteWorkerPoolRequest to JSON. + * Converts this ListWorkerPoolsResponse to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse * @instance * @returns {Object.} JSON object */ - DeleteWorkerPoolRequest.prototype.toJSON = function toJSON() { + ListWorkerPoolsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteWorkerPoolRequest; + return ListWorkerPoolsResponse; })(); - v1.UpdateWorkerPoolRequest = (function() { + v1.CreateWorkerPoolOperationMetadata = (function() { /** - * Properties of an UpdateWorkerPoolRequest. + * Properties of a CreateWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @interface IUpdateWorkerPoolRequest - * @property {string|null} [name] UpdateWorkerPoolRequest name - * @property {google.devtools.cloudbuild.v1.IWorkerPool|null} [workerPool] UpdateWorkerPoolRequest workerPool + * @interface ICreateWorkerPoolOperationMetadata + * @property {string|null} [workerPool] CreateWorkerPoolOperationMetadata workerPool + * @property {google.protobuf.ITimestamp|null} [createTime] CreateWorkerPoolOperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [completeTime] CreateWorkerPoolOperationMetadata completeTime */ /** - * Constructs a new UpdateWorkerPoolRequest. + * Constructs a new CreateWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents an UpdateWorkerPoolRequest. - * @implements IUpdateWorkerPoolRequest + * @classdesc Represents a CreateWorkerPoolOperationMetadata. + * @implements ICreateWorkerPoolOperationMetadata * @constructor - * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata=} [properties] Properties to set */ - function UpdateWorkerPoolRequest(properties) { + function CreateWorkerPoolOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15544,88 +16725,101 @@ } /** - * UpdateWorkerPoolRequest name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * CreateWorkerPoolOperationMetadata workerPool. + * @member {string} workerPool + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @instance */ - UpdateWorkerPoolRequest.prototype.name = ""; + CreateWorkerPoolOperationMetadata.prototype.workerPool = ""; /** - * UpdateWorkerPoolRequest workerPool. - * @member {google.devtools.cloudbuild.v1.IWorkerPool|null|undefined} workerPool - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * CreateWorkerPoolOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @instance */ - UpdateWorkerPoolRequest.prototype.workerPool = null; + CreateWorkerPoolOperationMetadata.prototype.createTime = null; /** - * Creates a new UpdateWorkerPoolRequest instance using the specified properties. + * CreateWorkerPoolOperationMetadata completeTime. + * @member {google.protobuf.ITimestamp|null|undefined} completeTime + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata + * @instance + */ + CreateWorkerPoolOperationMetadata.prototype.completeTime = null; + + /** + * Creates a new CreateWorkerPoolOperationMetadata instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest instance + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata} CreateWorkerPoolOperationMetadata instance */ - UpdateWorkerPoolRequest.create = function create(properties) { - return new UpdateWorkerPoolRequest(properties); + CreateWorkerPoolOperationMetadata.create = function create(properties) { + return new CreateWorkerPoolOperationMetadata(properties); }; /** - * Encodes the specified UpdateWorkerPoolRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * Encodes the specified CreateWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata} message CreateWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateWorkerPoolRequest.encode = function encode(message, writer) { + CreateWorkerPoolOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) - $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.completeTime != null && Object.hasOwnProperty.call(message, "completeTime")) + $root.google.protobuf.Timestamp.encode(message.completeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateWorkerPoolRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.verify|verify} messages. + * Encodes the specified CreateWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest} message UpdateWorkerPoolRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata} message CreateWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateWorkerPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateWorkerPoolOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer. + * Decodes a CreateWorkerPoolOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata} CreateWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateWorkerPoolRequest.decode = function decode(reader, length) { + CreateWorkerPoolOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.workerPool = reader.string(); + break; case 2: - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15636,121 +16830,136 @@ }; /** - * Decodes an UpdateWorkerPoolRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata} CreateWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateWorkerPoolRequest.decodeDelimited = function decodeDelimited(reader) { + CreateWorkerPoolOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateWorkerPoolRequest message. + * Verifies a CreateWorkerPoolOperationMetadata message. * @function verify - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateWorkerPoolRequest.verify = function verify(message) { + CreateWorkerPoolOperationMetadata.verify = function verify(message) { if (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.workerPool != null && message.hasOwnProperty("workerPool")) { - var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPool); + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "workerPool." + error; + return "createTime." + error; + } + if (message.completeTime != null && message.hasOwnProperty("completeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completeTime); + if (error) + return "completeTime." + error; } return null; }; /** - * Creates an UpdateWorkerPoolRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} UpdateWorkerPoolRequest + * @returns {google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata} CreateWorkerPoolOperationMetadata */ - UpdateWorkerPoolRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest) - return object; - var message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.workerPool != null) { - if (typeof object.workerPool !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest.workerPool: object expected"); - message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPool); + CreateWorkerPoolOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata) + return object; + var message = new $root.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.completeTime != null) { + if (typeof object.completeTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata.completeTime: object expected"); + message.completeTime = $root.google.protobuf.Timestamp.fromObject(object.completeTime); } return message; }; /** - * Creates a plain object from an UpdateWorkerPoolRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateWorkerPoolOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest} message UpdateWorkerPoolRequest + * @param {google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata} message CreateWorkerPoolOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateWorkerPoolRequest.toObject = function toObject(message, options) { + CreateWorkerPoolOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.workerPool = null; + object.workerPool = ""; + object.createTime = null; + object.completeTime = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; if (message.workerPool != null && message.hasOwnProperty("workerPool")) - object.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPool, options); + object.workerPool = message.workerPool; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.completeTime != null && message.hasOwnProperty("completeTime")) + object.completeTime = $root.google.protobuf.Timestamp.toObject(message.completeTime, options); return object; }; /** - * Converts this UpdateWorkerPoolRequest to JSON. + * Converts this CreateWorkerPoolOperationMetadata to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata * @instance * @returns {Object.} JSON object */ - UpdateWorkerPoolRequest.prototype.toJSON = function toJSON() { + CreateWorkerPoolOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateWorkerPoolRequest; + return CreateWorkerPoolOperationMetadata; })(); - v1.ListWorkerPoolsRequest = (function() { + v1.UpdateWorkerPoolOperationMetadata = (function() { /** - * Properties of a ListWorkerPoolsRequest. + * Properties of an UpdateWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @interface IListWorkerPoolsRequest - * @property {string|null} [parent] ListWorkerPoolsRequest parent + * @interface IUpdateWorkerPoolOperationMetadata + * @property {string|null} [workerPool] UpdateWorkerPoolOperationMetadata workerPool + * @property {google.protobuf.ITimestamp|null} [createTime] UpdateWorkerPoolOperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [completeTime] UpdateWorkerPoolOperationMetadata completeTime */ /** - * Constructs a new ListWorkerPoolsRequest. + * Constructs a new UpdateWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListWorkerPoolsRequest. - * @implements IListWorkerPoolsRequest + * @classdesc Represents an UpdateWorkerPoolOperationMetadata. + * @implements IUpdateWorkerPoolOperationMetadata * @constructor - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata=} [properties] Properties to set */ - function ListWorkerPoolsRequest(properties) { + function UpdateWorkerPoolOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15758,75 +16967,101 @@ } /** - * ListWorkerPoolsRequest parent. - * @member {string} parent - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * UpdateWorkerPoolOperationMetadata workerPool. + * @member {string} workerPool + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @instance */ - ListWorkerPoolsRequest.prototype.parent = ""; + UpdateWorkerPoolOperationMetadata.prototype.workerPool = ""; /** - * Creates a new ListWorkerPoolsRequest instance using the specified properties. + * UpdateWorkerPoolOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata + * @instance + */ + UpdateWorkerPoolOperationMetadata.prototype.createTime = null; + + /** + * UpdateWorkerPoolOperationMetadata completeTime. + * @member {google.protobuf.ITimestamp|null|undefined} completeTime + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata + * @instance + */ + UpdateWorkerPoolOperationMetadata.prototype.completeTime = null; + + /** + * Creates a new UpdateWorkerPoolOperationMetadata instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest instance + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata} UpdateWorkerPoolOperationMetadata instance */ - ListWorkerPoolsRequest.create = function create(properties) { - return new ListWorkerPoolsRequest(properties); + UpdateWorkerPoolOperationMetadata.create = function create(properties) { + return new UpdateWorkerPoolOperationMetadata(properties); }; /** - * Encodes the specified ListWorkerPoolsRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * Encodes the specified UpdateWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata} message UpdateWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWorkerPoolsRequest.encode = function encode(message, writer) { + UpdateWorkerPoolOperationMetadata.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.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.completeTime != null && Object.hasOwnProperty.call(message, "completeTime")) + $root.google.protobuf.Timestamp.encode(message.completeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListWorkerPoolsRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsRequest.verify|verify} messages. + * Encodes the specified UpdateWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsRequest} message ListWorkerPoolsRequest message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata} message UpdateWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWorkerPoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateWorkerPoolOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer. + * Decodes an UpdateWorkerPoolOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata} UpdateWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWorkerPoolsRequest.decode = function decode(reader, length) { + UpdateWorkerPoolOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.workerPool = reader.string(); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -15837,108 +17072,136 @@ }; /** - * Decodes a ListWorkerPoolsRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata} UpdateWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWorkerPoolsRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateWorkerPoolOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWorkerPoolsRequest message. + * Verifies an UpdateWorkerPoolOperationMetadata message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWorkerPoolsRequest.verify = function verify(message) { + UpdateWorkerPoolOperationMetadata.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.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.completeTime != null && message.hasOwnProperty("completeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completeTime); + if (error) + return "completeTime." + error; + } return null; }; /** - * Creates a ListWorkerPoolsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} ListWorkerPoolsRequest + * @returns {google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata} UpdateWorkerPoolOperationMetadata */ - ListWorkerPoolsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest) + UpdateWorkerPoolOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest(); - if (object.parent != null) - message.parent = String(object.parent); + var message = new $root.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.completeTime != null) { + if (typeof object.completeTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata.completeTime: object expected"); + message.completeTime = $root.google.protobuf.Timestamp.fromObject(object.completeTime); + } return message; }; /** - * Creates a plain object from a ListWorkerPoolsRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateWorkerPoolOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsRequest} message ListWorkerPoolsRequest + * @param {google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata} message UpdateWorkerPoolOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWorkerPoolsRequest.toObject = function toObject(message, options) { + UpdateWorkerPoolOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; + if (options.defaults) { + object.workerPool = ""; + object.createTime = null; + object.completeTime = null; + } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.completeTime != null && message.hasOwnProperty("completeTime")) + object.completeTime = $root.google.protobuf.Timestamp.toObject(message.completeTime, options); return object; }; /** - * Converts this ListWorkerPoolsRequest to JSON. + * Converts this UpdateWorkerPoolOperationMetadata to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata * @instance * @returns {Object.} JSON object */ - ListWorkerPoolsRequest.prototype.toJSON = function toJSON() { + UpdateWorkerPoolOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListWorkerPoolsRequest; + return UpdateWorkerPoolOperationMetadata; })(); - v1.ListWorkerPoolsResponse = (function() { + v1.DeleteWorkerPoolOperationMetadata = (function() { /** - * Properties of a ListWorkerPoolsResponse. + * Properties of a DeleteWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @interface IListWorkerPoolsResponse - * @property {Array.|null} [workerPools] ListWorkerPoolsResponse workerPools + * @interface IDeleteWorkerPoolOperationMetadata + * @property {string|null} [workerPool] DeleteWorkerPoolOperationMetadata workerPool + * @property {google.protobuf.ITimestamp|null} [createTime] DeleteWorkerPoolOperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [completeTime] DeleteWorkerPoolOperationMetadata completeTime */ /** - * Constructs a new ListWorkerPoolsResponse. + * Constructs a new DeleteWorkerPoolOperationMetadata. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a ListWorkerPoolsResponse. - * @implements IListWorkerPoolsResponse + * @classdesc Represents a DeleteWorkerPoolOperationMetadata. + * @implements IDeleteWorkerPoolOperationMetadata * @constructor - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata=} [properties] Properties to set */ - function ListWorkerPoolsResponse(properties) { - this.workerPools = []; + function DeleteWorkerPoolOperationMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15946,78 +17209,101 @@ } /** - * ListWorkerPoolsResponse workerPools. - * @member {Array.} workerPools - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * DeleteWorkerPoolOperationMetadata workerPool. + * @member {string} workerPool + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @instance */ - ListWorkerPoolsResponse.prototype.workerPools = $util.emptyArray; + DeleteWorkerPoolOperationMetadata.prototype.workerPool = ""; /** - * Creates a new ListWorkerPoolsResponse instance using the specified properties. + * DeleteWorkerPoolOperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata + * @instance + */ + DeleteWorkerPoolOperationMetadata.prototype.createTime = null; + + /** + * DeleteWorkerPoolOperationMetadata completeTime. + * @member {google.protobuf.ITimestamp|null|undefined} completeTime + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata + * @instance + */ + DeleteWorkerPoolOperationMetadata.prototype.completeTime = null; + + /** + * Creates a new DeleteWorkerPoolOperationMetadata instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse instance + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata} DeleteWorkerPoolOperationMetadata instance */ - ListWorkerPoolsResponse.create = function create(properties) { - return new ListWorkerPoolsResponse(properties); + DeleteWorkerPoolOperationMetadata.create = function create(properties) { + return new DeleteWorkerPoolOperationMetadata(properties); }; /** - * Encodes the specified ListWorkerPoolsResponse message. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * Encodes the specified DeleteWorkerPoolOperationMetadata message. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata} message DeleteWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWorkerPoolsResponse.encode = function encode(message, writer) { + DeleteWorkerPoolOperationMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.workerPools != null && message.workerPools.length) - for (var i = 0; i < message.workerPools.length; ++i) - $root.google.devtools.cloudbuild.v1.WorkerPool.encode(message.workerPools[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.workerPool != null && Object.hasOwnProperty.call(message, "workerPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.workerPool); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.completeTime != null && Object.hasOwnProperty.call(message, "completeTime")) + $root.google.protobuf.Timestamp.encode(message.completeTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListWorkerPoolsResponse message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.verify|verify} messages. + * Encodes the specified DeleteWorkerPoolOperationMetadata message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.IListWorkerPoolsResponse} message ListWorkerPoolsResponse message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata} message DeleteWorkerPoolOperationMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListWorkerPoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + DeleteWorkerPoolOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer. + * Decodes a DeleteWorkerPoolOperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata} DeleteWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWorkerPoolsResponse.decode = function decode(reader, length) { + DeleteWorkerPoolOperationMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.workerPools && message.workerPools.length)) - message.workerPools = []; - message.workerPools.push($root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32())); + message.workerPool = reader.string(); + break; + case 2: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -16028,104 +17314,114 @@ }; /** - * Decodes a ListWorkerPoolsResponse message from the specified reader or buffer, length delimited. + * Decodes a DeleteWorkerPoolOperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata} DeleteWorkerPoolOperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListWorkerPoolsResponse.decodeDelimited = function decodeDelimited(reader) { + DeleteWorkerPoolOperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListWorkerPoolsResponse message. + * Verifies a DeleteWorkerPoolOperationMetadata message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListWorkerPoolsResponse.verify = function verify(message) { + DeleteWorkerPoolOperationMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.workerPools != null && message.hasOwnProperty("workerPools")) { - if (!Array.isArray(message.workerPools)) - return "workerPools: array expected"; - for (var i = 0; i < message.workerPools.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.WorkerPool.verify(message.workerPools[i]); - if (error) - return "workerPools." + error; - } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + if (!$util.isString(message.workerPool)) + return "workerPool: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.completeTime != null && message.hasOwnProperty("completeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completeTime); + if (error) + return "completeTime." + error; } return null; }; /** - * Creates a ListWorkerPoolsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteWorkerPoolOperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} ListWorkerPoolsResponse + * @returns {google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata} DeleteWorkerPoolOperationMetadata */ - ListWorkerPoolsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse) + DeleteWorkerPoolOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata) return object; - var message = new $root.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse(); - if (object.workerPools) { - if (!Array.isArray(object.workerPools)) - throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: array expected"); - message.workerPools = []; - for (var i = 0; i < object.workerPools.length; ++i) { - if (typeof object.workerPools[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse.workerPools: object expected"); - message.workerPools[i] = $root.google.devtools.cloudbuild.v1.WorkerPool.fromObject(object.workerPools[i]); - } + var message = new $root.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata(); + if (object.workerPool != null) + message.workerPool = String(object.workerPool); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.completeTime != null) { + if (typeof object.completeTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata.completeTime: object expected"); + message.completeTime = $root.google.protobuf.Timestamp.fromObject(object.completeTime); } return message; }; /** - * Creates a plain object from a ListWorkerPoolsResponse message. Also converts values to other types if specified. + * Creates a plain object from a DeleteWorkerPoolOperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @static - * @param {google.devtools.cloudbuild.v1.ListWorkerPoolsResponse} message ListWorkerPoolsResponse + * @param {google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata} message DeleteWorkerPoolOperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListWorkerPoolsResponse.toObject = function toObject(message, options) { + DeleteWorkerPoolOperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.workerPools = []; - if (message.workerPools && message.workerPools.length) { - object.workerPools = []; - for (var j = 0; j < message.workerPools.length; ++j) - object.workerPools[j] = $root.google.devtools.cloudbuild.v1.WorkerPool.toObject(message.workerPools[j], options); + if (options.defaults) { + object.workerPool = ""; + object.createTime = null; + object.completeTime = null; } + if (message.workerPool != null && message.hasOwnProperty("workerPool")) + object.workerPool = message.workerPool; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.completeTime != null && message.hasOwnProperty("completeTime")) + object.completeTime = $root.google.protobuf.Timestamp.toObject(message.completeTime, options); return object; }; /** - * Converts this ListWorkerPoolsResponse to JSON. + * Converts this DeleteWorkerPoolOperationMetadata to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata * @instance * @returns {Object.} JSON object */ - ListWorkerPoolsResponse.prototype.toJSON = function toJSON() { + DeleteWorkerPoolOperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListWorkerPoolsResponse; + return DeleteWorkerPoolOperationMetadata; })(); return v1; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index b5e6908170bd..f09d25225678 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -338,23 +338,121 @@ }, "CreateWorkerPool": { "requestType": "CreateWorkerPoolRequest", - "responseType": "WorkerPool" + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/workerPools", + "(google.api.http).body": "worker_pool", + "(google.api.method_signature)": "parent,worker_pool,worker_pool_id", + "(google.longrunning.operation_info).response_type": "WorkerPool", + "(google.longrunning.operation_info).metadata_type": "CreateWorkerPoolOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/workerPools", + "body": "worker_pool" + } + }, + { + "(google.api.method_signature)": "parent,worker_pool,worker_pool_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "WorkerPool", + "metadata_type": "CreateWorkerPoolOperationMetadata" + } + } + ] }, "GetWorkerPool": { "requestType": "GetWorkerPoolRequest", - "responseType": "WorkerPool" + "responseType": "WorkerPool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/workerPools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/workerPools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteWorkerPool": { "requestType": "DeleteWorkerPoolRequest", - "responseType": "google.protobuf.Empty" + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/workerPools/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "DeleteWorkerPoolOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/workerPools/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "DeleteWorkerPoolOperationMetadata" + } + } + ] }, "UpdateWorkerPool": { "requestType": "UpdateWorkerPoolRequest", - "responseType": "WorkerPool" + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}", + "(google.api.http).body": "worker_pool", + "(google.api.method_signature)": "worker_pool,update_mask", + "(google.longrunning.operation_info).response_type": "WorkerPool", + "(google.longrunning.operation_info).metadata_type": "UpdateWorkerPoolOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{worker_pool.name=projects/*/locations/*/workerPools/*}", + "body": "worker_pool" + } + }, + { + "(google.api.method_signature)": "worker_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "WorkerPool", + "metadata_type": "UpdateWorkerPoolOperationMetadata" + } + } + ] }, "ListWorkerPools": { "requestType": "ListWorkerPoolsRequest", - "responseType": "ListWorkerPoolsResponse" + "responseType": "ListWorkerPoolsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/workerPools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/workerPools" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -1590,7 +1688,17 @@ }, "workerPool": { "type": "string", - "id": 7 + "id": 7, + "options": { + "deprecated": true + } + }, + "pool": { + "type": "PoolOption", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "logging": { "type": "LoggingMode", @@ -1613,6 +1721,17 @@ } }, "nested": { + "PoolOption": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + } + } + }, "VerifyOption": { "values": { "NOT_VERIFIED": 0, @@ -1681,62 +1800,88 @@ "fields": {} }, "WorkerPool": { + "options": { + "(google.api.resource).type": "cloudbuild.googleapis.com/WorkerPool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workerPools/{worker_pool}", + "(google.api.resource).plural": "workerPools", + "(google.api.resource).singular": "workerPool", + "(google.api.resource).style": "DECLARATIVE_FRIENDLY" + }, + "oneofs": { + "config": { + "oneof": [ + "privatePoolV1Config" + ] + } + }, "fields": { "name": { "type": "string", - "id": 14 + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "projectId": { + "displayName": { "type": "string", "id": 2 }, - "serviceAccountEmail": { + "uid": { "type": "string", - "id": 3 + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "workerCount": { - "type": "int64", + "annotations": { + "keyType": "string", + "type": "string", "id": 4 }, - "workerConfig": { - "type": "WorkerConfig", - "id": 16 - }, - "regions": { - "rule": "repeated", - "type": "Region", - "id": 9 - }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 11 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 17 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "deleteTime": { "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "privatePoolV1Config": { + "type": "PrivatePoolV1Config", "id": 12 }, - "status": { - "type": "Status", - "id": 13 + "etag": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { - "Region": { - "values": { - "REGION_UNSPECIFIED": 0, - "US_CENTRAL1": 1, - "US_WEST1": 2, - "US_EAST1": 3, - "US_EAST4": 4 - } - }, - "Status": { + "State": { "values": { - "STATUS_UNSPECIFIED": 0, + "STATE_UNSPECIFIED": 0, "CREATING": 1, "RUNNING": 2, "DELETING": 3, @@ -1745,39 +1890,54 @@ } } }, - "WorkerConfig": { + "PrivatePoolV1Config": { "fields": { - "machineType": { - "type": "string", + "workerConfig": { + "type": "WorkerConfig", "id": 1 }, - "diskSizeGb": { - "type": "int64", + "networkConfig": { + "type": "NetworkConfig", "id": 2 - }, - "network": { - "type": "Network", - "id": 3 - }, - "tag": { - "type": "string", - "id": 4 } - } - }, - "Network": { - "fields": { - "projectId": { - "type": "string", - "id": 1 - }, - "network": { - "type": "string", - "id": 2 + }, + "nested": { + "WorkerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1 + }, + "diskSizeGb": { + "type": "int64", + "id": 2 + } + } }, - "subnetwork": { - "type": "string", - "id": 3 + "NetworkConfig": { + "fields": { + "peeredNetwork": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/Network" + } + }, + "egressOption": { + "type": "EgressOption", + "id": 2 + } + }, + "nested": { + "EgressOption": { + "values": { + "EGRESS_OPTION_UNSPECIFIED": 0, + "NO_PUBLIC_EGRESS": 1, + "PUBLIC_EGRESS": 2 + } + } + } } } }, @@ -1785,11 +1945,29 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } }, "workerPool": { "type": "WorkerPool", - "id": 2 + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "workerPoolId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "validateOnly": { + "type": "bool", + "id": 4 } } }, @@ -1797,7 +1975,11 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } } } }, @@ -1805,19 +1987,42 @@ "fields": { "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "etag": { + "type": "string", + "id": 2 + }, + "allowMissing": { + "type": "bool", + "id": 3 + }, + "validateOnly": { + "type": "bool", + "id": 4 } } }, "UpdateWorkerPoolRequest": { "fields": { - "name": { - "type": "string", - "id": 2 - }, "workerPool": { "type": "WorkerPool", - "id": 3 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "validateOnly": { + "type": "bool", + "id": 4 } } }, @@ -1825,7 +2030,19 @@ "fields": { "parent": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 } } }, @@ -1835,6 +2052,67 @@ "rule": "repeated", "type": "WorkerPool", "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateWorkerPoolOperationMetadata": { + "fields": { + "workerPool": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "completeTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "UpdateWorkerPoolOperationMetadata": { + "fields": { + "workerPool": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "completeTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DeleteWorkerPoolOperationMetadata": { + "fields": { + "workerPool": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "cloudbuild.googleapis.com/WorkerPool" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "completeTime": { + "type": "google.protobuf.Timestamp", + "id": 3 } } } diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index dd42cffd5bc7..099fc458aab4 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -170,6 +170,9 @@ export class CloudBuildClient { cryptoKeyPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}' ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), @@ -197,6 +200,9 @@ export class CloudBuildClient { topicPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/topics/{topic}' ), + workerPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workerPools/{worker_pool}' + ), }; // Some of the methods on this service return "paged" results, @@ -213,6 +219,11 @@ export class CloudBuildClient { 'nextPageToken', 'triggers' ), + listWorkerPools: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'workerPools' + ), }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); @@ -245,6 +256,24 @@ export class CloudBuildClient { const runBuildTriggerMetadata = protoFilesRoot.lookup( '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; + const createWorkerPoolResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.WorkerPool' + ) as gax.protobuf.Type; + const createWorkerPoolMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata' + ) as gax.protobuf.Type; + const deleteWorkerPoolResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteWorkerPoolMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata' + ) as gax.protobuf.Type; + const updateWorkerPoolResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.WorkerPool' + ) as gax.protobuf.Type; + const updateWorkerPoolMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { createBuild: new this._gaxModule.LongrunningDescriptor( @@ -262,6 +291,21 @@ export class CloudBuildClient { runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), runBuildTriggerMetadata.decode.bind(runBuildTriggerMetadata) ), + createWorkerPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createWorkerPoolResponse.decode.bind(createWorkerPoolResponse), + createWorkerPoolMetadata.decode.bind(createWorkerPoolMetadata) + ), + deleteWorkerPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteWorkerPoolResponse.decode.bind(deleteWorkerPoolResponse), + deleteWorkerPoolMetadata.decode.bind(deleteWorkerPoolMetadata) + ), + updateWorkerPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateWorkerPoolResponse.decode.bind(updateWorkerPoolResponse), + updateWorkerPoolMetadata.decode.bind(updateWorkerPoolMetadata) + ), }; // Put together the default options sent with requests. @@ -1128,95 +1172,6 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); } - createWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options?: CallOptions - ): Promise< - [ - protos.google.devtools.cloudbuild.v1.IWorkerPool, - protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest | undefined, - {} | undefined - ] - >; - createWorkerPool( - request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - options: CallOptions, - callback: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createWorkerPool( - request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - callback: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | null - | undefined, - {} | null | undefined - > - ): void; - /** - * Creates a `WorkerPool` to run the builds, and returns the new worker pool. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * ID of the parent project. - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool - * `WorkerPool` 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 [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * 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.createWorkerPool(request); - */ - createWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest - | null - | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.devtools.cloudbuild.v1.IWorkerPool, - protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest | undefined, - {} | undefined - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - this.initialize(); - return this.innerApiCalls.createWorkerPool(request, options, callback); - } getWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: CallOptions @@ -1249,15 +1204,13 @@ export class CloudBuildClient { > ): void; /** - * Returns information about a `WorkerPool`. - * - * This API is experimental. + * Returns details of a `WorkerPool`. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" + * Required. The name of the `WorkerPool` to retrieve. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1302,82 +1255,108 @@ export class CloudBuildClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); this.initialize(); return this.innerApiCalls.getWorkerPool(request, options, callback); } - deleteWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + + createBuild( + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: CallOptions ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - deleteWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + createBuild( + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options: CallOptions, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - deleteWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + createBuild( + request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * Deletes a `WorkerPool` by its project ID and WorkerPool name. + * Starts a build with the specified configuration. * - * This API is experimental. + * This method returns a long-running `Operation`, which includes the build + * ID. Pass the build ID to `GetBuild` to determine the build status (such as + * `SUCCESS` or `FAILURE`). * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" + * @param {string} request.parent + * The parent resource where this build will be created. + * Format: `projects/{project}/locations/{location}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {google.devtools.cloudbuild.v1.Build} request.build + * Required. Build 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 [Empty]{@link google.protobuf.Empty}. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [response] = await client.deleteWorkerPool(request); + * const [operation] = await client.createBuild(request); + * const [response] = await operation.promise(); */ - deleteWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, + createBuild( + request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.protobuf.IEmpty, - | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.protobuf.IEmpty, - protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1390,84 +1369,167 @@ export class CloudBuildClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + parent: request.parent || '', + }); this.initialize(); - return this.innerApiCalls.deleteWorkerPool(request, options, callback); + return this.innerApiCalls.createBuild(request, options, callback); } - updateWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + /** + * Check the status of the long running operation returned by `createBuild()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateBuildProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createBuild, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } + retryBuild( + request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options?: CallOptions ): Promise< [ - protos.google.devtools.cloudbuild.v1.IWorkerPool, - protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - updateWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + retryBuild( + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, options: CallOptions, callback: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - updateWorkerPool( - request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + retryBuild( + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, callback: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * Update a `WorkerPool`. + * Creates a new build based on the specified build. * - * This API is experimental. + * This method creates a new build using the original build request, which may + * or may not result in an identical build. + * + * For triggered builds: + * + * * Triggered builds resolve to a precise revision; therefore a retry of a + * triggered build will result in a build that uses the same revision. + * + * For non-triggered builds that specify `RepoSource`: + * + * * If the original build built from the tip of a branch, the retried build + * will build from the tip of that branch, which may not be the same revision + * as the original build. + * * If the original build specified a commit sha or revision ID, the retried + * build will use the identical source. + * + * For builds that specify `StorageSource`: + * + * * If the original build pulled source from Google Cloud Storage without + * specifying the generation of the object, the new build will use the current + * object, which may be different from the original build source. + * * If the original build pulled source from Cloud Storage and specified the + * generation of the object, the new build will attempt to use the same + * object, which may or may not be available depending on the bucket's + * lifecycle management settings. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The field will contain name of the resource requested, for example: - * "projects/project-1/workerPools/workerpool-name" - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool - * `WorkerPool` resource to update. + * The name of the `Build` to retry. + * Format: `projects/{project}/locations/{location}/builds/{build}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. Build ID of the original build. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [response] = await client.updateWorkerPool(request); + * const [operation] = await client.retryBuild(request); + * const [response] = await operation.promise(); */ - updateWorkerPool( - request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, + retryBuild( + request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.devtools.cloudbuild.v1.IWorkerPool, - | protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.devtools.cloudbuild.v1.IWorkerPool, - protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1480,81 +1542,143 @@ export class CloudBuildClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + name: request.name || '', + }); this.initialize(); - return this.innerApiCalls.updateWorkerPool(request, options, callback); + return this.innerApiCalls.retryBuild(request, options, callback); } - listWorkerPools( - request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + /** + * Check the status of the long running operation returned by `retryBuild()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRetryBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRetryBuildProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.retryBuild, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } + runBuildTrigger( + request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: CallOptions ): Promise< [ - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - listWorkerPools( - request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + runBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options: CallOptions, callback: Callback< - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - listWorkerPools( - request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + runBuildTrigger( + request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, callback: Callback< - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * List project's `WorkerPools`. - * - * This API is experimental. + * Runs a `BuildTrigger` at a particular source revision. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * ID of the parent project. + * @param {string} request.name + * The name of the `Trigger` to run. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.triggerId + * Required. ID of the trigger. + * @param {google.devtools.cloudbuild.v1.RepoSource} request.source + * Source to build against this trigger. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ListWorkerPoolsResponse]{@link google.devtools.cloudbuild.v1.ListWorkerPoolsResponse}. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [response] = await client.listWorkerPools(request); + * const [operation] = await client.runBuildTrigger(request); + * const [response] = await operation.promise(); */ - listWorkerPools( - request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + runBuildTrigger( + request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: | CallOptions | Callback< - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest - | null - | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): Promise< [ - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse, - protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | undefined, + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, {} | undefined ] > | void { @@ -1567,62 +1691,108 @@ export class CloudBuildClient { options = optionsOrCallback as CallOptions; } options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + project_id: request.projectId || '', + name: request.name || '', + }); this.initialize(); - return this.innerApiCalls.listWorkerPools(request, options, callback); + return this.innerApiCalls.runBuildTrigger(request, options, callback); } - - createBuild( - request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + /** + * Check the status of the long running operation returned by `runBuildTrigger()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRunBuildTriggerProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkRunBuildTriggerProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.runBuildTrigger, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } + createWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - createBuild( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + createWorkerPool( + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - createBuild( - request: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + createWorkerPool( + request: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * Starts a build with the specified configuration. - * - * This method returns a long-running `Operation`, which includes the build - * ID. Pass the build ID to `GetBuild` to determine the build status (such as - * `SUCCESS` or `FAILURE`). + * Creates a `WorkerPool`. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * The parent resource where this build will be created. - * Format: `projects/{project}/locations/{location}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {google.devtools.cloudbuild.v1.Build} request.build - * Required. Build resource to create. + * Required. The parent resource where this worker pool will be created. + * Format: `projects/{project}/locations/{location}`. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool + * Required. `WorkerPool` resource to create. + * @param {string} request.workerPoolId + * Required. Immutable. The ID to use for the `WorkerPool`, which will become + * the final component of the resource name. + * + * This value should be 1-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1633,25 +1803,25 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [operation] = await client.createBuild(request); + * const [operation] = await client.createWorkerPool(request); * const [response] = await operation.promise(); */ - createBuild( - request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, + createWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -1659,8 +1829,8 @@ export class CloudBuildClient { ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined @@ -1679,14 +1849,13 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.createBuild(request, options, callback); + return this.innerApiCalls.createWorkerPool(request, options, callback); } /** - * Check the status of the long running operation returned by `createBuild()`. + * Check the status of the long running operation returned by `createWorkerPool()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1695,17 +1864,17 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const decodedOperation = await checkCreateBuildProgress(name); + * const decodedOperation = await checkCreateWorkerPoolProgress(name); * console.log(decodedOperation.result); * console.log(decodedOperation.done); * console.log(decodedOperation.metadata); */ - async checkCreateBuildProgress( + async checkCreateWorkerPoolProgress( name: string ): Promise< LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.devtools.cloudbuild.v1.WorkerPool, + protos.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata > > { const request = new operationsProtos.google.longrunning.GetOperationRequest( @@ -1714,88 +1883,68 @@ export class CloudBuildClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new gax.Operation( operation, - this.descriptors.longrunning.createBuild, + this.descriptors.longrunning.createWorkerPool, gax.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.devtools.cloudbuild.v1.WorkerPool, + protos.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata >; } - retryBuild( - request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + deleteWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + deleteWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + deleteWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * Creates a new build based on the specified build. - * - * This method creates a new build using the original build request, which may - * or may not result in an identical build. - * - * For triggered builds: - * - * * Triggered builds resolve to a precise revision; therefore a retry of a - * triggered build will result in a build that uses the same revision. - * - * For non-triggered builds that specify `RepoSource`: - * - * * If the original build built from the tip of a branch, the retried build - * will build from the tip of that branch, which may not be the same revision - * as the original build. - * * If the original build specified a commit sha or revision ID, the retried - * build will use the identical source. - * - * For builds that specify `StorageSource`: - * - * * If the original build pulled source from Google Cloud Storage without - * specifying the generation of the object, the new build will use the current - * object, which may be different from the original build source. - * * If the original build pulled source from Cloud Storage and specified the - * generation of the object, the new build will attempt to use the same - * object, which may or may not be available depending on the bucket's - * lifecycle management settings. + * Deletes a `WorkerPool`. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * The name of the `Build` to retry. - * Format: `projects/{project}/locations/{location}/builds/{build}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. Build ID of the original build. + * Required. The name of the `WorkerPool` to delete. + * Format: + * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + * @param {string} request.etag + * Optional. If this is provided, it must match the server's etag on the + * workerpool for the request to be processed. + * @param {boolean} request.allowMissing + * If set to true, and the `WorkerPool` is not found, the request will succeed + * but no action will be taken on the server. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1806,25 +1955,25 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [operation] = await client.retryBuild(request); + * const [operation] = await client.deleteWorkerPool(request); * const [response] = await operation.promise(); */ - retryBuild( - request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + deleteWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -1832,8 +1981,8 @@ export class CloudBuildClient { ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined @@ -1852,14 +2001,13 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', name: request.name || '', }); this.initialize(); - return this.innerApiCalls.retryBuild(request, options, callback); + return this.innerApiCalls.deleteWorkerPool(request, options, callback); } /** - * Check the status of the long running operation returned by `retryBuild()`. + * Check the status of the long running operation returned by `deleteWorkerPool()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -1868,17 +2016,17 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const decodedOperation = await checkRetryBuildProgress(name); + * const decodedOperation = await checkDeleteWorkerPoolProgress(name); * console.log(decodedOperation.result); * console.log(decodedOperation.done); * console.log(decodedOperation.metadata); */ - async checkRetryBuildProgress( + async checkDeleteWorkerPoolProgress( name: string ): Promise< LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata > > { const request = new operationsProtos.google.longrunning.GetOperationRequest( @@ -1887,64 +2035,65 @@ export class CloudBuildClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new gax.Operation( operation, - this.descriptors.longrunning.retryBuild, + this.descriptors.longrunning.deleteWorkerPool, gax.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.protobuf.Empty, + protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata >; } - runBuildTrigger( - request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + updateWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: CallOptions ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined ] >; - runBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + updateWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options: CallOptions, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; - runBuildTrigger( - request: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + updateWorkerPool( + request: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, callback: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > ): void; /** - * Runs a `BuildTrigger` at a particular source revision. + * Updates a `WorkerPool`. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * The name of the `Trigger` to run. - * Format: `projects/{project}/locations/{location}/triggers/{trigger}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.triggerId - * Required. ID of the trigger. - * @param {google.devtools.cloudbuild.v1.RepoSource} request.source - * Source to build against this trigger. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool + * Required. The `WorkerPool` to update. + * + * The `name` field is used to identify the `WorkerPool` to update. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + * @param {google.protobuf.FieldMask} request.updateMask + * A mask specifying which fields in `worker_pool` to update. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1955,25 +2104,25 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const [operation] = await client.runBuildTrigger(request); + * const [operation] = await client.updateWorkerPool(request); * const [response] = await operation.promise(); */ - runBuildTrigger( - request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, + updateWorkerPool( + request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: | CallOptions | Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined >, callback?: Callback< LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined @@ -1981,8 +2130,8 @@ export class CloudBuildClient { ): Promise< [ LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata >, protos.google.longrunning.IOperation | undefined, {} | undefined @@ -2001,14 +2150,13 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ - project_id: request.projectId || '', - name: request.name || '', + 'worker_pool.name': request.workerPool!.name || '', }); this.initialize(); - return this.innerApiCalls.runBuildTrigger(request, options, callback); + return this.innerApiCalls.updateWorkerPool(request, options, callback); } /** - * Check the status of the long running operation returned by `runBuildTrigger()`. + * Check the status of the long running operation returned by `updateWorkerPool()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. @@ -2017,17 +2165,17 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. * @example - * const decodedOperation = await checkRunBuildTriggerProgress(name); + * const decodedOperation = await checkUpdateWorkerPoolProgress(name); * console.log(decodedOperation.result); * console.log(decodedOperation.done); * console.log(decodedOperation.metadata); */ - async checkRunBuildTriggerProgress( + async checkUpdateWorkerPoolProgress( name: string ): Promise< LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.devtools.cloudbuild.v1.WorkerPool, + protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata > > { const request = new operationsProtos.google.longrunning.GetOperationRequest( @@ -2036,12 +2184,12 @@ export class CloudBuildClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new gax.Operation( operation, - this.descriptors.longrunning.runBuildTrigger, + this.descriptors.longrunning.updateWorkerPool, gax.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.devtools.cloudbuild.v1.Build, - protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + protos.google.devtools.cloudbuild.v1.WorkerPool, + protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata >; } listBuilds( @@ -2485,6 +2633,206 @@ export class CloudBuildClient { callSettings ) as AsyncIterable; } + listWorkerPools( + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v1.IWorkerPool[], + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | null, + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + ] + >; + listWorkerPools( + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IWorkerPool + > + ): void; + listWorkerPools( + request: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IWorkerPool + > + ): void; + /** + * Lists `WorkerPool`s. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the collection of `WorkerPools`. + * Format: `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of `WorkerPool`s to return. The service may return + * fewer than this value. If omitted, the server will use a sensible default. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkerPools` call. Provide this + * to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkerPoolsAsync()` + * 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. + */ + listWorkerPools( + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IWorkerPool + >, + callback?: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + | protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IWorkerPool + > + ): Promise< + [ + protos.google.devtools.cloudbuild.v1.IWorkerPool[], + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest | null, + protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + this.initialize(); + return this.innerApiCalls.listWorkerPools(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 of the collection of `WorkerPools`. + * Format: `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of `WorkerPool`s to return. The service may return + * fewer than this value. If omitted, the server will use a sensible default. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkerPools` call. Provide this + * to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listWorkerPoolsAsync()` + * 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. + */ + listWorkerPoolsStream( + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listWorkerPools.createStream( + this.innerApiCalls.listWorkerPools as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listWorkerPools`, 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 of the collection of `WorkerPools`. + * Format: `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of `WorkerPool`s to return. The service may return + * fewer than this value. If omitted, the server will use a sensible default. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkerPools` call. Provide this + * to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example + * const iterable = client.listWorkerPoolsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listWorkerPoolsAsync( + request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + parent: request.parent || '', + }); + options = options || {}; + const callSettings = new gax.CallSettings(options); + this.initialize(); + return this.descriptors.page.listWorkerPools.asyncIterate( + this.innerApiCalls['listWorkerPools'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } // -------------------- // -- Path templates -- // -------------------- @@ -2559,6 +2907,42 @@ export class CloudBuildClient { return this.pathTemplates.cryptoKeyPathTemplate.match(cryptoKeyName).key; } + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + /** * Return a fully-qualified project resource name string. * @@ -2946,6 +3330,58 @@ export class CloudBuildClient { return this.pathTemplates.topicPathTemplate.match(topicName).topic; } + /** + * Return a fully-qualified workerPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} worker_pool + * @returns {string} Resource name string. + */ + workerPoolPath(project: string, location: string, workerPool: string) { + return this.pathTemplates.workerPoolPathTemplate.render({ + project: project, + location: location, + worker_pool: workerPool, + }); + } + + /** + * Parse the project from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .project; + } + + /** + * Parse the location from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .location; + } + + /** + * Parse the worker_pool from WorkerPool resource. + * + * @param {string} workerPoolName + * A fully-qualified path representing WorkerPool resource. + * @returns {string} A string representing the worker_pool. + */ + matchWorkerPoolFromWorkerPoolName(workerPoolName: string) { + return this.pathTemplates.workerPoolPathTemplate.match(workerPoolName) + .worker_pool; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json index 13b205799017..254f6186caf0 100644 --- a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json +++ b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json @@ -45,44 +45,39 @@ "receiveTriggerWebhook" ] }, - "CreateWorkerPool": { - "methods": [ - "createWorkerPool" - ] - }, "GetWorkerPool": { "methods": [ "getWorkerPool" ] }, - "DeleteWorkerPool": { + "CreateBuild": { "methods": [ - "deleteWorkerPool" + "createBuild" ] }, - "UpdateWorkerPool": { + "RetryBuild": { "methods": [ - "updateWorkerPool" + "retryBuild" ] }, - "ListWorkerPools": { + "RunBuildTrigger": { "methods": [ - "listWorkerPools" + "runBuildTrigger" ] }, - "CreateBuild": { + "CreateWorkerPool": { "methods": [ - "createBuild" + "createWorkerPool" ] }, - "RetryBuild": { + "DeleteWorkerPool": { "methods": [ - "retryBuild" + "deleteWorkerPool" ] }, - "RunBuildTrigger": { + "UpdateWorkerPool": { "methods": [ - "runBuildTrigger" + "updateWorkerPool" ] }, "ListBuilds": { @@ -98,6 +93,13 @@ "listBuildTriggersStream", "listBuildTriggersAsync" ] + }, + "ListWorkerPools": { + "methods": [ + "listWorkerPools", + "listWorkerPoolsStream", + "listWorkerPoolsAsync" + ] } } }, @@ -139,44 +141,39 @@ "receiveTriggerWebhook" ] }, - "CreateWorkerPool": { - "methods": [ - "createWorkerPool" - ] - }, "GetWorkerPool": { "methods": [ "getWorkerPool" ] }, - "DeleteWorkerPool": { + "CreateBuild": { "methods": [ - "deleteWorkerPool" + "createBuild" ] }, - "UpdateWorkerPool": { + "RetryBuild": { "methods": [ - "updateWorkerPool" + "retryBuild" ] }, - "ListWorkerPools": { + "RunBuildTrigger": { "methods": [ - "listWorkerPools" + "runBuildTrigger" ] }, - "CreateBuild": { + "CreateWorkerPool": { "methods": [ - "createBuild" + "createWorkerPool" ] }, - "RetryBuild": { + "DeleteWorkerPool": { "methods": [ - "retryBuild" + "deleteWorkerPool" ] }, - "RunBuildTrigger": { + "UpdateWorkerPool": { "methods": [ - "runBuildTrigger" + "updateWorkerPool" ] }, "ListBuilds": { @@ -192,6 +189,13 @@ "listBuildTriggersStream", "listBuildTriggersAsync" ] + }, + "ListWorkerPools": { + "methods": [ + "listWorkerPools", + "listWorkerPoolsStream", + "listWorkerPoolsAsync" + ] } } } diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 34f27006c0dd..40c4d457c44d 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -1030,47 +1030,63 @@ describe('v1.CloudBuildClient', () => { }); }); - describe('createWorkerPool', () => { - it('invokes createWorkerPool without error', async () => { + describe('getWorkerPool', () => { + it('invokes getWorkerPool without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); - client.innerApiCalls.createWorkerPool = stubSimpleCall(expectedResponse); - const [response] = await client.createWorkerPool(request); + client.innerApiCalls.getWorkerPool = stubSimpleCall(expectedResponse); + const [response] = await client.getWorkerPool(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createWorkerPool as SinonStub) + (client.innerApiCalls.getWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes createWorkerPool without error using callback', async () => { + it('invokes getWorkerPool without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); - client.innerApiCalls.createWorkerPool = + client.innerApiCalls.getWorkerPool = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createWorkerPool( + client.getWorkerPool( request, ( err?: Error | null, @@ -1087,81 +1103,111 @@ describe('v1.CloudBuildClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createWorkerPool as SinonStub) + (client.innerApiCalls.getWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes createWorkerPool with error', async () => { + it('invokes getWorkerPool with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const expectedOptions = {}; + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.innerApiCalls.createWorkerPool = stubSimpleCall( + client.innerApiCalls.getWorkerPool = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.createWorkerPool(request), expectedError); + await assert.rejects(client.getWorkerPool(request), expectedError); assert( - (client.innerApiCalls.createWorkerPool as SinonStub) + (client.innerApiCalls.getWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); }); - describe('getWorkerPool', () => { - it('invokes getWorkerPool without error', async () => { + describe('createBuild', () => { + it('invokes createBuild without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.WorkerPool() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getWorkerPool = stubSimpleCall(expectedResponse); - const [response] = await client.getWorkerPool(request); + client.innerApiCalls.createBuild = stubLongRunningCall(expectedResponse); + const [operation] = await client.createBuild(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getWorkerPool as SinonStub) + (client.innerApiCalls.createBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes getWorkerPool without error using callback', async () => { + it('invokes createBuild without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.WorkerPool() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.getWorkerPool = - stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.createBuild = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getWorkerPool( + client.createBuild( request, ( err?: Error | null, - result?: protos.google.devtools.cloudbuild.v1.IWorkerPool | null + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null ) => { if (err) { reject(err); @@ -1171,171 +1217,191 @@ describe('v1.CloudBuildClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.getWorkerPool as SinonStub) + (client.innerApiCalls.createBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes getWorkerPool with error', async () => { + it('invokes createBuild with call error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.innerApiCalls.getWorkerPool = stubSimpleCall( + client.innerApiCalls.createBuild = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.getWorkerPool(request), expectedError); + await assert.rejects(client.createBuild(request), expectedError); assert( - (client.innerApiCalls.getWorkerPool as SinonStub) + (client.innerApiCalls.createBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - }); - describe('deleteWorkerPool', () => { - it('invokes deleteWorkerPool without error', async () => { + it('invokes createBuild with LRO error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createBuild = stubLongRunningCall( + undefined, + undefined, + expectedError ); - client.innerApiCalls.deleteWorkerPool = stubSimpleCall(expectedResponse); - const [response] = await client.deleteWorkerPool(request); - assert.deepStrictEqual(response, expectedResponse); + const [operation] = await client.createBuild(request); + await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) + (client.innerApiCalls.createBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes deleteWorkerPool without error using callback', async () => { + it('invokes checkCreateBuildProgress without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() - ); - const expectedOptions = {}; const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() + new operationsProtos.google.longrunning.Operation() ); - client.innerApiCalls.deleteWorkerPool = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteWorkerPool( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateBuildProgress( + expectedResponse.name ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes deleteWorkerPool with error', async () => { + it('invokes checkCreateBuildProgress with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() - ); - const expectedOptions = {}; const expectedError = new Error('expected'); - client.innerApiCalls.deleteWorkerPool = stubSimpleCall( + + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.deleteWorkerPool(request), expectedError); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + await assert.rejects(client.checkCreateBuildProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('updateWorkerPool', () => { - it('invokes updateWorkerPool without error', async () => { + describe('retryBuild', () => { + it('invokes retryBuild without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.WorkerPool() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateWorkerPool = stubSimpleCall(expectedResponse); - const [response] = await client.updateWorkerPool(request); + client.innerApiCalls.retryBuild = stubLongRunningCall(expectedResponse); + const [operation] = await client.retryBuild(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) + (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes updateWorkerPool without error using callback', async () => { + it('invokes retryBuild without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.WorkerPool() + new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateWorkerPool = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateWorkerPool( + client.innerApiCalls.retryBuild = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.retryBuild( request, ( err?: Error | null, - result?: protos.google.devtools.cloudbuild.v1.IWorkerPool | null + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null ) => { if (err) { reject(err); @@ -1345,139 +1411,137 @@ describe('v1.CloudBuildClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) + (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes updateWorkerPool with error', async () => { + it('invokes retryBuild with call error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; const expectedError = new Error('expected'); - client.innerApiCalls.updateWorkerPool = stubSimpleCall( + client.innerApiCalls.retryBuild = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.updateWorkerPool(request), expectedError); + await assert.rejects(client.retryBuild(request), expectedError); assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) + (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - }); - describe('listWorkerPools', () => { - it('invokes listWorkerPools without error', async () => { + it('invokes retryBuild with LRO error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() + new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const expectedOptions = {}; - const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse() + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.retryBuild = stubLongRunningCall( + undefined, + undefined, + expectedError ); - client.innerApiCalls.listWorkerPools = stubSimpleCall(expectedResponse); - const [response] = await client.listWorkerPools(request); - assert.deepStrictEqual(response, expectedResponse); + const [operation] = await client.retryBuild(request); + await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.listWorkerPools as SinonStub) + (client.innerApiCalls.retryBuild as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listWorkerPools without error using callback', async () => { + it('invokes checkRetryBuildProgress without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() - ); - const expectedOptions = {}; const expectedResponse = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsResponse() + new operationsProtos.google.longrunning.Operation() ); - client.innerApiCalls.listWorkerPools = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listWorkerPools( - request, - ( - err?: Error | null, - result?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsResponse | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkerPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRetryBuildProgress( + expectedResponse.name ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes listWorkerPools with error', async () => { + it('invokes checkRetryBuildProgress with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() - ); - const expectedOptions = {}; const expectedError = new Error('expected'); - client.innerApiCalls.listWorkerPools = stubSimpleCall( + + client.operationsClient.getOperation = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listWorkerPools(request), expectedError); - assert( - (client.innerApiCalls.listWorkerPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + await assert.rejects(client.checkRetryBuildProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('createBuild', () => { - it('invokes createBuild without error', async () => { + describe('runBuildTrigger', () => { + it('invokes runBuildTrigger without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1488,29 +1552,30 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createBuild = stubLongRunningCall(expectedResponse); - const [operation] = await client.createBuild(request); + client.innerApiCalls.runBuildTrigger = + stubLongRunningCall(expectedResponse); + const [operation] = await client.runBuildTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createBuild as SinonStub) + (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes createBuild without error using callback', async () => { + it('invokes runBuildTrigger without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1521,10 +1586,10 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createBuild = + client.innerApiCalls.runBuildTrigger = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createBuild( + client.runBuildTrigger( request, ( err?: Error | null, @@ -1548,24 +1613,24 @@ describe('v1.CloudBuildClient', () => { const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.createBuild as SinonStub) + (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes createBuild with call error', async () => { + it('invokes runBuildTrigger with call error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1574,30 +1639,30 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createBuild = stubLongRunningCall( + client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.createBuild(request), expectedError); + await assert.rejects(client.runBuildTrigger(request), expectedError); assert( - (client.innerApiCalls.createBuild as SinonStub) + (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes createBuild with LRO error', async () => { + it('invokes runBuildTrigger with LRO error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() + new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1606,21 +1671,21 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.createBuild = stubLongRunningCall( + client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.createBuild(request); + const [operation] = await client.runBuildTrigger(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.createBuild as SinonStub) + (client.innerApiCalls.runBuildTrigger as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes checkCreateBuildProgress without error', async () => { + it('invokes checkRunBuildTriggerProgress without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1634,7 +1699,7 @@ describe('v1.CloudBuildClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateBuildProgress( + const decodedOperation = await client.checkRunBuildTriggerProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1642,7 +1707,7 @@ describe('v1.CloudBuildClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkCreateBuildProgress with error', async () => { + it('invokes checkRunBuildTriggerProgress with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1654,24 +1719,26 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(client.checkCreateBuildProgress(''), expectedError); + await assert.rejects( + client.checkRunBuildTriggerProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('retryBuild', () => { - it('invokes retryBuild without error', async () => { + describe('createWorkerPool', () => { + it('invokes createWorkerPool without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.projectId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -1682,29 +1749,29 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.retryBuild = stubLongRunningCall(expectedResponse); - const [operation] = await client.retryBuild(request); + client.innerApiCalls.createWorkerPool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.createWorkerPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.retryBuild as SinonStub) + (client.innerApiCalls.createWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes retryBuild without error using callback', async () => { + it('invokes createWorkerPool without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.projectId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -1715,16 +1782,16 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.retryBuild = + client.innerApiCalls.createWorkerPool = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.retryBuild( + client.createWorkerPool( request, ( err?: Error | null, result?: LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata > | null ) => { if (err) { @@ -1736,30 +1803,29 @@ describe('v1.CloudBuildClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.retryBuild as SinonStub) + (client.innerApiCalls.createWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes retryBuild with call error', async () => { + it('invokes createWorkerPool with call error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.projectId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -1768,30 +1834,29 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.retryBuild = stubLongRunningCall( + client.innerApiCalls.createWorkerPool = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.retryBuild(request), expectedError); + await assert.rejects(client.createWorkerPool(request), expectedError); assert( - (client.innerApiCalls.retryBuild as SinonStub) + (client.innerApiCalls.createWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes retryBuild with LRO error', async () => { + it('invokes createWorkerPool with LRO error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() + new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.projectId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -1800,21 +1865,21 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.retryBuild = stubLongRunningCall( + client.innerApiCalls.createWorkerPool = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.retryBuild(request); + const [operation] = await client.createWorkerPool(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.retryBuild as SinonStub) + (client.innerApiCalls.createWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes checkRetryBuildProgress without error', async () => { + it('invokes checkCreateWorkerPoolProgress without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1828,7 +1893,7 @@ describe('v1.CloudBuildClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRetryBuildProgress( + const decodedOperation = await client.checkCreateWorkerPoolProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -1836,7 +1901,7 @@ describe('v1.CloudBuildClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkRetryBuildProgress with error', async () => { + it('invokes checkCreateWorkerPoolProgress with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -1848,24 +1913,26 @@ describe('v1.CloudBuildClient', () => { undefined, expectedError ); - await assert.rejects(client.checkRetryBuildProgress(''), expectedError); + await assert.rejects( + client.checkCreateWorkerPoolProgress(''), + expectedError + ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); }); - describe('runBuildTrigger', () => { - it('invokes runBuildTrigger without error', async () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ + describe('deleteWorkerPool', () => { + it('invokes deleteWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1876,30 +1943,29 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.runBuildTrigger = + client.innerApiCalls.deleteWorkerPool = stubLongRunningCall(expectedResponse); - const [operation] = await client.runBuildTrigger(request); + const [operation] = await client.deleteWorkerPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) + (client.innerApiCalls.deleteWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes runBuildTrigger without error using callback', async () => { + it('invokes deleteWorkerPool without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1910,16 +1976,16 @@ describe('v1.CloudBuildClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.runBuildTrigger = + client.innerApiCalls.deleteWorkerPool = stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.runBuildTrigger( + client.deleteWorkerPool( request, ( err?: Error | null, result?: LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata > | null ) => { if (err) { @@ -1931,30 +1997,29 @@ describe('v1.CloudBuildClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + protos.google.protobuf.IEmpty, + protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolOperationMetadata >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) + (client.innerApiCalls.deleteWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes runBuildTrigger with call error', async () => { + it('invokes deleteWorkerPool with call error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1963,30 +2028,29 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.runBuildTrigger = stubLongRunningCall( + client.innerApiCalls.deleteWorkerPool = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.runBuildTrigger(request), expectedError); + await assert.rejects(client.deleteWorkerPool(request), expectedError); assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) + (client.innerApiCalls.deleteWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes runBuildTrigger with LRO error', async () => { + it('invokes deleteWorkerPool with LRO error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() + new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'name='; const expectedOptions = { otherArgs: { headers: { @@ -1995,21 +2059,21 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.runBuildTrigger = stubLongRunningCall( + client.innerApiCalls.deleteWorkerPool = stubLongRunningCall( undefined, undefined, expectedError ); - const [operation] = await client.runBuildTrigger(request); + const [operation] = await client.deleteWorkerPool(request); await assert.rejects(operation.promise(), expectedError); assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) + (client.innerApiCalls.deleteWorkerPool as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes checkRunBuildTriggerProgress without error', async () => { + it('invokes checkDeleteWorkerPoolProgress without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2023,7 +2087,7 @@ describe('v1.CloudBuildClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRunBuildTriggerProgress( + const decodedOperation = await client.checkDeleteWorkerPoolProgress( expectedResponse.name ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); @@ -2031,7 +2095,7 @@ describe('v1.CloudBuildClient', () => { assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkRunBuildTriggerProgress with error', async () => { + it('invokes checkDeleteWorkerPoolProgress with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', @@ -2044,7 +2108,205 @@ describe('v1.CloudBuildClient', () => { expectedError ); await assert.rejects( - client.checkRunBuildTriggerProgress(''), + client.checkDeleteWorkerPoolProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateWorkerPool', () => { + it('invokes updateWorkerPool without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + request.workerPool = {}; + request.workerPool.name = ''; + const expectedHeaderRequestParams = 'worker_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateWorkerPool = + stubLongRunningCall(expectedResponse); + const [operation] = await client.updateWorkerPool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateWorkerPool without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + request.workerPool = {}; + request.workerPool.name = ''; + const expectedHeaderRequestParams = 'worker_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateWorkerPool = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateWorkerPool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IWorkerPool, + protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateWorkerPool with call error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + request.workerPool = {}; + request.workerPool.name = ''; + const expectedHeaderRequestParams = 'worker_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateWorkerPool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateWorkerPool(request), expectedError); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateWorkerPool with LRO error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() + ); + request.workerPool = {}; + request.workerPool.name = ''; + const expectedHeaderRequestParams = 'worker_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateWorkerPool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateWorkerPool(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateWorkerPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateWorkerPoolProgress without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateWorkerPoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateWorkerPoolProgress with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateWorkerPoolProgress(''), expectedError ); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); @@ -2237,10 +2499,320 @@ describe('v1.CloudBuildClient', () => { ); const stream = client.listBuildsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.cloudbuild.v1.Build[] = []; + const responses: protos.google.devtools.cloudbuild.v1.Build[] = []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.Build) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listBuilds.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuilds, request) + ); + assert.strictEqual( + (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listBuilds without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedResponse = [ + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + ]; + client.descriptors.page.listBuilds.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; + const iterable = client.listBuildsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listBuilds with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listBuildsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listBuildTriggers', () => { + it('invokes listBuildTriggers without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.innerApiCalls.listBuildTriggers = stubSimpleCall(expectedResponse); + const [response] = await client.listBuildTriggers(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuildTriggers without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.innerApiCalls.listBuildTriggers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBuildTriggers( + request, + ( + err?: Error | null, + result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listBuildTriggers with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listBuildTriggers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listBuildTriggers(request), expectedError); + assert( + (client.innerApiCalls.listBuildTriggers as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listBuildTriggersStream without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + ]; + client.descriptors.page.listBuildTriggers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listBuildTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = + []; + stream.on( + 'data', + (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { + 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.listBuildTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listBuildTriggers, request) + ); + assert.strictEqual( + ( + client.descriptors.page.listBuildTriggers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listBuildTriggersStream with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listBuildTriggers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listBuildTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = + []; stream.on( 'data', - (response: protos.google.devtools.cloudbuild.v1.Build) => { + (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { responses.push(response); } ); @@ -2253,109 +2825,114 @@ describe('v1.CloudBuildClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBuilds.createStream as SinonStub) + (client.descriptors.page.listBuildTriggers.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuilds, request) + .calledWith(client.innerApiCalls.listBuildTriggers, request) ); assert.strictEqual( - (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listBuildTriggers.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuilds without error', async () => { + it('uses async iteration with listBuildTriggers without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; request.parent = ''; const expectedHeaderRequestParams = 'project_id=&parent='; const expectedResponse = [ - generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), - generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), - generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), + generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.BuildTrigger() + ), ]; - client.descriptors.page.listBuilds.asyncIterate = + client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; - const iterable = client.listBuildsAsync(request); + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = + []; + const iterable = client.listBuildTriggersAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuilds with error', async () => { + it('uses async iteration with listBuildTriggers with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() + new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); request.projectId = ''; request.parent = ''; const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('expected'); - client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); - const iterable = client.listBuildsAsync(request); + client.descriptors.page.listBuildTriggers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBuildTriggersAsync(request); await assert.rejects(async () => { - const responses: protos.google.devtools.cloudbuild.v1.IBuild[] = []; + const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[1], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], + ( + client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); }); - describe('listBuildTriggers', () => { - it('invokes listBuildTriggers without error', async () => { + describe('listWorkerPools', () => { + it('invokes listWorkerPools without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -2365,37 +2942,36 @@ describe('v1.CloudBuildClient', () => { }; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), ]; - client.innerApiCalls.listBuildTriggers = stubSimpleCall(expectedResponse); - const [response] = await client.listBuildTriggers(request); + client.innerApiCalls.listWorkerPools = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkerPools(request); assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) + (client.innerApiCalls.listWorkerPools as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listBuildTriggers without error using callback', async () => { + it('invokes listWorkerPools without error using callback', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -2405,23 +2981,23 @@ describe('v1.CloudBuildClient', () => { }; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), ]; - client.innerApiCalls.listBuildTriggers = + client.innerApiCalls.listWorkerPools = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listBuildTriggers( + client.listWorkerPools( request, ( err?: Error | null, - result?: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] | null + result?: protos.google.devtools.cloudbuild.v1.IWorkerPool[] | null ) => { if (err) { reject(err); @@ -2434,24 +3010,23 @@ describe('v1.CloudBuildClient', () => { const response = await promise; assert.deepStrictEqual(response, expectedResponse); assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) + (client.innerApiCalls.listWorkerPools as SinonStub) .getCall(0) .calledWith(request, expectedOptions /*, callback defined above */) ); }); - it('invokes listBuildTriggers with error', async () => { + it('invokes listWorkerPools with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedOptions = { otherArgs: { headers: { @@ -2460,50 +3035,48 @@ describe('v1.CloudBuildClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.listBuildTriggers = stubSimpleCall( + client.innerApiCalls.listWorkerPools = stubSimpleCall( undefined, expectedError ); - await assert.rejects(client.listBuildTriggers(request), expectedError); + await assert.rejects(client.listWorkerPools(request), expectedError); assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) + (client.innerApiCalls.listWorkerPools as SinonStub) .getCall(0) .calledWith(request, expectedOptions, undefined) ); }); - it('invokes listBuildTriggersStream without error', async () => { + it('invokes listWorkerPoolsStream without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), ]; - client.descriptors.page.listBuildTriggers.createStream = + client.descriptors.page.listWorkerPools.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listBuildTriggersStream(request); + const stream = client.listWorkerPoolsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = - []; + const responses: protos.google.devtools.cloudbuild.v1.WorkerPool[] = []; stream.on( 'data', - (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { + (response: protos.google.devtools.cloudbuild.v1.WorkerPool) => { responses.push(response); } ); @@ -2517,40 +3090,38 @@ describe('v1.CloudBuildClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listBuildTriggers.createStream as SinonStub) + (client.descriptors.page.listWorkerPools.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuildTriggers, request) + .calledWith(client.innerApiCalls.listWorkerPools, request) ); assert.strictEqual( ( - client.descriptors.page.listBuildTriggers.createStream as SinonStub + client.descriptors.page.listWorkerPools.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('invokes listBuildTriggersStream with error', async () => { + it('invokes listWorkerPoolsStream with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listBuildTriggers.createStream = + client.descriptors.page.listWorkerPools.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listBuildTriggersStream(request); + const stream = client.listWorkerPoolsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.devtools.cloudbuild.v1.BuildTrigger[] = - []; + const responses: protos.google.devtools.cloudbuild.v1.WorkerPool[] = []; stream.on( 'data', - (response: protos.google.devtools.cloudbuild.v1.BuildTrigger) => { + (response: protos.google.devtools.cloudbuild.v1.WorkerPool) => { responses.push(response); } ); @@ -2563,82 +3134,79 @@ describe('v1.CloudBuildClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listBuildTriggers.createStream as SinonStub) + (client.descriptors.page.listWorkerPools.createStream as SinonStub) .getCall(0) - .calledWith(client.innerApiCalls.listBuildTriggers, request) + .calledWith(client.innerApiCalls.listWorkerPools, request) ); assert.strictEqual( ( - client.descriptors.page.listBuildTriggers.createStream as SinonStub + client.descriptors.page.listWorkerPools.createStream as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuildTriggers without error', async () => { + it('uses async iteration with listWorkerPools without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedResponse = [ generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.BuildTrigger() + new protos.google.devtools.cloudbuild.v1.WorkerPool() ), ]; - client.descriptors.page.listBuildTriggers.asyncIterate = + client.descriptors.page.listWorkerPools.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = - []; - const iterable = client.listBuildTriggersAsync(request); + const responses: protos.google.devtools.cloudbuild.v1.IWorkerPool[] = []; + const iterable = client.listWorkerPoolsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + client.descriptors.page.listWorkerPools.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + client.descriptors.page.listWorkerPools.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listBuildTriggers with error', async () => { + it('uses async iteration with listWorkerPools with error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); const request = generateSampleMessage( - new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() + new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listBuildTriggers.asyncIterate = + client.descriptors.page.listWorkerPools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listBuildTriggersAsync(request); + const iterable = client.listWorkerPoolsAsync(request); await assert.rejects(async () => { - const responses: protos.google.devtools.cloudbuild.v1.IBuildTrigger[] = + const responses: protos.google.devtools.cloudbuild.v1.IWorkerPool[] = []; for await (const resource of iterable) { responses.push(resource!); @@ -2646,13 +3214,13 @@ describe('v1.CloudBuildClient', () => { }); assert.deepStrictEqual( ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + client.descriptors.page.listWorkerPools.asyncIterate as SinonStub ).getCall(0).args[1], request ); assert.strictEqual( ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub + client.descriptors.page.listWorkerPools.asyncIterate as SinonStub ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); @@ -2736,6 +3304,55 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('project', () => { const fakePath = '/rendered/path/project'; const expectedParameters = { @@ -3249,5 +3866,69 @@ describe('v1.CloudBuildClient', () => { ); }); }); + + describe('workerPool', () => { + const fakePath = '/rendered/path/workerPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + worker_pool: 'workerPoolValue', + }; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.workerPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.workerPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('workerPoolPath', () => { + const result = client.workerPoolPath( + 'projectValue', + 'locationValue', + 'workerPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.workerPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromWorkerPoolName', () => { + const result = client.matchProjectFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromWorkerPoolName', () => { + const result = client.matchLocationFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchWorkerPoolFromWorkerPoolName', () => { + const result = client.matchWorkerPoolFromWorkerPoolName(fakePath); + assert.strictEqual(result, 'workerPoolValue'); + assert( + (client.pathTemplates.workerPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); }); }); From 3c54ae6fc2e4640a4f8baa14ee8e1c4dc96df0b2 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Jul 2021 21:52:24 +0000 Subject: [PATCH 164/223] feat: Implementation of Build Failure Info: - Added message FailureInfo field (#255) PiperOrigin-RevId: 385847244 Source-Link: https://github.com/googleapis/googleapis/commit/f84d1e2eda7021b13b6ca059bb65d96ecd2ce98b Source-Link: https://github.com/googleapis/googleapis-gen/commit/ff9cf56d0746b8507fede7dafc5e77cb25203e90 --- .../devtools/cloudbuild/v1/cloudbuild.proto | 37 +++ .../protos/protos.d.ts | 116 +++++++ .../protos/protos.js | 299 ++++++++++++++++++ .../protos/protos.json | 32 ++ 4 files changed, 484 insertions(+) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 3b51e3f98e24..dd792543b0e2 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -681,6 +681,40 @@ message Build { Priority priority = 2; } + // A fatal problem encountered during the execution of the build. + message FailureInfo { + // The name of a fatal problem encountered during the execution of the + // build. + enum FailureType { + // Type unspecified + FAILURE_TYPE_UNSPECIFIED = 0; + + // Unable to push the image to the repository. + PUSH_FAILED = 1; + + // Final image not found. + PUSH_IMAGE_NOT_FOUND = 2; + + // Unauthorized push of the final image. + PUSH_NOT_AUTHORIZED = 3; + + // Backend logging failures. Should retry. + LOGGING_FAILURE = 4; + + // A build step has failed. + USER_BUILD_STEP = 5; + + // The source fetching has failed. + FETCH_SOURCE_FAILED = 6; + } + + // The name of the failure. + FailureType type = 1; + + // Explains the failure issue in more detail using hard-coded text. + string detail = 2; + } + // Possible status of a build or build step. enum Status { // Status of the build is unknown. @@ -842,6 +876,9 @@ message Build { // Output only. Non-fatal problems encountered during the execution of the // build. repeated Warning warnings = 49 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Contains information about the build when status=FAILURE. + FailureInfo failure_info = 51 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Artifacts produced by a build that should be uploaded upon diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 8cf39510d69a..daf9b4245455 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1720,6 +1720,9 @@ export namespace google { /** Build warnings */ warnings?: (google.devtools.cloudbuild.v1.Build.IWarning[]|null); + + /** Build failureInfo */ + failureInfo?: (google.devtools.cloudbuild.v1.Build.IFailureInfo|null); } /** Represents a Build. */ @@ -1812,6 +1815,9 @@ export namespace google { /** Build warnings. */ public warnings: google.devtools.cloudbuild.v1.Build.IWarning[]; + /** Build failureInfo. */ + public failureInfo?: (google.devtools.cloudbuild.v1.Build.IFailureInfo|null); + /** * Creates a new Build instance using the specified properties. * @param [properties] Properties to set @@ -1992,6 +1998,116 @@ export namespace google { } } + /** Properties of a FailureInfo. */ + interface IFailureInfo { + + /** FailureInfo type */ + type?: (google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|keyof typeof google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|null); + + /** FailureInfo detail */ + detail?: (string|null); + } + + /** Represents a FailureInfo. */ + class FailureInfo implements IFailureInfo { + + /** + * Constructs a new FailureInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Build.IFailureInfo); + + /** FailureInfo type. */ + public type: (google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|keyof typeof google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType); + + /** FailureInfo detail. */ + public detail: string; + + /** + * Creates a new FailureInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FailureInfo instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Build.IFailureInfo): google.devtools.cloudbuild.v1.Build.FailureInfo; + + /** + * Encodes the specified FailureInfo message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * @param message FailureInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Build.IFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FailureInfo message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * @param message FailureInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Build.IFailureInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FailureInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FailureInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Build.FailureInfo; + + /** + * Decodes a FailureInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FailureInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Build.FailureInfo; + + /** + * Verifies a FailureInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FailureInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FailureInfo + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Build.FailureInfo; + + /** + * Creates a plain object from a FailureInfo message. Also converts values to other types if specified. + * @param message FailureInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Build.FailureInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FailureInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FailureInfo { + + /** FailureType enum. */ + enum FailureType { + FAILURE_TYPE_UNSPECIFIED = 0, + PUSH_FAILED = 1, + PUSH_IMAGE_NOT_FOUND = 2, + PUSH_NOT_AUTHORIZED = 3, + LOGGING_FAILURE = 4, + USER_BUILD_STEP = 5, + FETCH_SOURCE_FAILED = 6 + } + } + /** Status enum. */ enum Status { STATUS_UNKNOWN = 0, diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index c8d59321646e..5d257036a7ee 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -4021,6 +4021,7 @@ * @property {string|null} [serviceAccount] Build serviceAccount * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets * @property {Array.|null} [warnings] Build warnings + * @property {google.devtools.cloudbuild.v1.Build.IFailureInfo|null} [failureInfo] Build failureInfo */ /** @@ -4261,6 +4262,14 @@ */ Build.prototype.warnings = $util.emptyArray; + /** + * Build failureInfo. + * @member {google.devtools.cloudbuild.v1.Build.IFailureInfo|null|undefined} failureInfo + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.failureInfo = null; + /** * Creates a new Build instance using the specified properties. * @function create @@ -4348,6 +4357,8 @@ if (message.warnings != null && message.warnings.length) for (var i = 0; i < message.warnings.length; ++i) $root.google.devtools.cloudbuild.v1.Build.Warning.encode(message.warnings[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.failureInfo != null && Object.hasOwnProperty.call(message, "failureInfo")) + $root.google.devtools.cloudbuild.v1.Build.FailureInfo.encode(message.failureInfo, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); return writer; }; @@ -4511,6 +4522,9 @@ message.warnings = []; message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); break; + case 51: + message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.decode(reader, reader.uint32()); + break; default: reader.skipType(tag & 7); break; @@ -4699,6 +4713,11 @@ return "warnings." + error; } } + if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) { + var error = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.verify(message.failureInfo); + if (error) + return "failureInfo." + error; + } return null; }; @@ -4884,6 +4903,11 @@ message.warnings[i] = $root.google.devtools.cloudbuild.v1.Build.Warning.fromObject(object.warnings[i]); } } + if (object.failureInfo != null) { + if (typeof object.failureInfo !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.failureInfo: object expected"); + message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.fromObject(object.failureInfo); + } return message; }; @@ -4932,6 +4956,7 @@ object.serviceAccount = ""; object.name = ""; object.availableSecrets = null; + object.failureInfo = null; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -5009,6 +5034,8 @@ for (var j = 0; j < message.warnings.length; ++j) object.warnings[j] = $root.google.devtools.cloudbuild.v1.Build.Warning.toObject(message.warnings[j], options); } + if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) + object.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.toObject(message.failureInfo, options); return object; }; @@ -5274,6 +5301,278 @@ return Warning; })(); + Build.FailureInfo = (function() { + + /** + * Properties of a FailureInfo. + * @memberof google.devtools.cloudbuild.v1.Build + * @interface IFailureInfo + * @property {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|null} [type] FailureInfo type + * @property {string|null} [detail] FailureInfo detail + */ + + /** + * Constructs a new FailureInfo. + * @memberof google.devtools.cloudbuild.v1.Build + * @classdesc Represents a FailureInfo. + * @implements IFailureInfo + * @constructor + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set + */ + function FailureInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FailureInfo type. + * @member {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType} type + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @instance + */ + FailureInfo.prototype.type = 0; + + /** + * FailureInfo detail. + * @member {string} detail + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @instance + */ + FailureInfo.prototype.detail = ""; + + /** + * Creates a new FailureInfo instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo instance + */ + FailureInfo.create = function create(properties) { + return new FailureInfo(properties); + }; + + /** + * Encodes the specified FailureInfo message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailureInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); + return writer; + }; + + /** + * Encodes the specified FailureInfo message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FailureInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FailureInfo message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailureInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.detail = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FailureInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailureInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailureInfo message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailureInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + return null; + }; + + /** + * Creates a FailureInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + */ + FailureInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build.FailureInfo) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); + switch (object.type) { + case "FAILURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PUSH_FAILED": + case 1: + message.type = 1; + break; + case "PUSH_IMAGE_NOT_FOUND": + case 2: + message.type = 2; + break; + case "PUSH_NOT_AUTHORIZED": + case 3: + message.type = 3; + break; + case "LOGGING_FAILURE": + case 4: + message.type = 4; + break; + case "USER_BUILD_STEP": + case 5: + message.type = 5; + break; + case "FETCH_SOURCE_FAILED": + case 6: + message.type = 6; + break; + } + if (object.detail != null) + message.detail = String(object.detail); + return message; + }; + + /** + * Creates a plain object from a FailureInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {google.devtools.cloudbuild.v1.Build.FailureInfo} message FailureInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailureInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "FAILURE_TYPE_UNSPECIFIED" : 0; + object.detail = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] : message.type; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + return object; + }; + + /** + * Converts this FailureInfo to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @instance + * @returns {Object.} JSON object + */ + FailureInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * FailureType enum. + * @name google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType + * @enum {number} + * @property {number} FAILURE_TYPE_UNSPECIFIED=0 FAILURE_TYPE_UNSPECIFIED value + * @property {number} PUSH_FAILED=1 PUSH_FAILED value + * @property {number} PUSH_IMAGE_NOT_FOUND=2 PUSH_IMAGE_NOT_FOUND value + * @property {number} PUSH_NOT_AUTHORIZED=3 PUSH_NOT_AUTHORIZED value + * @property {number} LOGGING_FAILURE=4 LOGGING_FAILURE value + * @property {number} USER_BUILD_STEP=5 USER_BUILD_STEP value + * @property {number} FETCH_SOURCE_FAILED=6 FETCH_SOURCE_FAILED value + */ + FailureInfo.FailureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUSH_FAILED"] = 1; + values[valuesById[2] = "PUSH_IMAGE_NOT_FOUND"] = 2; + values[valuesById[3] = "PUSH_NOT_AUTHORIZED"] = 3; + values[valuesById[4] = "LOGGING_FAILURE"] = 4; + values[valuesById[5] = "USER_BUILD_STEP"] = 5; + values[valuesById[6] = "FETCH_SOURCE_FAILED"] = 6; + return values; + })(); + + return FailureInfo; + })(); + /** * Status enum. * @name google.devtools.cloudbuild.v1.Build.Status diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index f09d25225678..ffc8e0d1cf60 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -923,6 +923,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "failureInfo": { + "type": "FailureInfo", + "id": 51, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -948,6 +955,31 @@ } } }, + "FailureInfo": { + "fields": { + "type": { + "type": "FailureType", + "id": 1 + }, + "detail": { + "type": "string", + "id": 2 + } + }, + "nested": { + "FailureType": { + "values": { + "FAILURE_TYPE_UNSPECIFIED": 0, + "PUSH_FAILED": 1, + "PUSH_IMAGE_NOT_FOUND": 2, + "PUSH_NOT_AUTHORIZED": 3, + "LOGGING_FAILURE": 4, + "USER_BUILD_STEP": 5, + "FETCH_SOURCE_FAILED": 6 + } + } + } + }, "Status": { "values": { "STATUS_UNKNOWN": 0, From ca9773367a1b7b6ac8caab7f91498319fcf0ff46 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 2 Aug 2021 09:39:34 -0700 Subject: [PATCH 165/223] docs: Add a new build phase `SETUPBUILD` for timing information (#258) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add a new build phase `SETUPBUILD` for timing information PiperOrigin-RevId: 387362210 Source-Link: https://github.com/googleapis/googleapis/commit/760b5d8bfd6687c49f03b7619e063e2e361ba32c Source-Link: https://github.com/googleapis/googleapis-gen/commit/db3c7df2a957bd3221dfc4510bdeec50c8b75d37 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../protos/google/devtools/cloudbuild/v1/cloudbuild.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index dd792543b0e2..0e2e44d6c3ac 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -854,9 +854,10 @@ message Build { // Output only. Stores timing information for phases of the build. Valid keys // are: // - // * BUILD: time to execute all build steps + // * BUILD: time to execute all build steps. // * PUSH: time to push all specified images. // * FETCHSOURCE: time to fetch source. + // * SETUPBUILD: time to set up build. // // If the build does not specify source or images, // these keys will not be included. From bd24b5903e8d4a53b6b1c59036ba1c895a7da803 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:07:07 -0400 Subject: [PATCH 166/223] chore(nodejs): update client ref docs link in metadata (#261) --- packages/google-devtools-cloudbuild/.repo-metadata.json | 2 +- packages/google-devtools-cloudbuild/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index bc05d4c84ac6..7ec53f338b37 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -4,7 +4,7 @@ "requires_billing": true, "name": "cloudbuild", "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", - "client_documentation": "https://googleapis.dev/nodejs/cloudbuild/latest/index.html", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/cloudbuild/latest", "language": "nodejs", "release_level": "ga", "product_documentation": "https://cloud.google.com/cloud-build/docs/", diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 114180a95518..7713eaa45900 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -175,7 +175,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-cloudbuild/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/cloudbuild/latest/index.html +[client-docs]: https://cloud.google.com/nodejs/docs/reference/cloudbuild/latest [product-docs]: https://cloud.google.com/cloud-build/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 1b6bc9892374f6ea5c0f6f45fc5bb710fa7dca09 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 5 Aug 2021 22:10:30 +0000 Subject: [PATCH 167/223] chore: release 2.3.0 (#263) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release \*beep\* \*boop\* --- ## [2.3.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.7...v2.3.0) (2021-08-05) ### ⚠ BREAKING CHANGES * * feat: add a WorkerPools API ### Features * add a WorkerPools API ([#254](https://www.github.com/googleapis/nodejs-cloudbuild/issues/254)) ([2e5b3f5](https://www.github.com/googleapis/nodejs-cloudbuild/commit/2e5b3f540d9cd2b3a616c4581b07ebcfc444e7c7)) * Implementation of Build Failure Info: - Added message FailureInfo field ([#255](https://www.github.com/googleapis/nodejs-cloudbuild/issues/255)) ([6f115e2](https://www.github.com/googleapis/nodejs-cloudbuild/commit/6f115e2a4ec78289014c05f398d8464e599b1ef6)) ### Build System * force a minor release ([#262](https://www.github.com/googleapis/nodejs-cloudbuild/issues/262)) ([bc43706](https://www.github.com/googleapis/nodejs-cloudbuild/commit/bc4370692e233c265ce45546b205b9b9925d3990)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .../google-devtools-cloudbuild/CHANGELOG.md | 17 +++++++++++++++++ .../google-devtools-cloudbuild/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index e826dbcc2a9f..dd3b8d2d0c62 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,22 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.7...v2.3.0) (2021-08-05) + + +### ⚠ BREAKING CHANGES + +* * feat: add a WorkerPools API + +### Features + +* add a WorkerPools API ([#254](https://www.github.com/googleapis/nodejs-cloudbuild/issues/254)) ([2e5b3f5](https://www.github.com/googleapis/nodejs-cloudbuild/commit/2e5b3f540d9cd2b3a616c4581b07ebcfc444e7c7)) +* Implementation of Build Failure Info: - Added message FailureInfo field ([#255](https://www.github.com/googleapis/nodejs-cloudbuild/issues/255)) ([6f115e2](https://www.github.com/googleapis/nodejs-cloudbuild/commit/6f115e2a4ec78289014c05f398d8464e599b1ef6)) + + +### Build System + +* force a minor release ([#262](https://www.github.com/googleapis/nodejs-cloudbuild/issues/262)) ([bc43706](https://www.github.com/googleapis/nodejs-cloudbuild/commit/bc4370692e233c265ce45546b205b9b9925d3990)) + ### [2.2.7](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.6...v2.2.7) (2021-07-21) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 9055a33d23ee..33c2ca14593a 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.2.7", + "version": "2.3.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 34915806e838..e664327e4bb7 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.2.7" + "@google-cloud/cloudbuild": "^2.3.0" }, "devDependencies": { "c8": "^7.0.0", From a81534f381ca4eba67151b568b1dc1a4653f7e69 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 12 Aug 2021 09:06:59 -0700 Subject: [PATCH 168/223] fix(build): migrate to using main branch (#265) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(build): migrate to using main branch * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/README.md | 18 +++++++++--------- .../samples/README.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 7713eaa45900..6b19016cccec 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/cloudbuild.svg)](https://www.npmjs.org/package/@google-cloud/cloudbuild) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloudbuild/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloudbuild) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloudbuild/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloudbuild) @@ -15,7 +15,7 @@ Cloud Build API client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-cloudbuild/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-cloudbuild/blob/main/CHANGELOG.md). * [Cloud Build Node.js Client API Reference][client-docs] * [Cloud Build Documentation][product-docs] @@ -107,12 +107,12 @@ async function quickstart( ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloudbuild/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-cloudbuild/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| List Triggers. | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/listBuildTriggers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| List Triggers. | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/main/samples/listBuildTriggers.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -161,19 +161,19 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloudbuild/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-cloudbuild/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 template in this -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). +to its templates in +[directory](https://github.com/googleapis/synthtool). ## License Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-cloudbuild/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-cloudbuild/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/cloudbuild/latest [product-docs]: https://cloud.google.com/cloud-build/docs/ diff --git a/packages/google-devtools-cloudbuild/samples/README.md b/packages/google-devtools-cloudbuild/samples/README.md index 3283b56839bc..3d8ad7ed0c64 100644 --- a/packages/google-devtools-cloudbuild/samples/README.md +++ b/packages/google-devtools-cloudbuild/samples/README.md @@ -34,7 +34,7 @@ Before running the samples, make sure you've followed the steps outlined in List available build triggers. -View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/listBuildTriggers.js). +View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/main/samples/listBuildTriggers.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/listBuildTriggers.js,samples/README.md) @@ -51,7 +51,7 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-cloudbuild/blob/main/samples/quickstart.js). [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-cloudbuild&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From d5da7719f2acc2a5f734cb6176ac8a8baab328b5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 12 Aug 2021 16:22:27 +0000 Subject: [PATCH 169/223] chore: release 2.3.1 (#266) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.0...v2.3.1) (2021-08-12) ### Bug Fixes * **build:** migrate to using main branch ([#265](https://www.github.com/googleapis/nodejs-cloudbuild/issues/265)) ([e89f829](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e89f829f10c5710ca5fb259a6c8dfae1527071a3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index dd3b8d2d0c62..acb90839c193 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.0...v2.3.1) (2021-08-12) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#265](https://www.github.com/googleapis/nodejs-cloudbuild/issues/265)) ([e89f829](https://www.github.com/googleapis/nodejs-cloudbuild/commit/e89f829f10c5710ca5fb259a6c8dfae1527071a3)) + ## [2.3.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.2.7...v2.3.0) (2021-08-05) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 33c2ca14593a..4c569c458865 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.3.0", + "version": "2.3.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index e664327e4bb7..856f21ea4b4e 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.3.0" + "@google-cloud/cloudbuild": "^2.3.1" }, "devDependencies": { "c8": "^7.0.0", From 3e68e5ec92da1745ea4fc1407e86c7711f86e1aa Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 17:00:14 -0400 Subject: [PATCH 170/223] fix(deps): google-gax v2.24.1 (#268) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 4c569c458865..c4a6feddee45 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -61,6 +61,6 @@ "node": ">=10" }, "dependencies": { - "google-gax": "^2.17.1" + "google-gax": "^2.24.1" } } From 95cf186ef3f96a01c07f8d35c6b6efc860e69b71 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 21:06:11 +0000 Subject: [PATCH 171/223] chore: release 2.3.2 (#269) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.1...v2.3.2) (2021-08-16) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#268](https://www.github.com/googleapis/nodejs-cloudbuild/issues/268)) ([c26f7f7](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c26f7f726db4f43f3692aea4c516547abcddd0ea)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index acb90839c193..d29ed78132b1 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.1...v2.3.2) (2021-08-16) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#268](https://www.github.com/googleapis/nodejs-cloudbuild/issues/268)) ([c26f7f7](https://www.github.com/googleapis/nodejs-cloudbuild/commit/c26f7f726db4f43f3692aea4c516547abcddd0ea)) + ### [2.3.1](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.0...v2.3.1) (2021-08-12) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index c4a6feddee45..44f85c190d91 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.3.1", + "version": "2.3.2", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 856f21ea4b4e..6eaa99d37343 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.3.1" + "@google-cloud/cloudbuild": "^2.3.2" }, "devDependencies": { "c8": "^7.0.0", From ef42c61d9989ed67c94becd61c963dfd6a97028f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 21:14:10 +0000 Subject: [PATCH 172/223] feat: Add ability to configure BuildTriggers to create Builds that require approval before executing and ApproveBuild API to approve or reject pending Builds (#267) Comitter: @joonlim PiperOrigin-RevId: 391072303 Source-Link: https://github.com/googleapis/googleapis/commit/7fec72948d74c8b25c837e9acb7f3e357c902ad1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/22f5dc30b16225014527e354cc2cf0f00ff5c120 --- .../devtools/cloudbuild/v1/cloudbuild.proto | 116 ++ .../protos/protos.d.ts | 452 +++++++ .../protos/protos.js | 1079 +++++++++++++++++ .../protos/protos.json | 149 +++ .../src/v1/cloud_build_client.ts | 161 +++ .../src/v1/cloud_build_client_config.json | 4 + .../src/v1/gapic_metadata.json | 10 + .../test/gapic_cloud_build_v1.ts | 190 +++ 8 files changed, 2161 insertions(+) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 0e2e44d6c3ac..6a932bae81d0 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -176,6 +176,28 @@ service CloudBuild { }; } + // Approves or rejects a pending build. + // + // If approved, the returned LRO will be analogous to the LRO returned from + // a CreateBuild call. + // + // If rejected, the returned LRO will be immediately done. + rpc ApproveBuild(ApproveBuildRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/builds/*}:approve" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/builds/*}:approve" + body: "*" + } + }; + option (google.api.method_signature) = "name,approval_result"; + option (google.longrunning.operation_info) = { + response_type: "Build" + metadata_type: "BuildOperationMetadata" + }; + } + // Creates a new `BuildTrigger`. // // This API is experimental. @@ -720,6 +742,10 @@ message Build { // Status of the build is unknown. STATUS_UNKNOWN = 0; + // Build has been created and is pending execution and queuing. It has not + // been queued. + PENDING = 10; + // Build or step is queued; work has not yet begun. QUEUED = 1; @@ -863,6 +889,10 @@ message Build { // these keys will not be included. map timing = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Describes this build's approval configuration, status, + // and result. + BuildApproval approval = 44 [(google.api.field_behavior) = OUTPUT_ONLY]; + // IAM service account whose credentials will be used at build runtime. // Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. // ACCOUNT can be email address or uniqueId of the service account. @@ -1145,6 +1175,92 @@ message CancelBuildRequest { string id = 2 [(google.api.field_behavior) = REQUIRED]; } +// Request to approve or reject a pending build. +message ApproveBuildRequest { + // Required. Name of the target build. + // For example: "projects/{$project_id}/builds/{$build_id}" + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Approval decision and metadata. + ApprovalResult approval_result = 2; +} + +// BuildApproval describes a build's approval configuration, state, and +// result. +message BuildApproval { + // Specifies the current state of a build's approval. + enum State { + // Default enum type. This should not be used. + STATE_UNSPECIFIED = 0; + + // Build approval is pending. + PENDING = 1; + + // Build approval has been approved. + APPROVED = 2; + + // Build approval has been rejected. + REJECTED = 3; + + // Build was cancelled while it was still pending approval. + CANCELLED = 5; + } + + // Output only. The state of this build's approval. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Configuration for manual approval of this build. + ApprovalConfig config = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Result of manual approval for this Build. + ApprovalResult result = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ApprovalConfig describes configuration for manual approval of a build. +message ApprovalConfig { + // Whether or not approval is needed. If this is set on a build, it will + // become pending when created, and will need to be explicitly approved + // to start. + bool approval_required = 1; +} + +// ApprovalResult describes the decision and associated metadata of a manual +// approval of a build. +message ApprovalResult { + // Specifies whether or not this manual approval result is to approve + // or reject a build. + enum Decision { + // Default enum type. This should not be used. + DECISION_UNSPECIFIED = 0; + + // Build is approved. + APPROVED = 1; + + // Build is rejected. + REJECTED = 2; + } + + // Output only. Email of the user that called the ApproveBuild API to + // approve or reject a build at the time that the API was called. + string approver_account = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the approval decision was made. + google.protobuf.Timestamp approval_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The decision of this manual approval. + Decision decision = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional comment for this manual approval result. + string comment = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional URL tied to this manual approval result. This field + // is essentially the same as comment, except that it will be rendered by the + // UI differently. An example use case is a link to an external job that + // approved this Build. + string url = 6 [(google.api.field_behavior) = OPTIONAL]; +} + // Configuration for an automated build in response to source repository // changes. message BuildTrigger { diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index daf9b4245455..fd33ae29ab94 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -116,6 +116,20 @@ export namespace google { */ public retryBuild(request: google.devtools.cloudbuild.v1.IRetryBuildRequest): Promise; + /** + * Calls ApproveBuild. + * @param request ApproveBuildRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public approveBuild(request: google.devtools.cloudbuild.v1.IApproveBuildRequest, callback: google.devtools.cloudbuild.v1.CloudBuild.ApproveBuildCallback): void; + + /** + * Calls ApproveBuild. + * @param request ApproveBuildRequest message or plain object + * @returns Promise + */ + public approveBuild(request: google.devtools.cloudbuild.v1.IApproveBuildRequest): Promise; + /** * Calls CreateBuildTrigger. * @param request CreateBuildTriggerRequest message or plain object @@ -322,6 +336,13 @@ export namespace google { */ type RetryBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#approveBuild}. + * @param error Error, if any + * @param [response] Operation + */ + type ApproveBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. * @param error Error, if any @@ -1712,6 +1733,9 @@ export namespace google { /** Build timing */ timing?: ({ [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }|null); + /** Build approval */ + approval?: (google.devtools.cloudbuild.v1.IBuildApproval|null); + /** Build serviceAccount */ serviceAccount?: (string|null); @@ -1806,6 +1830,9 @@ export namespace google { /** Build timing. */ public timing: { [k: string]: google.devtools.cloudbuild.v1.ITimeSpan }; + /** Build approval. */ + public approval?: (google.devtools.cloudbuild.v1.IBuildApproval|null); + /** Build serviceAccount. */ public serviceAccount: string; @@ -2111,6 +2138,7 @@ export namespace google { /** Status enum. */ enum Status { STATUS_UNKNOWN = 0, + PENDING = 10, QUEUED = 1, WORKING = 2, SUCCESS = 3, @@ -3713,6 +3741,430 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of an ApproveBuildRequest. */ + interface IApproveBuildRequest { + + /** ApproveBuildRequest name */ + name?: (string|null); + + /** ApproveBuildRequest approvalResult */ + approvalResult?: (google.devtools.cloudbuild.v1.IApprovalResult|null); + } + + /** Represents an ApproveBuildRequest. */ + class ApproveBuildRequest implements IApproveBuildRequest { + + /** + * Constructs a new ApproveBuildRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IApproveBuildRequest); + + /** ApproveBuildRequest name. */ + public name: string; + + /** ApproveBuildRequest approvalResult. */ + public approvalResult?: (google.devtools.cloudbuild.v1.IApprovalResult|null); + + /** + * Creates a new ApproveBuildRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveBuildRequest instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IApproveBuildRequest): google.devtools.cloudbuild.v1.ApproveBuildRequest; + + /** + * Encodes the specified ApproveBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApproveBuildRequest.verify|verify} messages. + * @param message ApproveBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IApproveBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApproveBuildRequest.verify|verify} messages. + * @param message ApproveBuildRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IApproveBuildRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveBuildRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ApproveBuildRequest; + + /** + * Decodes an ApproveBuildRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ApproveBuildRequest; + + /** + * Verifies an ApproveBuildRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveBuildRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveBuildRequest + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ApproveBuildRequest; + + /** + * Creates a plain object from an ApproveBuildRequest message. Also converts values to other types if specified. + * @param message ApproveBuildRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ApproveBuildRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveBuildRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BuildApproval. */ + interface IBuildApproval { + + /** BuildApproval state */ + state?: (google.devtools.cloudbuild.v1.BuildApproval.State|keyof typeof google.devtools.cloudbuild.v1.BuildApproval.State|null); + + /** BuildApproval config */ + config?: (google.devtools.cloudbuild.v1.IApprovalConfig|null); + + /** BuildApproval result */ + result?: (google.devtools.cloudbuild.v1.IApprovalResult|null); + } + + /** Represents a BuildApproval. */ + class BuildApproval implements IBuildApproval { + + /** + * Constructs a new BuildApproval. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IBuildApproval); + + /** BuildApproval state. */ + public state: (google.devtools.cloudbuild.v1.BuildApproval.State|keyof typeof google.devtools.cloudbuild.v1.BuildApproval.State); + + /** BuildApproval config. */ + public config?: (google.devtools.cloudbuild.v1.IApprovalConfig|null); + + /** BuildApproval result. */ + public result?: (google.devtools.cloudbuild.v1.IApprovalResult|null); + + /** + * Creates a new BuildApproval instance using the specified properties. + * @param [properties] Properties to set + * @returns BuildApproval instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IBuildApproval): google.devtools.cloudbuild.v1.BuildApproval; + + /** + * Encodes the specified BuildApproval message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildApproval.verify|verify} messages. + * @param message BuildApproval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IBuildApproval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BuildApproval message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildApproval.verify|verify} messages. + * @param message BuildApproval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IBuildApproval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BuildApproval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BuildApproval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.BuildApproval; + + /** + * Decodes a BuildApproval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BuildApproval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.BuildApproval; + + /** + * Verifies a BuildApproval message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BuildApproval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BuildApproval + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.BuildApproval; + + /** + * Creates a plain object from a BuildApproval message. Also converts values to other types if specified. + * @param message BuildApproval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.BuildApproval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BuildApproval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace BuildApproval { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + APPROVED = 2, + REJECTED = 3, + CANCELLED = 5 + } + } + + /** Properties of an ApprovalConfig. */ + interface IApprovalConfig { + + /** ApprovalConfig approvalRequired */ + approvalRequired?: (boolean|null); + } + + /** Represents an ApprovalConfig. */ + class ApprovalConfig implements IApprovalConfig { + + /** + * Constructs a new ApprovalConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IApprovalConfig); + + /** ApprovalConfig approvalRequired. */ + public approvalRequired: boolean; + + /** + * Creates a new ApprovalConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ApprovalConfig instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IApprovalConfig): google.devtools.cloudbuild.v1.ApprovalConfig; + + /** + * Encodes the specified ApprovalConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalConfig.verify|verify} messages. + * @param message ApprovalConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IApprovalConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApprovalConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalConfig.verify|verify} messages. + * @param message ApprovalConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IApprovalConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApprovalConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApprovalConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ApprovalConfig; + + /** + * Decodes an ApprovalConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApprovalConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ApprovalConfig; + + /** + * Verifies an ApprovalConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApprovalConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApprovalConfig + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ApprovalConfig; + + /** + * Creates a plain object from an ApprovalConfig message. Also converts values to other types if specified. + * @param message ApprovalConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ApprovalConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApprovalConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ApprovalResult. */ + interface IApprovalResult { + + /** ApprovalResult approverAccount */ + approverAccount?: (string|null); + + /** ApprovalResult approvalTime */ + approvalTime?: (google.protobuf.ITimestamp|null); + + /** ApprovalResult decision */ + decision?: (google.devtools.cloudbuild.v1.ApprovalResult.Decision|keyof typeof google.devtools.cloudbuild.v1.ApprovalResult.Decision|null); + + /** ApprovalResult comment */ + comment?: (string|null); + + /** ApprovalResult url */ + url?: (string|null); + } + + /** Represents an ApprovalResult. */ + class ApprovalResult implements IApprovalResult { + + /** + * Constructs a new ApprovalResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IApprovalResult); + + /** ApprovalResult approverAccount. */ + public approverAccount: string; + + /** ApprovalResult approvalTime. */ + public approvalTime?: (google.protobuf.ITimestamp|null); + + /** ApprovalResult decision. */ + public decision: (google.devtools.cloudbuild.v1.ApprovalResult.Decision|keyof typeof google.devtools.cloudbuild.v1.ApprovalResult.Decision); + + /** ApprovalResult comment. */ + public comment: string; + + /** ApprovalResult url. */ + public url: string; + + /** + * Creates a new ApprovalResult instance using the specified properties. + * @param [properties] Properties to set + * @returns ApprovalResult instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IApprovalResult): google.devtools.cloudbuild.v1.ApprovalResult; + + /** + * Encodes the specified ApprovalResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalResult.verify|verify} messages. + * @param message ApprovalResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IApprovalResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApprovalResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalResult.verify|verify} messages. + * @param message ApprovalResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IApprovalResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApprovalResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApprovalResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.ApprovalResult; + + /** + * Decodes an ApprovalResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApprovalResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.ApprovalResult; + + /** + * Verifies an ApprovalResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApprovalResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApprovalResult + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.ApprovalResult; + + /** + * Creates a plain object from an ApprovalResult message. Also converts values to other types if specified. + * @param message ApprovalResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.ApprovalResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApprovalResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ApprovalResult { + + /** Decision enum. */ + enum Decision { + DECISION_UNSPECIFIED = 0, + APPROVED = 1, + REJECTED = 2 + } + } + /** Properties of a BuildTrigger. */ interface IBuildTrigger { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 5d257036a7ee..9435efc20b41 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -263,6 +263,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#approveBuild}. + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @typedef ApproveBuildCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ApproveBuild. + * @function approveBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest} request ApproveBuildRequest message or plain object + * @param {google.devtools.cloudbuild.v1.CloudBuild.ApproveBuildCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CloudBuild.prototype.approveBuild = function approveBuild(request, callback) { + return this.rpcCall(approveBuild, $root.google.devtools.cloudbuild.v1.ApproveBuildRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ApproveBuild" }); + + /** + * Calls ApproveBuild. + * @function approveBuild + * @memberof google.devtools.cloudbuild.v1.CloudBuild + * @instance + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest} request ApproveBuildRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild @@ -2957,6 +2990,7 @@ default: return "status: enum value expected"; case 0: + case 10: case 1: case 2: case 3: @@ -3048,6 +3082,10 @@ case 0: message.status = 0; break; + case "PENDING": + case 10: + message.status = 10; + break; case "QUEUED": case 1: message.status = 1; @@ -4018,6 +4056,7 @@ * @property {Array.|null} [tags] Build tags * @property {Array.|null} [secrets] Build secrets * @property {Object.|null} [timing] Build timing + * @property {google.devtools.cloudbuild.v1.IBuildApproval|null} [approval] Build approval * @property {string|null} [serviceAccount] Build serviceAccount * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets * @property {Array.|null} [warnings] Build warnings @@ -4238,6 +4277,14 @@ */ Build.prototype.timing = $util.emptyObject; + /** + * Build approval. + * @member {google.devtools.cloudbuild.v1.IBuildApproval|null|undefined} approval + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.approval = null; + /** * Build serviceAccount. * @member {string} serviceAccount @@ -4350,6 +4397,8 @@ $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) writer.uint32(/* id 42, wireType 2 =*/338).string(message.serviceAccount); + if (message.approval != null && Object.hasOwnProperty.call(message, "approval")) + $root.google.devtools.cloudbuild.v1.BuildApproval.encode(message.approval, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); if (message.availableSecrets != null && Object.hasOwnProperty.call(message, "availableSecrets")) @@ -4511,6 +4560,9 @@ } message.timing[key] = value; break; + case 44: + message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.decode(reader, reader.uint32()); + break; case 42: message.serviceAccount = reader.string(); break; @@ -4574,6 +4626,7 @@ default: return "status: enum value expected"; case 0: + case 10: case 1: case 2: case 3: @@ -4696,6 +4749,11 @@ return "timing." + error; } } + if (message.approval != null && message.hasOwnProperty("approval")) { + var error = $root.google.devtools.cloudbuild.v1.BuildApproval.verify(message.approval); + if (error) + return "approval." + error; + } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) if (!$util.isString(message.serviceAccount)) return "serviceAccount: string expected"; @@ -4744,6 +4802,10 @@ case 0: message.status = 0; break; + case "PENDING": + case 10: + message.status = 10; + break; case "QUEUED": case 1: message.status = 1; @@ -4886,6 +4948,11 @@ message.timing[keys[i]] = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing[keys[i]]); } } + if (object.approval != null) { + if (typeof object.approval !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.approval: object expected"); + message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.fromObject(object.approval); + } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); if (object.availableSecrets != null) { @@ -4954,6 +5021,7 @@ object.artifacts = null; object.queueTtl = null; object.serviceAccount = ""; + object.approval = null; object.name = ""; object.availableSecrets = null; object.failureInfo = null; @@ -5025,6 +5093,8 @@ object.queueTtl = $root.google.protobuf.Duration.toObject(message.queueTtl, options); if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; + if (message.approval != null && message.hasOwnProperty("approval")) + object.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.toObject(message.approval, options); if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) @@ -5578,6 +5648,7 @@ * @name google.devtools.cloudbuild.v1.Build.Status * @enum {number} * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value + * @property {number} PENDING=10 PENDING value * @property {number} QUEUED=1 QUEUED value * @property {number} WORKING=2 WORKING value * @property {number} SUCCESS=3 SUCCESS value @@ -5590,6 +5661,7 @@ Build.Status = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATUS_UNKNOWN"] = 0; + values[valuesById[10] = "PENDING"] = 10; values[valuesById[1] = "QUEUED"] = 1; values[valuesById[2] = "WORKING"] = 2; values[valuesById[3] = "SUCCESS"] = 3; @@ -9440,6 +9512,1013 @@ return CancelBuildRequest; })(); + v1.ApproveBuildRequest = (function() { + + /** + * Properties of an ApproveBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @interface IApproveBuildRequest + * @property {string|null} [name] ApproveBuildRequest name + * @property {google.devtools.cloudbuild.v1.IApprovalResult|null} [approvalResult] ApproveBuildRequest approvalResult + */ + + /** + * Constructs a new ApproveBuildRequest. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an ApproveBuildRequest. + * @implements IApproveBuildRequest + * @constructor + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest=} [properties] Properties to set + */ + function ApproveBuildRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApproveBuildRequest name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @instance + */ + ApproveBuildRequest.prototype.name = ""; + + /** + * ApproveBuildRequest approvalResult. + * @member {google.devtools.cloudbuild.v1.IApprovalResult|null|undefined} approvalResult + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @instance + */ + ApproveBuildRequest.prototype.approvalResult = null; + + /** + * Creates a new ApproveBuildRequest instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ApproveBuildRequest} ApproveBuildRequest instance + */ + ApproveBuildRequest.create = function create(properties) { + return new ApproveBuildRequest(properties); + }; + + /** + * Encodes the specified ApproveBuildRequest message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApproveBuildRequest.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest} message ApproveBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveBuildRequest.encode = function encode(message, writer) { + 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.approvalResult != null && Object.hasOwnProperty.call(message, "approvalResult")) + $root.google.devtools.cloudbuild.v1.ApprovalResult.encode(message.approvalResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ApproveBuildRequest message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApproveBuildRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.IApproveBuildRequest} message ApproveBuildRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveBuildRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveBuildRequest message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ApproveBuildRequest} ApproveBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveBuildRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ApproveBuildRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.approvalResult = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApproveBuildRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ApproveBuildRequest} ApproveBuildRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveBuildRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveBuildRequest message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveBuildRequest.verify = function verify(message) { + if (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.approvalResult != null && message.hasOwnProperty("approvalResult")) { + var error = $root.google.devtools.cloudbuild.v1.ApprovalResult.verify(message.approvalResult); + if (error) + return "approvalResult." + error; + } + return null; + }; + + /** + * Creates an ApproveBuildRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ApproveBuildRequest} ApproveBuildRequest + */ + ApproveBuildRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ApproveBuildRequest) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ApproveBuildRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.approvalResult != null) { + if (typeof object.approvalResult !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ApproveBuildRequest.approvalResult: object expected"); + message.approvalResult = $root.google.devtools.cloudbuild.v1.ApprovalResult.fromObject(object.approvalResult); + } + return message; + }; + + /** + * Creates a plain object from an ApproveBuildRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {google.devtools.cloudbuild.v1.ApproveBuildRequest} message ApproveBuildRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveBuildRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.approvalResult = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.approvalResult != null && message.hasOwnProperty("approvalResult")) + object.approvalResult = $root.google.devtools.cloudbuild.v1.ApprovalResult.toObject(message.approvalResult, options); + return object; + }; + + /** + * Converts this ApproveBuildRequest to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @instance + * @returns {Object.} JSON object + */ + ApproveBuildRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApproveBuildRequest; + })(); + + v1.BuildApproval = (function() { + + /** + * Properties of a BuildApproval. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuildApproval + * @property {google.devtools.cloudbuild.v1.BuildApproval.State|null} [state] BuildApproval state + * @property {google.devtools.cloudbuild.v1.IApprovalConfig|null} [config] BuildApproval config + * @property {google.devtools.cloudbuild.v1.IApprovalResult|null} [result] BuildApproval result + */ + + /** + * Constructs a new BuildApproval. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a BuildApproval. + * @implements IBuildApproval + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuildApproval=} [properties] Properties to set + */ + function BuildApproval(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BuildApproval state. + * @member {google.devtools.cloudbuild.v1.BuildApproval.State} state + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @instance + */ + BuildApproval.prototype.state = 0; + + /** + * BuildApproval config. + * @member {google.devtools.cloudbuild.v1.IApprovalConfig|null|undefined} config + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @instance + */ + BuildApproval.prototype.config = null; + + /** + * BuildApproval result. + * @member {google.devtools.cloudbuild.v1.IApprovalResult|null|undefined} result + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @instance + */ + BuildApproval.prototype.result = null; + + /** + * Creates a new BuildApproval instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {google.devtools.cloudbuild.v1.IBuildApproval=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildApproval} BuildApproval instance + */ + BuildApproval.create = function create(properties) { + return new BuildApproval(properties); + }; + + /** + * Encodes the specified BuildApproval message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildApproval.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {google.devtools.cloudbuild.v1.IBuildApproval} message BuildApproval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildApproval.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.devtools.cloudbuild.v1.ApprovalConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.devtools.cloudbuild.v1.ApprovalResult.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BuildApproval message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildApproval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {google.devtools.cloudbuild.v1.IBuildApproval} message BuildApproval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BuildApproval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BuildApproval message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.BuildApproval} BuildApproval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildApproval.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildApproval(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.decode(reader, reader.uint32()); + break; + case 3: + message.result = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BuildApproval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.BuildApproval} BuildApproval + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BuildApproval.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BuildApproval message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BuildApproval.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.devtools.cloudbuild.v1.ApprovalConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.devtools.cloudbuild.v1.ApprovalResult.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a BuildApproval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.BuildApproval} BuildApproval + */ + BuildApproval.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildApproval) + return object; + var message = new $root.google.devtools.cloudbuild.v1.BuildApproval(); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "APPROVED": + case 2: + message.state = 2; + break; + case "REJECTED": + case 3: + message.state = 3; + break; + case "CANCELLED": + case 5: + message.state = 5; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildApproval.config: object expected"); + message.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.fromObject(object.config); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildApproval.result: object expected"); + message.result = $root.google.devtools.cloudbuild.v1.ApprovalResult.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a BuildApproval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {google.devtools.cloudbuild.v1.BuildApproval} message BuildApproval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildApproval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.config = null; + object.result = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildApproval.State[message.state] : message.state; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.toObject(message.config, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.devtools.cloudbuild.v1.ApprovalResult.toObject(message.result, options); + return object; + }; + + /** + * Converts this BuildApproval to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @instance + * @returns {Object.} JSON object + */ + BuildApproval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.devtools.cloudbuild.v1.BuildApproval.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} APPROVED=2 APPROVED value + * @property {number} REJECTED=3 REJECTED value + * @property {number} CANCELLED=5 CANCELLED value + */ + BuildApproval.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "APPROVED"] = 2; + values[valuesById[3] = "REJECTED"] = 3; + values[valuesById[5] = "CANCELLED"] = 5; + return values; + })(); + + return BuildApproval; + })(); + + v1.ApprovalConfig = (function() { + + /** + * Properties of an ApprovalConfig. + * @memberof google.devtools.cloudbuild.v1 + * @interface IApprovalConfig + * @property {boolean|null} [approvalRequired] ApprovalConfig approvalRequired + */ + + /** + * Constructs a new ApprovalConfig. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an ApprovalConfig. + * @implements IApprovalConfig + * @constructor + * @param {google.devtools.cloudbuild.v1.IApprovalConfig=} [properties] Properties to set + */ + function ApprovalConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApprovalConfig approvalRequired. + * @member {boolean} approvalRequired + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @instance + */ + ApprovalConfig.prototype.approvalRequired = false; + + /** + * Creates a new ApprovalConfig instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalConfig=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ApprovalConfig} ApprovalConfig instance + */ + ApprovalConfig.create = function create(properties) { + return new ApprovalConfig(properties); + }; + + /** + * Encodes the specified ApprovalConfig message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalConfig.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalConfig} message ApprovalConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApprovalConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.approvalRequired != null && Object.hasOwnProperty.call(message, "approvalRequired")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.approvalRequired); + return writer; + }; + + /** + * Encodes the specified ApprovalConfig message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalConfig} message ApprovalConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApprovalConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApprovalConfig message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ApprovalConfig} ApprovalConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApprovalConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ApprovalConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.approvalRequired = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApprovalConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ApprovalConfig} ApprovalConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApprovalConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApprovalConfig message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApprovalConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.approvalRequired != null && message.hasOwnProperty("approvalRequired")) + if (typeof message.approvalRequired !== "boolean") + return "approvalRequired: boolean expected"; + return null; + }; + + /** + * Creates an ApprovalConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ApprovalConfig} ApprovalConfig + */ + ApprovalConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ApprovalConfig) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ApprovalConfig(); + if (object.approvalRequired != null) + message.approvalRequired = Boolean(object.approvalRequired); + return message; + }; + + /** + * Creates a plain object from an ApprovalConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {google.devtools.cloudbuild.v1.ApprovalConfig} message ApprovalConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApprovalConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.approvalRequired = false; + if (message.approvalRequired != null && message.hasOwnProperty("approvalRequired")) + object.approvalRequired = message.approvalRequired; + return object; + }; + + /** + * Converts this ApprovalConfig to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @instance + * @returns {Object.} JSON object + */ + ApprovalConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ApprovalConfig; + })(); + + v1.ApprovalResult = (function() { + + /** + * Properties of an ApprovalResult. + * @memberof google.devtools.cloudbuild.v1 + * @interface IApprovalResult + * @property {string|null} [approverAccount] ApprovalResult approverAccount + * @property {google.protobuf.ITimestamp|null} [approvalTime] ApprovalResult approvalTime + * @property {google.devtools.cloudbuild.v1.ApprovalResult.Decision|null} [decision] ApprovalResult decision + * @property {string|null} [comment] ApprovalResult comment + * @property {string|null} [url] ApprovalResult url + */ + + /** + * Constructs a new ApprovalResult. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an ApprovalResult. + * @implements IApprovalResult + * @constructor + * @param {google.devtools.cloudbuild.v1.IApprovalResult=} [properties] Properties to set + */ + function ApprovalResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApprovalResult approverAccount. + * @member {string} approverAccount + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + */ + ApprovalResult.prototype.approverAccount = ""; + + /** + * ApprovalResult approvalTime. + * @member {google.protobuf.ITimestamp|null|undefined} approvalTime + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + */ + ApprovalResult.prototype.approvalTime = null; + + /** + * ApprovalResult decision. + * @member {google.devtools.cloudbuild.v1.ApprovalResult.Decision} decision + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + */ + ApprovalResult.prototype.decision = 0; + + /** + * ApprovalResult comment. + * @member {string} comment + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + */ + ApprovalResult.prototype.comment = ""; + + /** + * ApprovalResult url. + * @member {string} url + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + */ + ApprovalResult.prototype.url = ""; + + /** + * Creates a new ApprovalResult instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalResult=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ApprovalResult} ApprovalResult instance + */ + ApprovalResult.create = function create(properties) { + return new ApprovalResult(properties); + }; + + /** + * Encodes the specified ApprovalResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalResult.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalResult} message ApprovalResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApprovalResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.approverAccount != null && Object.hasOwnProperty.call(message, "approverAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.approverAccount); + if (message.approvalTime != null && Object.hasOwnProperty.call(message, "approvalTime")) + $root.google.protobuf.Timestamp.encode(message.approvalTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.decision != null && Object.hasOwnProperty.call(message, "decision")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.decision); + if (message.comment != null && Object.hasOwnProperty.call(message, "comment")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.comment); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.url); + return writer; + }; + + /** + * Encodes the specified ApprovalResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ApprovalResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {google.devtools.cloudbuild.v1.IApprovalResult} message ApprovalResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApprovalResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApprovalResult message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.ApprovalResult} ApprovalResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApprovalResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ApprovalResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.approverAccount = reader.string(); + break; + case 3: + message.approvalTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 4: + message.decision = reader.int32(); + break; + case 5: + message.comment = reader.string(); + break; + case 6: + message.url = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApprovalResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.ApprovalResult} ApprovalResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApprovalResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApprovalResult message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApprovalResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.approverAccount != null && message.hasOwnProperty("approverAccount")) + if (!$util.isString(message.approverAccount)) + return "approverAccount: string expected"; + if (message.approvalTime != null && message.hasOwnProperty("approvalTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.approvalTime); + if (error) + return "approvalTime." + error; + } + if (message.decision != null && message.hasOwnProperty("decision")) + switch (message.decision) { + default: + return "decision: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.comment != null && message.hasOwnProperty("comment")) + if (!$util.isString(message.comment)) + return "comment: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates an ApprovalResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ApprovalResult} ApprovalResult + */ + ApprovalResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ApprovalResult) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ApprovalResult(); + if (object.approverAccount != null) + message.approverAccount = String(object.approverAccount); + if (object.approvalTime != null) { + if (typeof object.approvalTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ApprovalResult.approvalTime: object expected"); + message.approvalTime = $root.google.protobuf.Timestamp.fromObject(object.approvalTime); + } + switch (object.decision) { + case "DECISION_UNSPECIFIED": + case 0: + message.decision = 0; + break; + case "APPROVED": + case 1: + message.decision = 1; + break; + case "REJECTED": + case 2: + message.decision = 2; + break; + } + if (object.comment != null) + message.comment = String(object.comment); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from an ApprovalResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {google.devtools.cloudbuild.v1.ApprovalResult} message ApprovalResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApprovalResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.approverAccount = ""; + object.approvalTime = null; + object.decision = options.enums === String ? "DECISION_UNSPECIFIED" : 0; + object.comment = ""; + object.url = ""; + } + if (message.approverAccount != null && message.hasOwnProperty("approverAccount")) + object.approverAccount = message.approverAccount; + if (message.approvalTime != null && message.hasOwnProperty("approvalTime")) + object.approvalTime = $root.google.protobuf.Timestamp.toObject(message.approvalTime, options); + if (message.decision != null && message.hasOwnProperty("decision")) + object.decision = options.enums === String ? $root.google.devtools.cloudbuild.v1.ApprovalResult.Decision[message.decision] : message.decision; + if (message.comment != null && message.hasOwnProperty("comment")) + object.comment = message.comment; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this ApprovalResult to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @instance + * @returns {Object.} JSON object + */ + ApprovalResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Decision enum. + * @name google.devtools.cloudbuild.v1.ApprovalResult.Decision + * @enum {number} + * @property {number} DECISION_UNSPECIFIED=0 DECISION_UNSPECIFIED value + * @property {number} APPROVED=1 APPROVED value + * @property {number} REJECTED=2 REJECTED value + */ + ApprovalResult.Decision = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECISION_UNSPECIFIED"] = 0; + values[valuesById[1] = "APPROVED"] = 1; + values[valuesById[2] = "REJECTED"] = 2; + return values; + })(); + + return ApprovalResult; + })(); + v1.BuildTrigger = (function() { /** diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index ffc8e0d1cf60..a2206d31019e 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -162,6 +162,40 @@ } ] }, + "ApproveBuild": { + "requestType": "ApproveBuildRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/builds/*}:approve", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/builds/*}:approve", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,approval_result", + "(google.longrunning.operation_info).response_type": "Build", + "(google.longrunning.operation_info).metadata_type": "BuildOperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/builds/*}:approve", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/builds/*}:approve", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,approval_result" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Build", + "metadata_type": "BuildOperationMetadata" + } + } + ] + }, "CreateBuildTrigger": { "requestType": "CreateBuildTriggerRequest", "responseType": "BuildTrigger", @@ -905,6 +939,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "approval": { + "type": "BuildApproval", + "id": 44, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "serviceAccount": { "type": "string", "id": 42, @@ -983,6 +1024,7 @@ "Status": { "values": { "STATUS_UNKNOWN": 0, + "PENDING": 10, "QUEUED": 1, "WORKING": 2, "SUCCESS": 3, @@ -1280,6 +1322,113 @@ } } }, + "ApproveBuildRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "approvalResult": { + "type": "ApprovalResult", + "id": 2 + } + } + }, + "BuildApproval": { + "fields": { + "state": { + "type": "State", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "config": { + "type": "ApprovalConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "result": { + "type": "ApprovalResult", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "APPROVED": 2, + "REJECTED": 3, + "CANCELLED": 5 + } + } + } + }, + "ApprovalConfig": { + "fields": { + "approvalRequired": { + "type": "bool", + "id": 1 + } + } + }, + "ApprovalResult": { + "fields": { + "approverAccount": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "approvalTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "decision": { + "type": "Decision", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "comment": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "url": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Decision": { + "values": { + "DECISION_UNSPECIFIED": 0, + "APPROVED": 1, + "REJECTED": 2 + } + } + } + }, "BuildTrigger": { "options": { "(google.api.resource).type": "cloudbuild.googleapis.com/BuildTrigger", diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 099fc458aab4..bc435fd4abc8 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -250,6 +250,12 @@ export class CloudBuildClient { const retryBuildMetadata = protoFilesRoot.lookup( '.google.devtools.cloudbuild.v1.BuildOperationMetadata' ) as gax.protobuf.Type; + const approveBuildResponse = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.Build' + ) as gax.protobuf.Type; + const approveBuildMetadata = protoFilesRoot.lookup( + '.google.devtools.cloudbuild.v1.BuildOperationMetadata' + ) as gax.protobuf.Type; const runBuildTriggerResponse = protoFilesRoot.lookup( '.google.devtools.cloudbuild.v1.Build' ) as gax.protobuf.Type; @@ -286,6 +292,11 @@ export class CloudBuildClient { retryBuildResponse.decode.bind(retryBuildResponse), retryBuildMetadata.decode.bind(retryBuildMetadata) ), + approveBuild: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + approveBuildResponse.decode.bind(approveBuildResponse), + approveBuildMetadata.decode.bind(approveBuildMetadata) + ), runBuildTrigger: new this._gaxModule.LongrunningDescriptor( this.operationsClient, runBuildTriggerResponse.decode.bind(runBuildTriggerResponse), @@ -363,6 +374,7 @@ export class CloudBuildClient { 'listBuilds', 'cancelBuild', 'retryBuild', + 'approveBuild', 'createBuildTrigger', 'getBuildTrigger', 'listBuildTriggers', @@ -1589,6 +1601,155 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata >; } + approveBuild( + request?: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + approveBuild( + request: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + approveBuild( + request: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Approves or rejects a pending build. + * + * If approved, the returned LRO will be analogous to the LRO returned from + * a CreateBuild call. + * + * If rejected, the returned LRO will be immediately done. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the target build. + * For example: "projects/{$project_id}/builds/{$build_id}" + * @param {google.devtools.cloudbuild.v1.ApprovalResult} request.approvalResult + * Approval decision and metadata. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.approveBuild(request); + * const [response] = await operation.promise(); + */ + approveBuild( + request?: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + name: request.name || '', + }); + this.initialize(); + return this.innerApiCalls.approveBuild(request, options, callback); + } + /** + * Check the status of the long running operation returned by `approveBuild()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkApproveBuildProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkApproveBuildProgress( + name: string + ): Promise< + LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.approveBuild, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.devtools.cloudbuild.v1.Build, + protos.google.devtools.cloudbuild.v1.BuildOperationMetadata + >; + } runBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: CallOptions diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json index 59a36aa4bb35..c677cba6cb74 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client_config.json @@ -45,6 +45,10 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default" }, + "ApproveBuild": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, "CreateBuildTrigger": { "timeout_millis": 600000, "retry_codes_name": "non_idempotent", diff --git a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json index 254f6186caf0..33226421337b 100644 --- a/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json +++ b/packages/google-devtools-cloudbuild/src/v1/gapic_metadata.json @@ -60,6 +60,11 @@ "retryBuild" ] }, + "ApproveBuild": { + "methods": [ + "approveBuild" + ] + }, "RunBuildTrigger": { "methods": [ "runBuildTrigger" @@ -156,6 +161,11 @@ "retryBuild" ] }, + "ApproveBuild": { + "methods": [ + "approveBuild" + ] + }, "RunBuildTrigger": { "methods": [ "runBuildTrigger" diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 40c4d457c44d..ec203735de99 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -1529,6 +1529,196 @@ describe('v1.CloudBuildClient', () => { }); }); + describe('approveBuild', () => { + it('invokes approveBuild without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.approveBuild = stubLongRunningCall(expectedResponse); + const [operation] = await client.approveBuild(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.approveBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes approveBuild without error using callback', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.approveBuild = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.approveBuild( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.approveBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes approveBuild with call error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.approveBuild = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.approveBuild(request), expectedError); + assert( + (client.innerApiCalls.approveBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes approveBuild with LRO error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.approveBuild = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.approveBuild(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.approveBuild as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkApproveBuildProgress without error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkApproveBuildProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkApproveBuildProgress with error', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkApproveBuildProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('runBuildTrigger', () => { it('invokes runBuildTrigger without error', async () => { const client = new cloudbuildModule.v1.CloudBuildClient({ From 9337b5d61ff543ef0c4101a790931dac2b7ba720 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 16 Aug 2021 21:20:10 +0000 Subject: [PATCH 173/223] chore: release 2.4.0 (#270) :robot: I have created a release \*beep\* \*boop\* --- ## [2.4.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.2...v2.4.0) (2021-08-16) ### Features * Add ability to configure BuildTriggers to create Builds that require approval before executing and ApproveBuild API to approve or reject pending Builds ([#267](https://www.github.com/googleapis/nodejs-cloudbuild/issues/267)) ([18ec067](https://www.github.com/googleapis/nodejs-cloudbuild/commit/18ec067ac1e112836c5d56747dda89e04f87c481)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index d29ed78132b1..f1673d504144 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.2...v2.4.0) (2021-08-16) + + +### Features + +* Add ability to configure BuildTriggers to create Builds that require approval before executing and ApproveBuild API to approve or reject pending Builds ([#267](https://www.github.com/googleapis/nodejs-cloudbuild/issues/267)) ([18ec067](https://www.github.com/googleapis/nodejs-cloudbuild/commit/18ec067ac1e112836c5d56747dda89e04f87c481)) + ### [2.3.2](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.1...v2.3.2) (2021-08-16) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 44f85c190d91..b3e1bc69407b 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.3.2", + "version": "2.4.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 6eaa99d37343..55b8112f89c9 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.3.2" + "@google-cloud/cloudbuild": "^2.4.0" }, "devDependencies": { "c8": "^7.0.0", From 1c8954feb7e6d3aa836b027d6d9dafb703a10947 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:32:19 +0000 Subject: [PATCH 174/223] feat: turns on self-signed JWT feature flag (#271) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 392067151 Source-Link: https://github.com/googleapis/googleapis/commit/06345f7b95c4b4a3ffe4303f1f2984ccc304b2e0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/95882b37970e41e4cd51b22fa507cfd46dc7c4b6 --- .../src/v1/cloud_build_client.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index bc435fd4abc8..662aeb8f1ac7 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -140,6 +140,12 @@ export class CloudBuildClient { // 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; @@ -3555,6 +3561,7 @@ export class CloudBuildClient { return this.cloudBuildStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); From 473fc38c509252c31e5b0232f5f332c05d26e28b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 20:28:36 +0000 Subject: [PATCH 175/223] chore: release 2.5.0 (#272) :robot: I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.4.0...v2.5.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#271](https://www.github.com/googleapis/nodejs-cloudbuild/issues/271)) ([dcb970d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/dcb970d8a6a7d87da553667cd25f8eb1052ba047)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index f1673d504144..52022a46e008 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.4.0...v2.5.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#271](https://www.github.com/googleapis/nodejs-cloudbuild/issues/271)) ([dcb970d](https://www.github.com/googleapis/nodejs-cloudbuild/commit/dcb970d8a6a7d87da553667cd25f8eb1052ba047)) + ## [2.4.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.3.2...v2.4.0) (2021-08-16) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index b3e1bc69407b..bc683e804273 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.4.0", + "version": "2.5.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 55b8112f89c9..bd574dadf5c5 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.4.0" + "@google-cloud/cloudbuild": "^2.5.0" }, "devDependencies": { "c8": "^7.0.0", From 2327a412d60cbcbbecfa181aa09b505a563040d9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:55:32 -0700 Subject: [PATCH 176/223] feat: add script field to BuildStep message (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat:add script field to BuildStep message PiperOrigin-RevId: 392761119 Source-Link: https://github.com/googleapis/googleapis/commit/3cd708edbc97d8b0ceee6e667229e19f19249806 Source-Link: https://github.com/googleapis/googleapis-gen/commit/05d56192ca207d89227b4b28a73bbeab312bd097 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../devtools/cloudbuild/v1/cloudbuild.proto | 5 +++++ .../protos/protos.d.ts | 6 +++++ .../protos/protos.js | 22 +++++++++++++++++++ .../protos/protos.json | 4 ++++ 4 files changed, 37 insertions(+) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 6a932bae81d0..9b23d2c084b2 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -597,6 +597,11 @@ message BuildStep { // only updated on build completion; step status is not updated in real-time // as the build progresses. Build.Status status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // A shell script to be executed in the step. + // + // When script is provided, the user cannot specify the entrypoint or args. + string script = 19; } // Volume describes a Docker container volume which is mounted into build steps diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index fd33ae29ab94..5a52d4161979 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1225,6 +1225,9 @@ export namespace google { /** BuildStep status */ status?: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status|null); + + /** BuildStep script */ + script?: (string|null); } /** Represents a BuildStep. */ @@ -1275,6 +1278,9 @@ export namespace google { /** BuildStep status. */ public status: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status); + /** BuildStep script. */ + public script: string; + /** * Creates a new BuildStep instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 9435efc20b41..b77c40578a67 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -2622,6 +2622,7 @@ * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pullTiming] BuildStep pullTiming * @property {google.protobuf.IDuration|null} [timeout] BuildStep timeout * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] BuildStep status + * @property {string|null} [script] BuildStep script */ /** @@ -2748,6 +2749,14 @@ */ BuildStep.prototype.status = 0; + /** + * BuildStep script. + * @member {string} script + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.script = ""; + /** * Creates a new BuildStep instance using the specified properties. * @function create @@ -2803,6 +2812,8 @@ writer.uint32(/* id 12, wireType 0 =*/96).int32(message.status); if (message.pullTiming != null && Object.hasOwnProperty.call(message, "pullTiming")) $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pullTiming, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.script); return writer; }; @@ -2886,6 +2897,9 @@ case 12: message.status = reader.int32(); break; + case 19: + message.script = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -3001,6 +3015,9 @@ case 9: break; } + if (message.script != null && message.hasOwnProperty("script")) + if (!$util.isString(message.script)) + return "script: string expected"; return null; }; @@ -3119,6 +3136,8 @@ message.status = 9; break; } + if (object.script != null) + message.script = String(object.script); return message; }; @@ -3151,6 +3170,7 @@ object.timeout = null; object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; object.pullTiming = null; + object.script = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -3193,6 +3213,8 @@ object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) object.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pullTiming, options); + if (message.script != null && message.hasOwnProperty("script")) + object.script = message.script; return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index a2206d31019e..612a3b4d7371 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -733,6 +733,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "script": { + "type": "string", + "id": 19 } } }, From b4e51ef000e273348c738010ffb90d8064d8d16d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 13:55:53 -0700 Subject: [PATCH 177/223] feat: Update cloudbuild proto with the service_account for BYOSA Triggers. (#274) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Update cloudbuild proto with the service_account for BYOSA Triggers. Committer: @emoryruscus PiperOrigin-RevId: 392957767 Source-Link: https://github.com/googleapis/googleapis/commit/5572865403528e706cd895b8817f0e54fae74c02 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc40f42cd8c669e2a87a2cc672e70c37f361d224 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../devtools/cloudbuild/v1/cloudbuild.proto | 9 ++++++++ .../protos/protos.d.ts | 6 +++++ .../protos/protos.js | 22 +++++++++++++++++++ .../protos/protos.json | 7 ++++++ 4 files changed, 44 insertions(+) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 9b23d2c084b2..3f980c7b184f 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -1377,6 +1377,15 @@ message BuildTrigger { // Optional. A Common Expression Language string. string filter = 30 [(google.api.field_behavior) = OPTIONAL]; + + // The service account used for all user-controlled operations including + // UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. + // If no service account is set, then the standard Cloud Build service account + // ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. + // Format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}` + string service_account = 33 [(google.api.resource_reference) = { + type: "iam.googleapis.com/ServiceAccount" + }]; } // GitHubEventsConfig describes the configuration of a trigger that creates a diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 5a52d4161979..bcee5f2a7a4c 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -4227,6 +4227,9 @@ export namespace google { /** BuildTrigger filter */ filter?: (string|null); + + /** BuildTrigger serviceAccount */ + serviceAccount?: (string|null); } /** Represents a BuildTrigger. */ @@ -4292,6 +4295,9 @@ export namespace google { /** BuildTrigger filter. */ public filter: string; + /** BuildTrigger serviceAccount. */ + public serviceAccount: string; + /** BuildTrigger buildTemplate. */ public buildTemplate?: ("autodetect"|"build"|"filename"); diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index b77c40578a67..3534fd081c9f 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -10565,6 +10565,7 @@ * @property {Array.|null} [ignoredFiles] BuildTrigger ignoredFiles * @property {Array.|null} [includedFiles] BuildTrigger includedFiles * @property {string|null} [filter] BuildTrigger filter + * @property {string|null} [serviceAccount] BuildTrigger serviceAccount */ /** @@ -10730,6 +10731,14 @@ */ BuildTrigger.prototype.filter = ""; + /** + * BuildTrigger serviceAccount. + * @member {string} serviceAccount + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @instance + */ + BuildTrigger.prototype.serviceAccount = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -10806,6 +10815,8 @@ writer.uint32(/* id 30, wireType 2 =*/242).string(message.filter); if (message.webhookConfig != null && Object.hasOwnProperty.call(message, "webhookConfig")) $root.google.devtools.cloudbuild.v1.WebhookConfig.encode(message.webhookConfig, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 33, wireType 2 =*/266).string(message.serviceAccount); if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) writer.uint32(/* id 34, wireType 2 =*/274).string(message.resourceName); return writer; @@ -10921,6 +10932,9 @@ case 30: message.filter = reader.string(); break; + case 33: + message.serviceAccount = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -11051,6 +11065,9 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; return null; }; @@ -11140,6 +11157,8 @@ } if (object.filter != null) message.filter = String(object.filter); + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); return message; }; @@ -11174,6 +11193,7 @@ object.pubsubConfig = null; object.filter = ""; object.webhookConfig = null; + object.serviceAccount = ""; object.resourceName = ""; } if (message.id != null && message.hasOwnProperty("id")) @@ -11232,6 +11252,8 @@ object.filter = message.filter; if (message.webhookConfig != null && message.hasOwnProperty("webhookConfig")) object.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.toObject(message.webhookConfig, options); + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; if (message.resourceName != null && message.hasOwnProperty("resourceName")) object.resourceName = message.resourceName; return object; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 612a3b4d7371..714dafcaefdb 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -1534,6 +1534,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "serviceAccount": { + "type": "string", + "id": 33, + "options": { + "(google.api.resource_reference).type": "iam.googleapis.com/ServiceAccount" + } } } }, From 5fab75624f04ac87dab11ab442b919a06d67f0f5 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 25 Aug 2021 14:02:11 -0700 Subject: [PATCH 178/223] chore: release 2.6.0 (#275) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-devtools-cloudbuild/CHANGELOG.md | 8 ++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 52022a46e008..b2025bce3f3e 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [2.6.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.5.0...v2.6.0) (2021-08-25) + + +### Features + +* add script field to BuildStep message ([#273](https://www.github.com/googleapis/nodejs-cloudbuild/issues/273)) ([b91fb68](https://www.github.com/googleapis/nodejs-cloudbuild/commit/b91fb68748dbc0ddafde776eaaf81f211102a3b2)) +* Update cloudbuild proto with the service_account for BYOSA Triggers. ([#274](https://www.github.com/googleapis/nodejs-cloudbuild/issues/274)) ([0ad4f9b](https://www.github.com/googleapis/nodejs-cloudbuild/commit/0ad4f9b9646a66ab6a5a91ddbbf7c8644c17317c)) + ## [2.5.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.4.0...v2.5.0) (2021-08-23) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index bc683e804273..a24015de6b22 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.5.0", + "version": "2.6.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index bd574dadf5c5..74c3bbfcc018 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.5.0" + "@google-cloud/cloudbuild": "^2.6.0" }, "devDependencies": { "c8": "^7.0.0", From 3fb8f373101318b8e6f945ec51d317d7ab7afc95 Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Tue, 21 Sep 2021 07:14:54 -0700 Subject: [PATCH 179/223] chore: relocate owl bot post processor (#278) chore: relocate owl bot post processor --- packages/google-devtools-cloudbuild/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml b/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml index 35d6eb7d39f7..0b979a333250 100644 --- a/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml +++ b/packages/google-devtools-cloudbuild/.github/.OwlBot.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. docker: - image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging From 37dca7086a1957ea0df4c1e78eed8fd6fa178be3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 14 Oct 2021 00:48:24 +0000 Subject: [PATCH 180/223] build(node): update deps used during postprocessing (#1243) (#283) --- .../google-devtools-cloudbuild/protos/protos.d.ts | 3 ++- .../google-devtools-cloudbuild/protos/protos.js | 7 +++++++ .../google-devtools-cloudbuild/protos/protos.json | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index bcee5f2a7a4c..141ae61c3326 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -7766,7 +7766,8 @@ export namespace google { OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, - UNORDERED_LIST = 6 + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 } /** Properties of a HttpBody. */ diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 3534fd081c9f..f13b04000282 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -19779,6 +19779,7 @@ * @property {number} INPUT_ONLY=4 INPUT_ONLY value * @property {number} IMMUTABLE=5 IMMUTABLE value * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value */ api.FieldBehavior = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -19789,6 +19790,7 @@ values[valuesById[4] = "INPUT_ONLY"] = 4; values[valuesById[5] = "IMMUTABLE"] = 5; values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; return values; })(); @@ -26220,6 +26222,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -26324,6 +26327,10 @@ case 6: message[".google.api.fieldBehavior"][i] = 6; break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; } } if (object[".google.api.resourceReference"] != null) { diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 714dafcaefdb..3066f2aec4af 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -2441,7 +2441,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "HttpBody": { @@ -3101,6 +3102,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 5331da8f327e5cd767f51d94b217b7e34b014302 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Oct 2021 19:07:43 +0200 Subject: [PATCH 181/223] chore(deps): update node.js to v17 (#284) --- packages/google-devtools-cloudbuild/cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml index 9eafcc216994..10f85817b793 100644 --- a/packages/google-devtools-cloudbuild/cloudbuild.yaml +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -1,7 +1,7 @@ steps: -- name: node:16 +- name: node:17 entrypoint: npm args: ['install'] -- name: node:16 +- name: node:17 entrypoint: npm args: ['test'] From 55d0bdd2182e33141a3622b5743bcf1b139c7f3f Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 3 Nov 2021 11:48:21 -0400 Subject: [PATCH 182/223] chore(cloud-rad): delete api-extractor config (#285) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-devtools-cloudbuild/api-extractor.json diff --git a/packages/google-devtools-cloudbuild/api-extractor.json b/packages/google-devtools-cloudbuild/api-extractor.json deleted file mode 100644 index de228294b237..000000000000 --- a/packages/google-devtools-cloudbuild/api-extractor.json +++ /dev/null @@ -1,369 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/protos/protos.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we can specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - */ - "bundledPackages": [ ], - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true, - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/etc/" - */ - // "reportFolder": "/etc/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/" - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true, - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true, - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning", - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - }, - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - }, - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning", - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } - -} From 6b6cdd62b61009a0473dca67bd2c26b37d08eceb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:40:25 +0100 Subject: [PATCH 183/223] chore(deps): update dependency sinon to v12 (#286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^11.0.0` -> `^12.0.0`](https://renovatebot.com/diffs/npm/sinon/11.1.2/12.0.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/compatibility-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/12.0.1/confidence-slim/11.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v12.0.1`](https://togithub.com/sinonjs/sinon/blob/master/CHANGES.md#​1201) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.0...v12.0.1) - [`3f598221`](https://togithub.com/sinonjs/sinon/commit/3f598221045904681f2b3b3ba1df617ed5e230e3) Fix issue with npm unlink for npm version > 6 (Carl-Erik Kopseng) > 'npm unlink' would implicitly unlink the current dir > until version 7, which requires an argument - [`51417a38`](https://togithub.com/sinonjs/sinon/commit/51417a38111eeeb7cd14338bfb762cc2df487e1b) Fix bundling of cjs module ([#​2412](https://togithub.com/sinonjs/sinon/issues/2412)) (Julian Grinblat) > - Fix bundling of cjs module > > - Run prettier *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2021-11-04.* #### 12.0.0 ### [`v12.0.0`](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v11.1.2...v12.0.0)
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index a24015de6b22..5f07aef79475 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "linkinator": "^2.0.0", "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^11.0.0", + "sinon": "^12.0.0", "typescript": "^3.8.3" }, "scripts": { From f27d1a7d8dcbb2577369e84ffb3ba19817a328e1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 15:38:06 -0800 Subject: [PATCH 184/223] docs(samples): add example tags to generated samples (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs(samples): add example tags to generated samples PiperOrigin-RevId: 408439482 Source-Link: https://github.com/googleapis/googleapis/commit/b9f61843dc80c7c285fc34fd3a40aae55082c2b9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/eb888bc214efc7bf43bf4634b470254565a659a5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWI4ODhiYzIxNGVmYzdiZjQzYmY0NjM0YjQ3MDI1NDU2NWE2NTlhNSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: change node version for sample Co-authored-by: Owl Bot Co-authored-by: Takashi Matsuo --- .../linkinator.config.json | 2 +- .../generated/v1/cloud_build.approve_build.js | 58 + .../generated/v1/cloud_build.cancel_build.js | 62 + .../generated/v1/cloud_build.create_build.js | 63 + .../v1/cloud_build.create_build_trigger.js | 62 + .../v1/cloud_build.create_worker_pool.js | 72 ++ .../v1/cloud_build.delete_build_trigger.js | 62 + .../v1/cloud_build.delete_worker_pool.js | 70 ++ .../generated/v1/cloud_build.get_build.js | 62 + .../v1/cloud_build.get_build_trigger.js | 62 + .../v1/cloud_build.get_worker_pool.js | 53 + .../v1/cloud_build.list_build_triggers.js | 67 ++ .../generated/v1/cloud_build.list_builds.js | 76 ++ .../v1/cloud_build.list_worker_pools.js | 65 + .../v1/cloud_build.receive_trigger_webhook.js | 67 ++ .../generated/v1/cloud_build.retry_build.js | 63 + .../v1/cloud_build.run_build_trigger.js | 67 ++ .../v1/cloud_build.update_build_trigger.js | 62 + .../v1/cloud_build.update_worker_pool.js | 64 + .../samples/package.json | 2 +- .../src/v1/cloud_build_client.ts | 1062 ++++++++--------- 21 files changed, 1673 insertions(+), 550 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js diff --git a/packages/google-devtools-cloudbuild/linkinator.config.json b/packages/google-devtools-cloudbuild/linkinator.config.json index 29a223b6db64..0121dfa684f7 100644 --- a/packages/google-devtools-cloudbuild/linkinator.config.json +++ b/packages/google-devtools-cloudbuild/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js new file mode 100644 index 000000000000..a139b8310d65 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js @@ -0,0 +1,58 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the target build. + * For example: "projects/{$project_id}/builds/{$build_id}" + */ + // const name = 'abc123' + /** + * Approval decision and metadata. + */ + // const approvalResult = {} + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callApproveBuild() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cloudbuildClient.approveBuild(request); + const [response] = await operation.promise(); + console.log(response); + } + + callApproveBuild(); + // [END cloudbuild_v1_generated_CloudBuild_ApproveBuild_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js new file mode 100644 index 000000000000..bfdd1325295d --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, id) { + // [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Build` to cancel. + * Format: `projects/{project}/locations/{location}/builds/{build}` + */ + // const name = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Required. ID of the build. + */ + // const id = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callCancelBuild() { + // Construct request + const request = { + projectId, + id, + }; + + // Run request + const response = await cloudbuildClient.cancelBuild(request); + console.log(response); + } + + callCancelBuild(); + // [END cloudbuild_v1_generated_CloudBuild_CancelBuild_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js new file mode 100644 index 000000000000..8800bb5a589f --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, build) { + // [START cloudbuild_v1_generated_CloudBuild_CreateBuild_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent resource where this build will be created. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Required. Build resource to create. + */ + // const build = {} + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callCreateBuild() { + // Construct request + const request = { + projectId, + build, + }; + + // Run request + const [operation] = await cloudbuildClient.createBuild(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateBuild(); + // [END cloudbuild_v1_generated_CloudBuild_CreateBuild_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js new file mode 100644 index 000000000000..da9973765ddf --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, trigger) { + // [START cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent resource where this trigger will be created. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. ID of the project for which to configure automatic builds. + */ + // const projectId = 'abc123' + /** + * Required. `BuildTrigger` to create. + */ + // const trigger = {} + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callCreateBuildTrigger() { + // Construct request + const request = { + projectId, + trigger, + }; + + // Run request + const response = await cloudbuildClient.createBuildTrigger(request); + console.log(response); + } + + callCreateBuildTrigger(); + // [END cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js new file mode 100644 index 000000000000..5b5613cd6cff --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js @@ -0,0 +1,72 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent, workerPool, workerPoolId) { + // [START cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this worker pool will be created. + * Format: `projects/{project}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. `WorkerPool` resource to create. + */ + // const workerPool = {} + /** + * Required. Immutable. The ID to use for the `WorkerPool`, which will become + * the final component of the resource name. + * This value should be 1-63 characters, and valid characters + * are /[a-z][0-9]-/. + */ + // const workerPoolId = 'abc123' + /** + * If set, validate the request and preview the response, but do not actually + * post it. + */ + // const validateOnly = true + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callCreateWorkerPool() { + // Construct request + const request = { + parent, + workerPool, + workerPoolId, + }; + + // Run request + const [operation] = await cloudbuildClient.createWorkerPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateWorkerPool(); + // [END cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js new file mode 100644 index 000000000000..9c6dafd26e5b --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, triggerId) { + // [START cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Trigger` to delete. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + */ + // const name = 'abc123' + /** + * Required. ID of the project that owns the trigger. + */ + // const projectId = 'abc123' + /** + * Required. ID of the `BuildTrigger` to delete. + */ + // const triggerId = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callDeleteBuildTrigger() { + // Construct request + const request = { + projectId, + triggerId, + }; + + // Run request + const response = await cloudbuildClient.deleteBuildTrigger(request); + console.log(response); + } + + callDeleteBuildTrigger(); + // [END cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js new file mode 100644 index 000000000000..830b650b748b --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js @@ -0,0 +1,70 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `WorkerPool` to delete. + * Format: + * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + */ + // const name = 'abc123' + /** + * Optional. If this is provided, it must match the server's etag on the + * workerpool for the request to be processed. + */ + // const etag = 'abc123' + /** + * If set to true, and the `WorkerPool` is not found, the request will succeed + * but no action will be taken on the server. + */ + // const allowMissing = true + /** + * If set, validate the request and preview the response, but do not actually + * post it. + */ + // const validateOnly = true + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callDeleteWorkerPool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await cloudbuildClient.deleteWorkerPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteWorkerPool(); + // [END cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js new file mode 100644 index 000000000000..81532a014d73 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, id) { + // [START cloudbuild_v1_generated_CloudBuild_GetBuild_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Build` to retrieve. + * Format: `projects/{project}/locations/{location}/builds/{build}` + */ + // const name = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Required. ID of the build. + */ + // const id = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callGetBuild() { + // Construct request + const request = { + projectId, + id, + }; + + // Run request + const response = await cloudbuildClient.getBuild(request); + console.log(response); + } + + callGetBuild(); + // [END cloudbuild_v1_generated_CloudBuild_GetBuild_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js new file mode 100644 index 000000000000..327947a8dc97 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, triggerId) { + // [START cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Trigger` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + */ + // const name = 'abc123' + /** + * Required. ID of the project that owns the trigger. + */ + // const projectId = 'abc123' + /** + * Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + */ + // const triggerId = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callGetBuildTrigger() { + // Construct request + const request = { + projectId, + triggerId, + }; + + // Run request + const response = await cloudbuildClient.getBuildTrigger(request); + console.log(response); + } + + callGetBuildTrigger(); + // [END cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js new file mode 100644 index 000000000000..30e79de6213b --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js @@ -0,0 +1,53 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the `WorkerPool` to retrieve. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + */ + // const name = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callGetWorkerPool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await cloudbuildClient.getWorkerPool(request); + console.log(response); + } + + callGetWorkerPool(); + // [END cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js new file mode 100644 index 000000000000..5cb5f6eb9725 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId) { + // [START cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent of the collection of `Triggers`. + * Format: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. ID of the project for which to list BuildTriggers. + */ + // const projectId = 'abc123' + /** + * Number of results to return in the list. + */ + // const pageSize = 1234 + /** + * Token to provide to skip to a particular spot in the list. + */ + // const pageToken = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callListBuildTriggers() { + // Construct request + const request = { + projectId, + }; + + // Run request + const iterable = await cloudbuildClient.listBuildTriggersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBuildTriggers(); + // [END cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js new file mode 100644 index 000000000000..e334dbdd77ab --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js @@ -0,0 +1,76 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId) { + // [START cloudbuild_v1_generated_CloudBuild_ListBuilds_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent of the collection of `Builds`. + * Format: `projects/{project}/locations/location` + */ + // const parent = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Number of results to return in the list. + */ + // const pageSize = 1234 + /** + * The page token for the next page of Builds. + * If unspecified, the first page of results is returned. + * If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. + * In this case, the token should be discarded, and pagination should be + * restarted from the first page of results. + * See https://google.aip.dev/158 for more. + */ + // const pageToken = 'abc123' + /** + * The raw filter text to constrain the results. + */ + // const filter = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callListBuilds() { + // Construct request + const request = { + projectId, + }; + + // Run request + const iterable = await cloudbuildClient.listBuildsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBuilds(); + // [END cloudbuild_v1_generated_CloudBuild_ListBuilds_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js new file mode 100644 index 000000000000..a917074484bb --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js @@ -0,0 +1,65 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(parent) { + // [START cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent of the collection of `WorkerPools`. + * Format: `projects/{project}/locations/{location}`. + */ + // const parent = 'abc123' + /** + * The maximum number of `WorkerPool`s to return. The service may return + * fewer than this value. If omitted, the server will use a sensible default. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListWorkerPools` call. Provide this + * to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callListWorkerPools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await cloudbuildClient.listWorkerPoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkerPools(); + // [END cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js new file mode 100644 index 000000000000..16fc4a55bb5f --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main() { + // [START cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `ReceiveTriggerWebhook` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + */ + // const name = 'abc123' + /** + * HTTP request body. + */ + // const body = {} + /** + * Project in which the specified trigger lives + */ + // const projectId = 'abc123' + /** + * Name of the trigger to run the payload against + */ + // const trigger = 'abc123' + /** + * Secret token used for authorization if an OAuth token isn't provided. + */ + // const secret = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callReceiveTriggerWebhook() { + // Construct request + const request = {}; + + // Run request + const response = await cloudbuildClient.receiveTriggerWebhook(request); + console.log(response); + } + + callReceiveTriggerWebhook(); + // [END cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js new file mode 100644 index 000000000000..286cc3106797 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, id) { + // [START cloudbuild_v1_generated_CloudBuild_RetryBuild_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Build` to retry. + * Format: `projects/{project}/locations/{location}/builds/{build}` + */ + // const name = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Required. Build ID of the original build. + */ + // const id = 'abc123' + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callRetryBuild() { + // Construct request + const request = { + projectId, + id, + }; + + // Run request + const [operation] = await cloudbuildClient.retryBuild(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRetryBuild(); + // [END cloudbuild_v1_generated_CloudBuild_RetryBuild_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js new file mode 100644 index 000000000000..e4dfbdf4a6c3 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js @@ -0,0 +1,67 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, triggerId) { + // [START cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The name of the `Trigger` to run. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + */ + // const name = 'abc123' + /** + * Required. ID of the project. + */ + // const projectId = 'abc123' + /** + * Required. ID of the trigger. + */ + // const triggerId = 'abc123' + /** + * Source to build against this trigger. + */ + // const source = {} + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callRunBuildTrigger() { + // Construct request + const request = { + projectId, + triggerId, + }; + + // Run request + const [operation] = await cloudbuildClient.runBuildTrigger(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRunBuildTrigger(); + // [END cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js new file mode 100644 index 000000000000..8d2b93a3a344 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(projectId, triggerId, trigger) { + // [START cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. ID of the project that owns the trigger. + */ + // const projectId = 'abc123' + /** + * Required. ID of the `BuildTrigger` to update. + */ + // const triggerId = 'abc123' + /** + * Required. `BuildTrigger` to update. + */ + // const trigger = {} + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callUpdateBuildTrigger() { + // Construct request + const request = { + projectId, + triggerId, + trigger, + }; + + // Run request + const response = await cloudbuildClient.updateBuildTrigger(request); + console.log(response); + } + + callUpdateBuildTrigger(); + // [END cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js new file mode 100644 index 000000000000..03af92264608 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.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 +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(workerPool) { + // [START cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The `WorkerPool` to update. + * The `name` field is used to identify the `WorkerPool` to update. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + */ + // const workerPool = {} + /** + * A mask specifying which fields in `worker_pool` to update. + */ + // const updateMask = {} + /** + * If set, validate the request and preview the response, but do not actually + * post it. + */ + // const validateOnly = true + + // Imports the Cloudbuild library + const {CloudBuildClient} = require('@google-cloud/cloudbuild').v1; + + // Instantiates a client + const cloudbuildClient = new CloudBuildClient(); + + async function callUpdateWorkerPool() { + // Construct request + const request = { + workerPool, + }; + + // Run request + const [operation] = await cloudbuildClient.updateWorkerPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateWorkerPool(); + // [END cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 74c3bbfcc018..f973e1017c4d 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -9,7 +9,7 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-cloudbuild", "engines": { - "node": ">=8" + "node": ">=10" }, "scripts": { "test": "c8 mocha system-test --timeout=800000" diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 662aeb8f1ac7..e7ee66ddf074 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -478,6 +478,31 @@ export class CloudBuildClient { // ------------------- // -- Service calls -- // ------------------- + /** + * Returns information about a previously requested build. + * + * The `Build` that is returned includes its status (such as `SUCCESS`, + * `FAILURE`, or `WORKING`), and timing information. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `Build` to retrieve. + * Format: `projects/{project}/locations/{location}/builds/{build}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.get_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_GetBuild_async + */ getBuild( request?: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, options?: CallOptions @@ -505,31 +530,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Returns information about a previously requested build. - * - * The `Build` that is returned includes its status (such as `SUCCESS`, - * `FAILURE`, or `WORKING`), and timing information. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `Build` to retrieve. - * Format: `projects/{project}/locations/{location}/builds/{build}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * 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.getBuild(request); - */ getBuild( request?: protos.google.devtools.cloudbuild.v1.IGetBuildRequest, optionsOrCallback?: @@ -572,6 +572,28 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.getBuild(request, options, callback); } + /** + * Cancels a build in progress. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `Build` to cancel. + * Format: `projects/{project}/locations/{location}/builds/{build}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.id + * Required. ID of the build. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.cancel_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CancelBuild_async + */ cancelBuild( request?: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, options?: CallOptions @@ -603,28 +625,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Cancels a build in progress. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `Build` to cancel. - * Format: `projects/{project}/locations/{location}/builds/{build}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.id - * Required. ID of the build. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Build]{@link google.devtools.cloudbuild.v1.Build}. - * 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.cancelBuild(request); - */ cancelBuild( request?: protos.google.devtools.cloudbuild.v1.ICancelBuildRequest, optionsOrCallback?: @@ -669,6 +669,30 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.cancelBuild(request, options, callback); } + /** + * Creates a new `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent resource where this trigger will be created. + * Format: `projects/{project}/locations/{location}` + * @param {string} request.projectId + * Required. ID of the project for which to configure automatic builds. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.create_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async + */ createBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, options?: CallOptions @@ -703,30 +727,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Creates a new `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent resource where this trigger will be created. - * Format: `projects/{project}/locations/{location}` - * @param {string} request.projectId - * Required. ID of the project for which to configure automatic builds. - * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger - * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * 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.createBuildTrigger(request); - */ createBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.ICreateBuildTriggerRequest, optionsOrCallback?: @@ -774,6 +774,30 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.createBuildTrigger(request, options, callback); } + /** + * Returns information about a `BuildTrigger`. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.get_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async + */ getBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, options?: CallOptions @@ -805,30 +829,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Returns information about a `BuildTrigger`. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `Trigger` to retrieve. - * Format: `projects/{project}/locations/{location}/triggers/{trigger}` - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. Identifier (`id` or `name`) of the `BuildTrigger` to get. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * 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.getBuildTrigger(request); - */ getBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IGetBuildTriggerRequest, optionsOrCallback?: @@ -873,6 +873,30 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.getBuildTrigger(request, options, callback); } + /** + * Deletes a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to delete. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. ID of the `BuildTrigger` to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.delete_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async + */ deleteBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, options?: CallOptions @@ -907,30 +931,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Deletes a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `Trigger` to delete. - * Format: `projects/{project}/locations/{location}/triggers/{trigger}` - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to delete. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) - * for more details and examples. - * @example - * const [response] = await client.deleteBuildTrigger(request); - */ deleteBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IDeleteBuildTriggerRequest, optionsOrCallback?: @@ -978,6 +978,29 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.deleteBuildTrigger(request, options, callback); } + /** + * Updates a `BuildTrigger` by its project ID and trigger ID. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.projectId + * Required. ID of the project that owns the trigger. + * @param {string} request.triggerId + * Required. ID of the `BuildTrigger` to update. + * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger + * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.update_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async + */ updateBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, options?: CallOptions @@ -1012,29 +1035,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Updates a `BuildTrigger` by its project ID and trigger ID. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.projectId - * Required. ID of the project that owns the trigger. - * @param {string} request.triggerId - * Required. ID of the `BuildTrigger` to update. - * @param {google.devtools.cloudbuild.v1.BuildTrigger} request.trigger - * Required. `BuildTrigger` 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * 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.updateBuildTrigger(request); - */ updateBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IUpdateBuildTriggerRequest, optionsOrCallback?: @@ -1082,6 +1082,33 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); } + /** + * ReceiveTriggerWebhook [Experimental] is called when the API receives a + * webhook request targeted at a specific trigger. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `ReceiveTriggerWebhook` to retrieve. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + * @param {google.api.HttpBody} request.body + * HTTP request body. + * @param {string} request.projectId + * Project in which the specified trigger lives + * @param {string} request.trigger + * Name of the trigger to run the payload against + * @param {string} request.secret + * Secret token used for authorization if an OAuth token isn't provided. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [ReceiveTriggerWebhookResponse]{@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.receive_trigger_webhook.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async + */ receiveTriggerWebhook( request?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, options?: CallOptions @@ -1116,33 +1143,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * ReceiveTriggerWebhook [Experimental] is called when the API receives a - * webhook request targeted at a specific trigger. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `ReceiveTriggerWebhook` to retrieve. - * Format: `projects/{project}/locations/{location}/triggers/{trigger}` - * @param {google.api.HttpBody} request.body - * HTTP request body. - * @param {string} request.projectId - * Project in which the specified trigger lives - * @param {string} request.trigger - * Name of the trigger to run the payload against - * @param {string} request.secret - * Secret token used for authorization if an OAuth token isn't provided. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [ReceiveTriggerWebhookResponse]{@link google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse}. - * 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.receiveTriggerWebhook(request); - */ receiveTriggerWebhook( request?: protos.google.devtools.cloudbuild.v1.IReceiveTriggerWebhookRequest, optionsOrCallback?: @@ -1190,6 +1190,24 @@ export class CloudBuildClient { this.initialize(); return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); } + /** + * Returns details of a `WorkerPool`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `WorkerPool` to retrieve. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.get_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async + */ getWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, options?: CallOptions @@ -1221,24 +1239,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Returns details of a `WorkerPool`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `WorkerPool` to retrieve. - * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * 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.getWorkerPool(request); - */ getWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IGetWorkerPoolRequest, optionsOrCallback?: @@ -1283,6 +1283,34 @@ export class CloudBuildClient { return this.innerApiCalls.getWorkerPool(request, options, callback); } + /** + * Starts a build with the specified configuration. + * + * This method returns a long-running `Operation`, which includes the build + * ID. Pass the build ID to `GetBuild` to determine the build status (such as + * `SUCCESS` or `FAILURE`). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent resource where this build will be created. + * Format: `projects/{project}/locations/{location}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {google.devtools.cloudbuild.v1.Build} request.build + * Required. Build 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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.create_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuild_async + */ createBuild( request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, options?: CallOptions @@ -1318,36 +1346,7 @@ export class CloudBuildClient { protos.google.longrunning.IOperation | null | undefined, {} | null | undefined > - ): void; - /** - * Starts a build with the specified configuration. - * - * This method returns a long-running `Operation`, which includes the build - * ID. Pass the build ID to `GetBuild` to determine the build status (such as - * `SUCCESS` or `FAILURE`). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent resource where this build will be created. - * Format: `projects/{project}/locations/{location}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {google.devtools.cloudbuild.v1.Build} request.build - * Required. Build 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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createBuild(request); - * const [response] = await operation.promise(); - */ + ): void; createBuild( request?: protos.google.devtools.cloudbuild.v1.ICreateBuildRequest, optionsOrCallback?: @@ -1406,11 +1405,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateBuildProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.create_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CreateBuild_async */ async checkCreateBuildProgress( name: string @@ -1434,42 +1430,6 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata >; } - retryBuild( - request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - retryBuild( - request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, - callback: Callback< - LROperation< - protos.google.devtools.cloudbuild.v1.IBuild, - protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Creates a new build based on the specified build. * @@ -1517,10 +1477,45 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.retryBuild(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/cloud_build.retry_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_RetryBuild_async */ + retryBuild( + request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + retryBuild( + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + retryBuild( + request: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, + callback: Callback< + LROperation< + protos.google.devtools.cloudbuild.v1.IBuild, + protos.google.devtools.cloudbuild.v1.IBuildOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; retryBuild( request?: protos.google.devtools.cloudbuild.v1.IRetryBuildRequest, optionsOrCallback?: @@ -1579,11 +1574,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkRetryBuildProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.retry_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_RetryBuild_async */ async checkRetryBuildProgress( name: string @@ -1607,6 +1599,33 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata >; } + /** + * Approves or rejects a pending build. + * + * If approved, the returned LRO will be analogous to the LRO returned from + * a CreateBuild call. + * + * If rejected, the returned LRO will be immediately done. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the target build. + * For example: "projects/{$project_id}/builds/{$build_id}" + * @param {google.devtools.cloudbuild.v1.ApprovalResult} request.approvalResult + * Approval decision and metadata. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.approve_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ApproveBuild_async + */ approveBuild( request?: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, options?: CallOptions @@ -1643,34 +1662,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Approves or rejects a pending build. - * - * If approved, the returned LRO will be analogous to the LRO returned from - * a CreateBuild call. - * - * If rejected, the returned LRO will be immediately done. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. Name of the target build. - * For example: "projects/{$project_id}/builds/{$build_id}" - * @param {google.devtools.cloudbuild.v1.ApprovalResult} request.approvalResult - * Approval decision and metadata. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.approveBuild(request); - * const [response] = await operation.promise(); - */ approveBuild( request?: protos.google.devtools.cloudbuild.v1.IApproveBuildRequest, optionsOrCallback?: @@ -1728,11 +1719,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkApproveBuildProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.approve_build.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ApproveBuild_async */ async checkApproveBuildProgress( name: string @@ -1756,6 +1744,32 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata >; } + /** + * Runs a `BuildTrigger` at a particular source revision. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The name of the `Trigger` to run. + * Format: `projects/{project}/locations/{location}/triggers/{trigger}` + * @param {string} request.projectId + * Required. ID of the project. + * @param {string} request.triggerId + * Required. ID of the trigger. + * @param {google.devtools.cloudbuild.v1.RepoSource} request.source + * Source to build against this trigger. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.run_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async + */ runBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, options?: CallOptions @@ -1792,33 +1806,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Runs a `BuildTrigger` at a particular source revision. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The name of the `Trigger` to run. - * Format: `projects/{project}/locations/{location}/triggers/{trigger}` - * @param {string} request.projectId - * Required. ID of the project. - * @param {string} request.triggerId - * Required. ID of the trigger. - * @param {google.devtools.cloudbuild.v1.RepoSource} request.source - * Source to build against this trigger. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.runBuildTrigger(request); - * const [response] = await operation.promise(); - */ runBuildTrigger( request?: protos.google.devtools.cloudbuild.v1.IRunBuildTriggerRequest, optionsOrCallback?: @@ -1877,11 +1864,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkRunBuildTriggerProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.run_build_trigger.js + * region_tag:cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async */ async checkRunBuildTriggerProgress( name: string @@ -1905,6 +1889,37 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata >; } + /** + * Creates a `WorkerPool`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this worker pool will be created. + * Format: `projects/{project}/locations/{location}`. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool + * Required. `WorkerPool` resource to create. + * @param {string} request.workerPoolId + * Required. Immutable. The ID to use for the `WorkerPool`, which will become + * the final component of the resource name. + * + * This value should be 1-63 characters, and valid characters + * are /{@link 0-9|a-z}-/. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.create_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async + */ createWorkerPool( request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, options?: CallOptions @@ -1941,38 +1956,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Creates a `WorkerPool`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent resource where this worker pool will be created. - * Format: `projects/{project}/locations/{location}`. - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool - * Required. `WorkerPool` resource to create. - * @param {string} request.workerPoolId - * Required. Immutable. The ID to use for the `WorkerPool`, which will become - * the final component of the resource name. - * - * This value should be 1-63 characters, and valid characters - * are /{@link 0-9|a-z}-/. - * @param {boolean} request.validateOnly - * If set, validate the request and preview the response, but do not actually - * post it. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.createWorkerPool(request); - * const [response] = await operation.promise(); - */ createWorkerPool( request?: protos.google.devtools.cloudbuild.v1.ICreateWorkerPoolRequest, optionsOrCallback?: @@ -2030,11 +2013,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateWorkerPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.create_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async */ async checkCreateWorkerPoolProgress( name: string @@ -2058,6 +2038,36 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata >; } + /** + * Deletes a `WorkerPool`. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the `WorkerPool` to delete. + * Format: + * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. + * @param {string} request.etag + * Optional. If this is provided, it must match the server's etag on the + * workerpool for the request to be processed. + * @param {boolean} request.allowMissing + * If set to true, and the `WorkerPool` is not found, the request will succeed + * but no action will be taken on the server. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.delete_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async + */ deleteWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, options?: CallOptions @@ -2094,37 +2104,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Deletes a `WorkerPool`. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The name of the `WorkerPool` to delete. - * Format: - * `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`. - * @param {string} request.etag - * Optional. If this is provided, it must match the server's etag on the - * workerpool for the request to be processed. - * @param {boolean} request.allowMissing - * If set to true, and the `WorkerPool` is not found, the request will succeed - * but no action will be taken on the server. - * @param {boolean} request.validateOnly - * If set, validate the request and preview the response, but do not actually - * post it. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteWorkerPool(request); - * const [response] = await operation.promise(); - */ deleteWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IDeleteWorkerPoolRequest, optionsOrCallback?: @@ -2182,11 +2161,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteWorkerPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.delete_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async */ async checkDeleteWorkerPoolProgress( name: string @@ -2210,6 +2186,33 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata >; } + /** + * Updates a `WorkerPool`. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool + * Required. The `WorkerPool` to update. + * + * The `name` field is used to identify the `WorkerPool` to update. + * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. + * @param {google.protobuf.FieldMask} request.updateMask + * A mask specifying which fields in `worker_pool` to update. + * @param {boolean} request.validateOnly + * If set, validate the request and preview the response, but do not actually + * post it. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/cloud_build.update_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async + */ updateWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, options?: CallOptions @@ -2246,34 +2249,6 @@ export class CloudBuildClient { {} | null | undefined > ): void; - /** - * Updates a `WorkerPool`. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.devtools.cloudbuild.v1.WorkerPool} request.workerPool - * Required. The `WorkerPool` to update. - * - * The `name` field is used to identify the `WorkerPool` to update. - * Format: `projects/{project}/locations/{location}/workerPools/{workerPool}`. - * @param {google.protobuf.FieldMask} request.updateMask - * A mask specifying which fields in `worker_pool` to update. - * @param {boolean} request.validateOnly - * If set, validate the request and preview the response, but do not actually - * post it. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateWorkerPool(request); - * const [response] = await operation.promise(); - */ updateWorkerPool( request?: protos.google.devtools.cloudbuild.v1.IUpdateWorkerPoolRequest, optionsOrCallback?: @@ -2331,11 +2306,8 @@ export class CloudBuildClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateWorkerPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/cloud_build.update_worker_pool.js + * region_tag:cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async */ async checkUpdateWorkerPoolProgress( name: string @@ -2359,37 +2331,6 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata >; } - listBuilds( - request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.devtools.cloudbuild.v1.IBuild[], - protos.google.devtools.cloudbuild.v1.IListBuildsRequest | null, - protos.google.devtools.cloudbuild.v1.IListBuildsResponse - ] - >; - listBuilds( - request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - | protos.google.devtools.cloudbuild.v1.IListBuildsResponse - | null - | undefined, - protos.google.devtools.cloudbuild.v1.IBuild - > - ): void; - listBuilds( - request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - callback: PaginationCallback< - protos.google.devtools.cloudbuild.v1.IListBuildsRequest, - | protos.google.devtools.cloudbuild.v1.IListBuildsResponse - | null - | undefined, - protos.google.devtools.cloudbuild.v1.IBuild - > - ): void; /** * Lists previously requested builds. * @@ -2430,6 +2371,37 @@ export class CloudBuildClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listBuilds( + request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.devtools.cloudbuild.v1.IBuild[], + protos.google.devtools.cloudbuild.v1.IListBuildsRequest | null, + protos.google.devtools.cloudbuild.v1.IListBuildsResponse + ] + >; + listBuilds( + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild + > + ): void; + listBuilds( + request: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + callback: PaginationCallback< + protos.google.devtools.cloudbuild.v1.IListBuildsRequest, + | protos.google.devtools.cloudbuild.v1.IListBuildsResponse + | null + | undefined, + protos.google.devtools.cloudbuild.v1.IBuild + > + ): void; listBuilds( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, optionsOrCallback?: @@ -2523,7 +2495,8 @@ export class CloudBuildClient { project_id: request.projectId || '', parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuilds']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuilds.createStream( this.innerApiCalls.listBuilds as gax.GaxCall, @@ -2567,11 +2540,8 @@ export class CloudBuildClient { * 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.listBuildsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_build.list_builds.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ListBuilds_async */ listBuildsAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildsRequest, @@ -2586,8 +2556,8 @@ export class CloudBuildClient { project_id: request.projectId || '', parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuilds']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuilds.asyncIterate( this.innerApiCalls['listBuilds'] as GaxCall, @@ -2595,6 +2565,35 @@ export class CloudBuildClient { callSettings ) as AsyncIterable; } + /** + * Lists existing `BuildTrigger`s. + * + * This API is experimental. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent of the collection of `Triggers`. + * Format: `projects/{project}/locations/{location}` + * @param {string} request.projectId + * Required. ID of the project for which to list BuildTriggers. + * @param {number} request.pageSize + * Number of results to return in the list. + * @param {string} request.pageToken + * Token to provide to skip to a particular spot in the 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBuildTriggersAsync()` + * 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. + */ listBuildTriggers( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, options?: CallOptions @@ -2626,35 +2625,6 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.IBuildTrigger > ): void; - /** - * Lists existing `BuildTrigger`s. - * - * This API is experimental. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent of the collection of `Triggers`. - * Format: `projects/{project}/locations/{location}` - * @param {string} request.projectId - * Required. ID of the project for which to list BuildTriggers. - * @param {number} request.pageSize - * Number of results to return in the list. - * @param {string} request.pageToken - * Token to provide to skip to a particular spot in the 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 [BuildTrigger]{@link google.devtools.cloudbuild.v1.BuildTrigger}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listBuildTriggersAsync()` - * 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. - */ listBuildTriggers( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, optionsOrCallback?: @@ -2738,7 +2708,8 @@ export class CloudBuildClient { project_id: request.projectId || '', parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuildTriggers']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuildTriggers.createStream( this.innerApiCalls.listBuildTriggers as gax.GaxCall, @@ -2772,11 +2743,8 @@ export class CloudBuildClient { * 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.listBuildTriggersAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_build.list_build_triggers.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async */ listBuildTriggersAsync( request?: protos.google.devtools.cloudbuild.v1.IListBuildTriggersRequest, @@ -2791,8 +2759,8 @@ export class CloudBuildClient { project_id: request.projectId || '', parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listBuildTriggers']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuildTriggers.asyncIterate( this.innerApiCalls['listBuildTriggers'] as GaxCall, @@ -2800,6 +2768,33 @@ export class CloudBuildClient { callSettings ) as AsyncIterable; } + /** + * Lists `WorkerPool`s. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the collection of `WorkerPools`. + * Format: `projects/{project}/locations/{location}`. + * @param {number} request.pageSize + * The maximum number of `WorkerPool`s to return. The service may return + * fewer than this value. If omitted, the server will use a sensible default. + * @param {string} request.pageToken + * A page token, received from a previous `ListWorkerPools` call. Provide this + * to retrieve the subsequent page. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listWorkerPoolsAsync()` + * 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. + */ listWorkerPools( request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, options?: CallOptions @@ -2831,33 +2826,6 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.IWorkerPool > ): void; - /** - * Lists `WorkerPool`s. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent of the collection of `WorkerPools`. - * Format: `projects/{project}/locations/{location}`. - * @param {number} request.pageSize - * The maximum number of `WorkerPool`s to return. The service may return - * fewer than this value. If omitted, the server will use a sensible default. - * @param {string} request.pageToken - * A page token, received from a previous `ListWorkerPools` call. Provide this - * to retrieve the subsequent page. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of [WorkerPool]{@link google.devtools.cloudbuild.v1.WorkerPool}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listWorkerPoolsAsync()` - * 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. - */ listWorkerPools( request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, optionsOrCallback?: @@ -2939,7 +2907,8 @@ export class CloudBuildClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listWorkerPools']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkerPools.createStream( this.innerApiCalls.listWorkerPools as gax.GaxCall, @@ -2973,11 +2942,8 @@ export class CloudBuildClient { * 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.listWorkerPoolsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/cloud_build.list_worker_pools.js + * region_tag:cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async */ listWorkerPoolsAsync( request?: protos.google.devtools.cloudbuild.v1.IListWorkerPoolsRequest, @@ -2991,8 +2957,8 @@ export class CloudBuildClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listWorkerPools']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkerPools.asyncIterate( this.innerApiCalls['listWorkerPools'] as GaxCall, From 8126f2d1f7be3bd7b2702516f0441e1d21e6fd78 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 9 Dec 2021 22:40:12 +0000 Subject: [PATCH 185/223] build: add generated samples to .eslintignore (#288) --- packages/google-devtools-cloudbuild/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-devtools-cloudbuild/.eslintignore b/packages/google-devtools-cloudbuild/.eslintignore index 9340ad9b86d3..ea5b04aebe68 100644 --- a/packages/google-devtools-cloudbuild/.eslintignore +++ b/packages/google-devtools-cloudbuild/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From b4c7913690d90c702eecae889a580250ad9c28d4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 19:54:30 +0000 Subject: [PATCH 186/223] docs(node): support "stable"/"preview" release level (#1312) (#291) --- packages/google-devtools-cloudbuild/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 6b19016cccec..c2793c5c687a 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -155,6 +155,8 @@ are addressed with the highest priority. + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 813db164cac4bc9a03915ca5f0ceb3c7516818e4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Dec 2021 23:20:12 +0000 Subject: [PATCH 187/223] docs(badges): tweak badge to use new preview/stable language (#1314) (#292) --- packages/google-devtools-cloudbuild/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index c2793c5c687a..f98f3cfdcfef 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -6,7 +6,6 @@ [![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/cloudbuild.svg)](https://www.npmjs.org/package/@google-cloud/cloudbuild) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-cloudbuild/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-cloudbuild) From 4e6b134ea1eb8311fe3c0ec0e8deeda6fb308671 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 18:54:26 -0500 Subject: [PATCH 188/223] chore: add api_shortname and library_type to repo metadata (#290) Update .repo-metadata.json as required by go/library-data-integrity --- packages/google-devtools-cloudbuild/.repo-metadata.json | 6 ++++-- packages/google-devtools-cloudbuild/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index 7ec53f338b37..e13825d6129f 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -6,10 +6,12 @@ "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", "client_documentation": "https://cloud.google.com/nodejs/docs/reference/cloudbuild/latest", "language": "nodejs", - "release_level": "ga", + "release_level": "stable", "product_documentation": "https://cloud.google.com/cloud-build/docs/", "default_version": "v1", "name_pretty": "Cloud Build", "distribution_name": "@google-cloud/cloudbuild", - "api_id": "cloudbuild.googleapis.com" + "api_id": "cloudbuild.googleapis.com", + "api_shortname": "cloudbuild", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index f98f3cfdcfef..bcb7906cfe4b 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -4,7 +4,7 @@ # [Cloud Build: Node.js Client](https://github.com/googleapis/nodejs-cloudbuild) -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![release level](https://img.shields.io/badge/release%20level-stable-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/cloudbuild.svg)](https://www.npmjs.org/package/@google-cloud/cloudbuild) @@ -144,10 +144,10 @@ _Legacy Node.js versions are supported as a best effort:_ This library follows [Semantic Versioning](http://semver.org/). -This library is considered to be **General Availability (GA)**. This means it -is stable; the code surface will not change in backwards-incompatible ways + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **GA** libraries +an extensive deprecation period. Issues and requests against **stable** libraries are addressed with the highest priority. @@ -155,7 +155,6 @@ are addressed with the highest priority. - More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages From 5ada8a803b659f929921d969844e39a89dc386f3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 17:06:42 +0000 Subject: [PATCH 189/223] test(nodejs): remove 15 add 16 (#1322) (#293) --- packages/google-devtools-cloudbuild/protos/protos.d.ts | 2 +- packages/google-devtools-cloudbuild/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 141ae61c3326..7bf9c0097491 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index f13b04000282..64d9cd33c817 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 42cfb27681ecc9bad21bba0c2541442bf4692d66 Mon Sep 17 00:00:00 2001 From: Dina Graves Portman Date: Thu, 20 Jan 2022 13:20:18 -0500 Subject: [PATCH 190/223] chore: update codeowners (#298) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: update codeowners * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- packages/google-devtools-cloudbuild/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/.repo-metadata.json b/packages/google-devtools-cloudbuild/.repo-metadata.json index e13825d6129f..1d2c8a2419b9 100644 --- a/packages/google-devtools-cloudbuild/.repo-metadata.json +++ b/packages/google-devtools-cloudbuild/.repo-metadata.json @@ -1,6 +1,6 @@ { "repo": "googleapis/nodejs-cloudbuild", - "codeowner_team": "@googleapis/cicd", + "codeowner_team": "@googleapis/aap-dpes", "requires_billing": true, "name": "cloudbuild", "issue_tracker": "https://issuetracker.google.com/savedsearches/5226584", From 0d30c56c79c8011ac253f1f68b49a3b2d205ad6c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 26 Jan 2022 19:54:23 +0000 Subject: [PATCH 191/223] chore: update v2.12.0 gapic-generator-typescript (#301) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- packages/google-devtools-cloudbuild/.jsdoc.js | 4 ++-- .../google-devtools-cloudbuild/linkinator.config.json | 10 ++++++++-- .../samples/generated/v1/cloud_build.approve_build.js | 1 + .../samples/generated/v1/cloud_build.cancel_build.js | 1 + .../samples/generated/v1/cloud_build.create_build.js | 1 + .../generated/v1/cloud_build.create_build_trigger.js | 1 + .../generated/v1/cloud_build.create_worker_pool.js | 1 + .../generated/v1/cloud_build.delete_build_trigger.js | 1 + .../generated/v1/cloud_build.delete_worker_pool.js | 1 + .../samples/generated/v1/cloud_build.get_build.js | 1 + .../generated/v1/cloud_build.get_build_trigger.js | 1 + .../generated/v1/cloud_build.get_worker_pool.js | 1 + .../generated/v1/cloud_build.list_build_triggers.js | 3 ++- .../samples/generated/v1/cloud_build.list_builds.js | 3 ++- .../generated/v1/cloud_build.list_worker_pools.js | 3 ++- .../v1/cloud_build.receive_trigger_webhook.js | 4 +++- .../samples/generated/v1/cloud_build.retry_build.js | 1 + .../generated/v1/cloud_build.run_build_trigger.js | 1 + .../generated/v1/cloud_build.update_build_trigger.js | 1 + .../generated/v1/cloud_build.update_worker_pool.js | 1 + .../src/v1/cloud_build_client.ts | 2 +- packages/google-devtools-cloudbuild/src/v1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-devtools-cloudbuild/system-test/install.ts | 2 +- .../test/gapic_cloud_build_v1.ts | 2 +- 26 files changed, 39 insertions(+), 14 deletions(-) diff --git a/packages/google-devtools-cloudbuild/.jsdoc.js b/packages/google-devtools-cloudbuild/.jsdoc.js index baff25d20b8b..773c8c4fcc80 100644 --- a/packages/google-devtools-cloudbuild/.jsdoc.js +++ b/packages/google-devtools-cloudbuild/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2021 Google LLC', + copyright: 'Copyright 2022 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/cloudbuild', diff --git a/packages/google-devtools-cloudbuild/linkinator.config.json b/packages/google-devtools-cloudbuild/linkinator.config.json index 0121dfa684f7..befd23c86335 100644 --- a/packages/google-devtools-cloudbuild/linkinator.config.json +++ b/packages/google-devtools-cloudbuild/linkinator.config.json @@ -3,8 +3,14 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" ], "silent": true, - "concurrency": 5 + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js index a139b8310d65..d0d1702ed821 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js index bfdd1325295d..4243e996036a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, id) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js index 8800bb5a589f..1b179d0effcc 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, build) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js index da9973765ddf..64ba91e13bb2 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, trigger) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js index 5b5613cd6cff..1d5d686f61af 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, workerPool, workerPoolId) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js index 9c6dafd26e5b..afec85a77809 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, triggerId) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js index 830b650b748b..41383b425684 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js index 81532a014d73..7ff88fdc5610 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, id) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js index 327947a8dc97..d9cf94ef8d2d 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, triggerId) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js index 30e79de6213b..240cceb4964b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js index 5cb5f6eb9725..023df9db8e19 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId) { @@ -52,7 +53,7 @@ function main(projectId) { // Run request const iterable = await cloudbuildClient.listBuildTriggersAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js index e334dbdd77ab..82f7232ef78b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId) { @@ -61,7 +62,7 @@ function main(projectId) { // Run request const iterable = await cloudbuildClient.listBuildsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js index a917074484bb..6630a20e75d5 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -50,7 +51,7 @@ function main(parent) { // Run request const iterable = await cloudbuildClient.listWorkerPoolsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js index 16fc4a55bb5f..8106bb0d09f2 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main() { @@ -49,7 +50,8 @@ function main() { async function callReceiveTriggerWebhook() { // Construct request - const request = {}; + const request = { + }; // Run request const response = await cloudbuildClient.receiveTriggerWebhook(request); diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js index 286cc3106797..fa7c60ba8a2a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, id) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js index e4dfbdf4a6c3..138e6e13142a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, triggerId) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js index 8d2b93a3a344..4d2b18081c66 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(projectId, triggerId, trigger) { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js index 03af92264608..a9e6b2c8b42b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(workerPool) { diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index e7ee66ddf074..aa03a29d5c36 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/src/v1/index.ts b/packages/google-devtools-cloudbuild/src/v1/index.ts index abc079495c8b..82733a09aef4 100644 --- a/packages/google-devtools-cloudbuild/src/v1/index.ts +++ b/packages/google-devtools-cloudbuild/src/v1/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js index f73fc138dce6..e17f4a5c0e8c 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.js @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts index cf9f530e8005..62c1bda66035 100644 --- a/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts +++ b/packages/google-devtools-cloudbuild/system-test/fixtures/sample/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/system-test/install.ts b/packages/google-devtools-cloudbuild/system-test/install.ts index d2d61c0396fc..6dd1eaadafaa 100644 --- a/packages/google-devtools-cloudbuild/system-test/install.ts +++ b/packages/google-devtools-cloudbuild/system-test/install.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index ec203735de99..9bb9f8578c76 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. From 3e576ca8bc433958ea50df1553f3a518d1dbc878 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 31 Jan 2022 23:28:29 +0100 Subject: [PATCH 192/223] chore(deps): update dependency sinon to v13 (#303) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^12.0.0` -> `^13.0.0`](https://renovatebot.com/diffs/npm/sinon/12.0.1/13.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.0/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1300) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v12.0.1...v13.0.0) - [`cf3d6c0c`](https://togithub.com/sinonjs/sinon/commit/cf3d6c0cd9689c0ee673b3daa8bf9abd70304392) Upgrade packages ([#​2431](https://togithub.com/sinonjs/sinon/issues/2431)) (Carl-Erik Kopseng) > - Update all @​sinonjs/ packages > > - Upgrade to fake-timers 9 > > - chore: ensure always using latest LTS release - [`41710467`](https://togithub.com/sinonjs/sinon/commit/417104670d575e96a1b645ea40ce763afa76fb1b) Adjust deploy scripts to archive old releases in a separate branch, move existing releases out of master ([#​2426](https://togithub.com/sinonjs/sinon/issues/2426)) (Joel Bradshaw) > Co-authored-by: Carl-Erik Kopseng - [`c80a7266`](https://togithub.com/sinonjs/sinon/commit/c80a72660e89d88b08275eff1028ecb9e26fd8e9) Bump node-fetch from 2.6.1 to 2.6.7 ([#​2430](https://togithub.com/sinonjs/sinon/issues/2430)) (dependabot\[bot]) > Co-authored-by: dependabot\[bot] <49699333+dependabot\[bot][@​users](https://togithub.com/users).noreply.github.com> - [`a00f14a9`](https://togithub.com/sinonjs/sinon/commit/a00f14a97dbe8c65afa89674e16ad73fc7d2fdc0) Add explicit export for `./*` ([#​2413](https://togithub.com/sinonjs/sinon/issues/2413)) (なつき) - [`b82ca7ad`](https://togithub.com/sinonjs/sinon/commit/b82ca7ad9b1add59007771f65a18ee34415de8ca) Bump cached-path-relative from 1.0.2 to 1.1.0 ([#​2428](https://togithub.com/sinonjs/sinon/issues/2428)) (dependabot\[bot]) - [`a9ea1427`](https://togithub.com/sinonjs/sinon/commit/a9ea142716c094ef3c432ecc4089f8207b8dd8b6) Add documentation for assert.calledOnceWithMatch ([#​2424](https://togithub.com/sinonjs/sinon/issues/2424)) (Mathias Schreck) - [`1d5ab86b`](https://togithub.com/sinonjs/sinon/commit/1d5ab86ba60e50dd69593ffed2bffd4b8faa0d38) Be more general in stripping off stack frames to fix Firefox tests ([#​2425](https://togithub.com/sinonjs/sinon/issues/2425)) (Joel Bradshaw) - [`56b06129`](https://togithub.com/sinonjs/sinon/commit/56b06129e223eae690265c37b1113067e2b31bdc) Check call count type ([#​2410](https://togithub.com/sinonjs/sinon/issues/2410)) (Joel Bradshaw) - [`7863e2df`](https://togithub.com/sinonjs/sinon/commit/7863e2dfdbda79e0a32e42af09e6539fc2f2b80f) Fix [#​2414](https://togithub.com/sinonjs/sinon/issues/2414): make Sinon available on homepage (Carl-Erik Kopseng) - [`fabaabdd`](https://togithub.com/sinonjs/sinon/commit/fabaabdda82f39a7f5b75b55bd56cf77b1cd4a8f) Bump nokogiri from 1.11.4 to 1.13.1 ([#​2423](https://togithub.com/sinonjs/sinon/issues/2423)) (dependabot\[bot]) - [`dbc0fbd2`](https://togithub.com/sinonjs/sinon/commit/dbc0fbd263c8419fa47f9c3b20cf47890a242d21) Bump shelljs from 0.8.4 to 0.8.5 ([#​2422](https://togithub.com/sinonjs/sinon/issues/2422)) (dependabot\[bot]) - [`fb8b3d72`](https://togithub.com/sinonjs/sinon/commit/fb8b3d72a85dc8fb0547f859baf3f03a22a039f7) Run Prettier (Carl-Erik Kopseng) - [`12a45939`](https://togithub.com/sinonjs/sinon/commit/12a45939e9b047b6d3663fe55f2eb383ec63c4e1) Fix 2377: Throw error when trying to stub non-configurable or non-writable properties ([#​2417](https://togithub.com/sinonjs/sinon/issues/2417)) (Stuart Dotson) > Fixes issue [#​2377](https://togithub.com/sinonjs/sinon/issues/2377) by throwing an error when trying to stub non-configurable or non-writable properties *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-01-28.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 5f07aef79475..6a55b4886294 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "linkinator": "^2.0.0", "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^12.0.0", + "sinon": "^13.0.0", "typescript": "^3.8.3" }, "scripts": { From ee2e8799b73219672f66fd8f2362c543ef37cdbd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 22:06:44 +0000 Subject: [PATCH 193/223] docs(nodejs): version support policy edits (#1346) (#305) --- packages/google-devtools-cloudbuild/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index bcb7906cfe4b..0b1134221f4e 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -123,21 +123,21 @@ also contains samples. Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. - -_Legacy Node.js versions are supported as a best effort:_ +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: -* Legacy versions will not be tested in continuous integration. -* Some security patches may not be able to be backported. -* Dependencies will not be kept up-to-date, and features will not be backported. +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. -#### Legacy tags available - -* `legacy-8`: install client libraries from this dist-tag for versions - compatible with Node.js 8. +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/cloudbuild@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From f6f6297bc874300ac484e1c497b8b0233063b524 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 18 Feb 2022 02:06:57 +0000 Subject: [PATCH 194/223] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#306) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 429395631 Source-Link: https://github.com/googleapis/googleapis/commit/84594b35af0c38efcd6967e8179d801702ad96ff Source-Link: https://github.com/googleapis/googleapis-gen/commit/ed74f970fd82914874e6b27b04763cfa66bafe9b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWQ3NGY5NzBmZDgyOTE0ODc0ZTZiMjdiMDQ3NjNjZmE2NmJhZmU5YiJ9 --- .../generated/v1/cloud_build.approve_build.js | 9 +- .../generated/v1/cloud_build.cancel_build.js | 9 +- .../generated/v1/cloud_build.create_build.js | 9 +- .../v1/cloud_build.create_build_trigger.js | 9 +- .../v1/cloud_build.create_worker_pool.js | 9 +- .../v1/cloud_build.delete_build_trigger.js | 9 +- .../v1/cloud_build.delete_worker_pool.js | 9 +- .../generated/v1/cloud_build.get_build.js | 9 +- .../v1/cloud_build.get_build_trigger.js | 9 +- .../v1/cloud_build.get_worker_pool.js | 9 +- .../v1/cloud_build.list_build_triggers.js | 9 +- .../generated/v1/cloud_build.list_builds.js | 9 +- .../v1/cloud_build.list_worker_pools.js | 9 +- .../v1/cloud_build.receive_trigger_webhook.js | 9 +- .../generated/v1/cloud_build.retry_build.js | 9 +- .../v1/cloud_build.run_build_trigger.js | 9 +- .../v1/cloud_build.update_build_trigger.js | 9 +- .../v1/cloud_build.update_worker_pool.js | 9 +- ...etadata.google.devtools.cloudbuild.v1.json | 899 ++++++++++++++++++ .../src/v1/cloud_build_client.ts | 5 +- .../test/gapic_cloud_build_v1.ts | 158 ++- 21 files changed, 1183 insertions(+), 41 deletions(-) create mode 100644 packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js index d0d1702ed821..a6cafe4d044f 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js index 4243e996036a..8651a092d121 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js index 1b179d0effcc..d6e6d1a26c08 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js index 64ba91e13bb2..a24230d7f4e9 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js index 1d5d686f61af..7361205979c3 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js index afec85a77809..43ff110c9041 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js index 41383b425684..262eb4423ae6 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js index 7ff88fdc5610..786456d963b8 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js index d9cf94ef8d2d..cd80fd663f52 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js index 240cceb4964b..91ebfb8b4701 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js index 023df9db8e19..869efeedc3ea 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js index 82f7232ef78b..31ed683e0e0e 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js index 6630a20e75d5..c549beed49c3 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js index 8106bb0d09f2..43900f3c8425 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js index fa7c60ba8a2a..fb60578a2743 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js index 138e6e13142a..0d9714c25cbe 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js index 4d2b18081c66..b8d56cadf096 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js index a9e6b2c8b42b..0417f4d4fefd 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json new file mode 100644 index 000000000000..0c089e518c09 --- /dev/null +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -0,0 +1,899 @@ +{ + "clientLibrary": { + "name": "nodejs-cloudbuild", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.cloudbuild.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuild_async", + "title": "CloudBuild createBuild Sample", + "origin": "API_DEFINITION", + "description": " Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).", + "canonical": true, + "file": "cloud_build.create_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "build", + "type": ".google.devtools.cloudbuild.v1.Build" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuild_async", + "title": "CloudBuild getBuild Sample", + "origin": "API_DEFINITION", + "description": " Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.", + "canonical": true, + "file": "cloud_build.get_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.Build", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuilds_async", + "title": "CloudBuild listBuilds Sample", + "origin": "API_DEFINITION", + "description": " Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.", + "canonical": true, + "file": "cloud_build.list_builds.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuilds", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListBuildsResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListBuilds", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_CancelBuild_async", + "title": "CloudBuild cancelBuild Sample", + "origin": "API_DEFINITION", + "description": " Cancels a build in progress.", + "canonical": true, + "file": "cloud_build.cancel_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.Build", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CancelBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_async", + "title": "CloudBuild retryBuild Sample", + "origin": "API_DEFINITION", + "description": " Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.", + "canonical": true, + "file": "cloud_build.retry_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetryBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "RetryBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ApproveBuild_async", + "title": "CloudBuild approveBuild Sample", + "origin": "API_DEFINITION", + "description": " Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.", + "canonical": true, + "file": "cloud_build.approve_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "approval_result", + "type": ".google.devtools.cloudbuild.v1.ApprovalResult" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ApproveBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async", + "title": "CloudBuild createBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Creates a new `BuildTrigger`. This API is experimental.", + "canonical": true, + "file": "cloud_build.create_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": ".google.devtools.cloudbuild.v1.BuildTrigger" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async", + "title": "CloudBuild getBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Returns information about a `BuildTrigger`. This API is experimental.", + "canonical": true, + "file": "cloud_build.get_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async", + "title": "CloudBuild listBuildTriggers Sample", + "origin": "API_DEFINITION", + "description": " Lists existing `BuildTrigger`s. This API is experimental.", + "canonical": true, + "file": "cloud_build.list_build_triggers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuildTriggers", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListBuildTriggersResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListBuildTriggers", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async", + "title": "CloudBuild deleteBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "canonical": true, + "file": "cloud_build.delete_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "DeleteBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async", + "title": "CloudBuild updateBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "canonical": true, + "file": "cloud_build.update_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": ".google.devtools.cloudbuild.v1.BuildTrigger" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "UpdateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async", + "title": "CloudBuild runBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Runs a `BuildTrigger` at a particular source revision.", + "canonical": true, + "file": "cloud_build.run_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + }, + { + "name": "source", + "type": ".google.devtools.cloudbuild.v1.RepoSource" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "RunBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async", + "title": "CloudBuild receiveTriggerWebhook Sample", + "origin": "API_DEFINITION", + "description": " ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.", + "canonical": true, + "file": "cloud_build.receive_trigger_webhook.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReceiveTriggerWebhook", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "body", + "type": ".google.api.HttpBody" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": "TYPE_STRING" + }, + { + "name": "secret", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ReceiveTriggerWebhook", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async", + "title": "CloudBuild createWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Creates a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.create_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "worker_pool", + "type": ".google.devtools.cloudbuild.v1.WorkerPool" + }, + { + "name": "worker_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async", + "title": "CloudBuild getWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Returns details of a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.get_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.WorkerPool", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async", + "title": "CloudBuild deleteWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.delete_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "DeleteWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async", + "title": "CloudBuild updateWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Updates a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.update_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + "async": true, + "parameters": [ + { + "name": "worker_pool", + "type": ".google.devtools.cloudbuild.v1.WorkerPool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "UpdateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + }, + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async", + "title": "CloudBuild listWorkerPools Sample", + "origin": "API_DEFINITION", + "description": " Lists `WorkerPool`s.", + "canonical": true, + "file": "cloud_build.list_worker_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkerPools", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListWorkerPools", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } + } + ] +} diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index aa03a29d5c36..ca9952466a04 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -3522,9 +3522,8 @@ export class CloudBuildClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.cloudBuildStub!.then(stub => { + if (this.cloudBuildStub && !this._terminated) { + return this.cloudBuildStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 9bb9f8578c76..a2beeeb04a2f 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -183,12 +183,27 @@ describe('v1.CloudBuildClient', () => { assert(client.cloudBuildStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new cloudbuildModule.v1.CloudBuildClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.cloudBuildStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudBuildStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -334,6 +349,23 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getBuild with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildRequest() + ); + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBuild(request), expectedError); + }); }); describe('cancelBuild', () => { @@ -448,6 +480,23 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes cancelBuild with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() + ); + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.cancelBuild(request), expectedError); + }); }); describe('createBuildTrigger', () => { @@ -563,6 +612,23 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createBuildTrigger with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() + ); + request.projectId = ''; + request.parent = ''; + const expectedHeaderRequestParams = 'project_id=&parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createBuildTrigger(request), expectedError); + }); }); describe('getBuildTrigger', () => { @@ -677,6 +743,23 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getBuildTrigger with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() + ); + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getBuildTrigger(request), expectedError); + }); }); describe('deleteBuildTrigger', () => { @@ -792,6 +875,23 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteBuildTrigger with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() + ); + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteBuildTrigger(request), expectedError); + }); }); describe('updateBuildTrigger', () => { @@ -910,6 +1010,24 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateBuildTrigger with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() + ); + request.projectId = ''; + request.trigger = {}; + request.trigger.resourceName = ''; + const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateBuildTrigger(request), expectedError); + }); }); describe('receiveTriggerWebhook', () => { @@ -1028,6 +1146,26 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes receiveTriggerWebhook with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() + ); + request.projectId = ''; + request.name = ''; + const expectedHeaderRequestParams = 'project_id=&name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.receiveTriggerWebhook(request), + expectedError + ); + }); }); describe('getWorkerPool', () => { @@ -1139,6 +1277,22 @@ describe('v1.CloudBuildClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getWorkerPool with closed client', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getWorkerPool(request), expectedError); + }); }); describe('createBuild', () => { From b0c56059edd68f6da8bec4ce2fd375137b120e9c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Mar 2022 21:40:15 +0000 Subject: [PATCH 195/223] chore: update v2.14.2 gapic-generator-typescript (#310) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 434859890 Source-Link: https://github.com/googleapis/googleapis/commit/bc2432d50cba657e95212122e3fa112591b5bec2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/930b673103e92523f8cfed38decd7d3afae8ebe7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTMwYjY3MzEwM2U5MjUyM2Y4Y2ZlZDM4ZGVjZDdkM2FmYWU4ZWJlNyJ9 --- .../test/gapic_cloud_build_v1.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index a2beeeb04a2f..31f0cb575445 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -361,7 +361,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBuild(request), expectedError); @@ -492,7 +491,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelBuild(request), expectedError); @@ -624,7 +622,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createBuildTrigger(request), expectedError); @@ -755,7 +752,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBuildTrigger(request), expectedError); @@ -887,7 +883,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteBuildTrigger(request), expectedError); @@ -1023,7 +1018,6 @@ describe('v1.CloudBuildClient', () => { request.projectId = ''; request.trigger = {}; request.trigger.resourceName = ''; - const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateBuildTrigger(request), expectedError); @@ -1158,7 +1152,6 @@ describe('v1.CloudBuildClient', () => { ); request.projectId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1288,7 +1281,6 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getWorkerPool(request), expectedError); From 762f13dcd679473bd922a15d6792d23061106ad4 Mon Sep 17 00:00:00 2001 From: Ace Nassri Date: Thu, 14 Apr 2022 19:27:35 -0700 Subject: [PATCH 196/223] chore(quickstart): mention private pool caveats (#317) --- packages/google-devtools-cloudbuild/README.md | 4 ++++ packages/google-devtools-cloudbuild/samples/quickstart.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index 0b1134221f4e..b1d33f831e8e 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -68,6 +68,10 @@ async function quickstart( // Creates a client const cb = new CloudBuildClient(); + // Note: for Private Pools, you'll have to specify an API endpoint value + // For example: + // const cb = new CloudBuildClient({ apiEndpoint: '-cloudbuild.googleapis.com' }); + // Starts a build against the branch provided. const [resp] = await cb.runBuildTrigger({ projectId, diff --git a/packages/google-devtools-cloudbuild/samples/quickstart.js b/packages/google-devtools-cloudbuild/samples/quickstart.js index a844a633044f..b1a3fb2a23d3 100644 --- a/packages/google-devtools-cloudbuild/samples/quickstart.js +++ b/packages/google-devtools-cloudbuild/samples/quickstart.js @@ -27,6 +27,10 @@ async function quickstart( // Creates a client const cb = new CloudBuildClient(); + // Note: for Private Pools, you'll have to specify an API endpoint value + // For example: + // const cb = new CloudBuildClient({ apiEndpoint: '-cloudbuild.googleapis.com' }); + // Starts a build against the branch provided. const [resp] = await cb.runBuildTrigger({ projectId, From f7cf1b13701e3d01c1bd7eedcf5c63dbc9ca459b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 02:36:11 +0000 Subject: [PATCH 197/223] build(node): update client library version in samples metadata (#1356) (#318) * build(node): add feat in node post-processor to add client library version number in snippet metadata Co-authored-by: Benjamin E. Coe Source-Link: https://github.com/googleapis/synthtool/commit/d337b88dd1494365183718a2de0b7b4056b6fdfe Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:d106724ad2a96daa1b8d88de101ba50bdb30b8df62ffa0aa2b451d93b4556641 --- ...etadata.google.devtools.cloudbuild.v1.json | 1724 ++++++++--------- 1 file changed, 862 insertions(+), 862 deletions(-) diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 0c089e518c09..7a45546ca884 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,899 +1,899 @@ { - "clientLibrary": { - "name": "nodejs-cloudbuild", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.devtools.cloudbuild.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuild_async", - "title": "CloudBuild createBuild Sample", - "origin": "API_DEFINITION", - "description": " Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).", - "canonical": true, - "file": "cloud_build.create_build.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "build", - "type": ".google.devtools.cloudbuild.v1.Build" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" - }, - "method": { - "shortName": "CreateBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } + "clientLibrary": { + "name": "nodejs-cloudbuild", + "version": "2.6.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.devtools.cloudbuild.v1", + "version": "v1" + } + ] }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuild_async", - "title": "CloudBuild getBuild Sample", - "origin": "API_DEFINITION", - "description": " Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.", - "canonical": true, - "file": "cloud_build.get_build.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.Build", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuild_async", + "title": "CloudBuild createBuild Sample", + "origin": "API_DEFINITION", + "description": " Starts a build with the specified configuration. This method returns a long-running `Operation`, which includes the build ID. Pass the build ID to `GetBuild` to determine the build status (such as `SUCCESS` or `FAILURE`).", + "canonical": true, + "file": "cloud_build.create_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "build", + "type": ".google.devtools.cloudbuild.v1.Build" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "GetBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuilds_async", - "title": "CloudBuild listBuilds Sample", - "origin": "API_DEFINITION", - "description": " Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.", - "canonical": true, - "file": "cloud_build.list_builds.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBuilds", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.ListBuildsResponse", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuild_async", + "title": "CloudBuild getBuild Sample", + "origin": "API_DEFINITION", + "description": " Returns information about a previously requested build. The `Build` that is returned includes its status (such as `SUCCESS`, `FAILURE`, or `WORKING`), and timing information.", + "canonical": true, + "file": "cloud_build.get_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.Build", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "ListBuilds", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_CancelBuild_async", - "title": "CloudBuild cancelBuild Sample", - "origin": "API_DEFINITION", - "description": " Cancels a build in progress.", - "canonical": true, - "file": "cloud_build.cancel_build.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CancelBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.Build", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuilds_async", + "title": "CloudBuild listBuilds Sample", + "origin": "API_DEFINITION", + "description": " Lists previously requested builds. Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully.", + "canonical": true, + "file": "cloud_build.list_builds.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuilds", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListBuildsResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListBuilds", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuilds", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "CancelBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_async", - "title": "CloudBuild retryBuild Sample", - "origin": "API_DEFINITION", - "description": " Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.", - "canonical": true, - "file": "cloud_build.retry_build.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 61, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RetryBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_CancelBuild_async", + "title": "CloudBuild cancelBuild Sample", + "origin": "API_DEFINITION", + "description": " Cancels a build in progress.", + "canonical": true, + "file": "cloud_build.cancel_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.Build", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CancelBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CancelBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "RetryBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_ApproveBuild_async", - "title": "CloudBuild approveBuild Sample", - "origin": "API_DEFINITION", - "description": " Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.", - "canonical": true, - "file": "cloud_build.approve_build.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 56, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ApproveBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "approval_result", - "type": ".google.devtools.cloudbuild.v1.ApprovalResult" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_RetryBuild_async", + "title": "CloudBuild retryBuild Sample", + "origin": "API_DEFINITION", + "description": " Creates a new build based on the specified build. This method creates a new build using the original build request, which may or may not result in an identical build. For triggered builds: * Triggered builds resolve to a precise revision; therefore a retry of a triggered build will result in a build that uses the same revision. For non-triggered builds that specify `RepoSource`: * If the original build built from the tip of a branch, the retried build will build from the tip of that branch, which may not be the same revision as the original build. * If the original build specified a commit sha or revision ID, the retried build will use the identical source. For builds that specify `StorageSource`: * If the original build pulled source from Google Cloud Storage without specifying the generation of the object, the new build will use the current object, which may be different from the original build source. * If the original build pulled source from Cloud Storage and specified the generation of the object, the new build will attempt to use the same object, which may or may not be available depending on the bucket's lifecycle management settings.", + "canonical": true, + "file": "cloud_build.retry_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RetryBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "RetryBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RetryBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "ApproveBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async", - "title": "CloudBuild createBuildTrigger Sample", - "origin": "API_DEFINITION", - "description": " Creates a new `BuildTrigger`. This API is experimental.", - "canonical": true, - "file": "cloud_build.create_build_trigger.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger", - "type": ".google.devtools.cloudbuild.v1.BuildTrigger" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_ApproveBuild_async", + "title": "CloudBuild approveBuild Sample", + "origin": "API_DEFINITION", + "description": " Approves or rejects a pending build. If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. If rejected, the returned LRO will be immediately done.", + "canonical": true, + "file": "cloud_build.approve_build.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "approval_result", + "type": ".google.devtools.cloudbuild.v1.ApprovalResult" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ApproveBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ApproveBuild", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "CreateBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async", - "title": "CloudBuild getBuildTrigger Sample", - "origin": "API_DEFINITION", - "description": " Returns information about a `BuildTrigger`. This API is experimental.", - "canonical": true, - "file": "cloud_build.get_build_trigger.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async", + "title": "CloudBuild createBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Creates a new `BuildTrigger`. This API is experimental.", + "canonical": true, + "file": "cloud_build.create_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": ".google.devtools.cloudbuild.v1.BuildTrigger" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "GetBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async", - "title": "CloudBuild listBuildTriggers Sample", - "origin": "API_DEFINITION", - "description": " Lists existing `BuildTrigger`s. This API is experimental.", - "canonical": true, - "file": "cloud_build.list_build_triggers.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListBuildTriggers", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.ListBuildTriggersResponse", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async", + "title": "CloudBuild getBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Returns information about a `BuildTrigger`. This API is experimental.", + "canonical": true, + "file": "cloud_build.get_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "ListBuildTriggers", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async", - "title": "CloudBuild deleteBuildTrigger Sample", - "origin": "API_DEFINITION", - "description": " Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", - "canonical": true, - "file": "cloud_build.delete_build_trigger.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async", + "title": "CloudBuild listBuildTriggers Sample", + "origin": "API_DEFINITION", + "description": " Lists existing `BuildTrigger`s. This API is experimental.", + "canonical": true, + "file": "cloud_build.list_build_triggers.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBuildTriggers", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListBuildTriggersResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListBuildTriggers", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListBuildTriggers", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "DeleteBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async", - "title": "CloudBuild updateBuildTrigger Sample", - "origin": "API_DEFINITION", - "description": " Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", - "canonical": true, - "file": "cloud_build.update_build_trigger.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 60, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", - "async": true, - "parameters": [ - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger", - "type": ".google.devtools.cloudbuild.v1.BuildTrigger" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async", + "title": "CloudBuild deleteBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Deletes a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "canonical": true, + "file": "cloud_build.delete_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "DeleteBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "UpdateBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async", - "title": "CloudBuild runBuildTrigger Sample", - "origin": "API_DEFINITION", - "description": " Runs a `BuildTrigger` at a particular source revision.", - "canonical": true, - "file": "cloud_build.run_build_trigger.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RunBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger_id", - "type": "TYPE_STRING" - }, - { - "name": "source", - "type": ".google.devtools.cloudbuild.v1.RepoSource" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async", + "title": "CloudBuild updateBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Updates a `BuildTrigger` by its project ID and trigger ID. This API is experimental.", + "canonical": true, + "file": "cloud_build.update_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + "async": true, + "parameters": [ + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": ".google.devtools.cloudbuild.v1.BuildTrigger" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.BuildTrigger", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "UpdateBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "RunBuildTrigger", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async", - "title": "CloudBuild receiveTriggerWebhook Sample", - "origin": "API_DEFINITION", - "description": " ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.", - "canonical": true, - "file": "cloud_build.receive_trigger_webhook.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ReceiveTriggerWebhook", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "body", - "type": ".google.api.HttpBody" - }, - { - "name": "project_id", - "type": "TYPE_STRING" - }, - { - "name": "trigger", - "type": "TYPE_STRING" - }, - { - "name": "secret", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async", + "title": "CloudBuild runBuildTrigger Sample", + "origin": "API_DEFINITION", + "description": " Runs a `BuildTrigger` at a particular source revision.", + "canonical": true, + "file": "cloud_build.run_build_trigger.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger_id", + "type": "TYPE_STRING" + }, + { + "name": "source", + "type": ".google.devtools.cloudbuild.v1.RepoSource" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "RunBuildTrigger", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.RunBuildTrigger", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "ReceiveTriggerWebhook", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async", - "title": "CloudBuild createWorkerPool Sample", - "origin": "API_DEFINITION", - "description": " Creates a `WorkerPool`.", - "canonical": true, - "file": "cloud_build.create_worker_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "worker_pool", - "type": ".google.devtools.cloudbuild.v1.WorkerPool" - }, - { - "name": "worker_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async", + "title": "CloudBuild receiveTriggerWebhook Sample", + "origin": "API_DEFINITION", + "description": " ReceiveTriggerWebhook [Experimental] is called when the API receives a webhook request targeted at a specific trigger.", + "canonical": true, + "file": "cloud_build.receive_trigger_webhook.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReceiveTriggerWebhook", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "body", + "type": ".google.api.HttpBody" + }, + { + "name": "project_id", + "type": "TYPE_STRING" + }, + { + "name": "trigger", + "type": "TYPE_STRING" + }, + { + "name": "secret", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ReceiveTriggerWebhook", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ReceiveTriggerWebhook", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "CreateWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async", - "title": "CloudBuild getWorkerPool Sample", - "origin": "API_DEFINITION", - "description": " Returns details of a `WorkerPool`.", - "canonical": true, - "file": "cloud_build.get_worker_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.WorkerPool", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async", + "title": "CloudBuild createWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Creates a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.create_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "worker_pool", + "type": ".google.devtools.cloudbuild.v1.WorkerPool" + }, + { + "name": "worker_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "CreateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.CreateWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "GetWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async", - "title": "CloudBuild deleteWorkerPool Sample", - "origin": "API_DEFINITION", - "description": " Deletes a `WorkerPool`.", - "canonical": true, - "file": "cloud_build.delete_worker_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "etag", - "type": "TYPE_STRING" - }, - { - "name": "allow_missing", - "type": "TYPE_BOOL" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async", + "title": "CloudBuild getWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Returns details of a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.get_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.WorkerPool", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "GetWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.GetWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "DeleteWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async", - "title": "CloudBuild updateWorkerPool Sample", - "origin": "API_DEFINITION", - "description": " Updates a `WorkerPool`.", - "canonical": true, - "file": "cloud_build.update_worker_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 62, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", - "async": true, - "parameters": [ - { - "name": "worker_pool", - "type": ".google.devtools.cloudbuild.v1.WorkerPool" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async", + "title": "CloudBuild deleteWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Deletes a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.delete_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "allow_missing", + "type": "TYPE_BOOL" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "DeleteWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.DeleteWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "UpdateWorkerPool", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } - } - } - }, - { - "regionTag": "cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async", - "title": "CloudBuild listWorkerPools Sample", - "origin": "API_DEFINITION", - "description": " Lists `WorkerPool`s.", - "canonical": true, - "file": "cloud_build.list_worker_pools.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListWorkerPools", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse", - "client": { - "shortName": "CloudBuildClient", - "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + "regionTag": "cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async", + "title": "CloudBuild updateWorkerPool Sample", + "origin": "API_DEFINITION", + "description": " Updates a `WorkerPool`.", + "canonical": true, + "file": "cloud_build.update_worker_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + "async": true, + "parameters": [ + { + "name": "worker_pool", + "type": ".google.devtools.cloudbuild.v1.WorkerPool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "UpdateWorkerPool", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.UpdateWorkerPool", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } }, - "method": { - "shortName": "ListWorkerPools", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", - "service": { - "shortName": "CloudBuild", - "fullName": "google.devtools.cloudbuild.v1.CloudBuild" - } + { + "regionTag": "cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async", + "title": "CloudBuild listWorkerPools Sample", + "origin": "API_DEFINITION", + "description": " Lists `WorkerPool`s.", + "canonical": true, + "file": "cloud_build.list_worker_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkerPools", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.devtools.cloudbuild.v1.ListWorkerPoolsResponse", + "client": { + "shortName": "CloudBuildClient", + "fullName": "google.devtools.cloudbuild.v1.CloudBuildClient" + }, + "method": { + "shortName": "ListWorkerPools", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild.ListWorkerPools", + "service": { + "shortName": "CloudBuild", + "fullName": "google.devtools.cloudbuild.v1.CloudBuild" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From c36b33d6a8853b5c6e9f45043e7a36d65ccd2b3f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 02:22:18 +0200 Subject: [PATCH 198/223] chore(deps): update dependency @types/mocha to v9 (#320) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@types/mocha](https://togithub.com/DefinitelyTyped/DefinitelyTyped) | [`^8.0.0` -> `^9.0.0`](https://renovatebot.com/diffs/npm/@types%2fmocha/8.2.3/9.1.1) | [![age](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/compatibility-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/@types%2fmocha/9.1.1/confidence-slim/8.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 6a55b4886294..1db189f0d52f 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -24,7 +24,7 @@ "Cloud Build API" ], "devDependencies": { - "@types/mocha": "^8.0.0", + "@types/mocha": "^9.0.0", "@types/sinon": "^10.0.0", "c8": "^7.0.0", "chai": "^4.2.0", From c4e84fe7a98100ce0a871d0443858a9cdbb67e3e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:38:19 +0200 Subject: [PATCH 199/223] chore(deps): update dependency sinon to v14 (#323) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [sinon](https://sinonjs.org/) ([source](https://togithub.com/sinonjs/sinon)) | [`^13.0.0` -> `^14.0.0`](https://renovatebot.com/diffs/npm/sinon/13.0.2/14.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/compatibility-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/14.0.0/confidence-slim/13.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v14.0.0`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1400) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.2...v14.0.0) - [`c2bbd826`](https://togithub.com/sinonjs/sinon/commit/c2bbd82641444eb5b32822489ae40f185afbbf00) Drop node 12 (Morgan Roderick) > And embrace Node 18 > > See https://nodejs.org/en/about/releases/ *Released by Morgan Roderick on 2022-05-07.*
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 1db189f0d52f..bea65b0574e1 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -35,7 +35,7 @@ "linkinator": "^2.0.0", "mocha": "^8.0.0", "pack-n-play": "^1.0.0-2", - "sinon": "^13.0.0", + "sinon": "^14.0.0", "typescript": "^3.8.3" }, "scripts": { From e6fb214417ea333fb372efcf140e18f97149b580 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 13 May 2022 23:37:24 +0200 Subject: [PATCH 200/223] chore(deps): update node.js to v18 (#319) --- packages/google-devtools-cloudbuild/cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml index 10f85817b793..16339fd1ab2b 100644 --- a/packages/google-devtools-cloudbuild/cloudbuild.yaml +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -1,7 +1,7 @@ steps: -- name: node:17 +- name: node:18 entrypoint: npm args: ['install'] -- name: node:17 +- name: node:18 entrypoint: npm args: ['test'] From dc3610ea39e5a95d1c45b143a8ca66437f35fd52 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Mon, 16 May 2022 17:36:55 -0700 Subject: [PATCH 201/223] build!: update library to use Node 12 (#325) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat!: Update library to use Node 12 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/package.json | 10 +++++----- .../google-devtools-cloudbuild/samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index bea65b0574e1..9f9b578ce62b 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -28,15 +28,15 @@ "@types/sinon": "^10.0.0", "c8": "^7.0.0", "chai": "^4.2.0", - "gts": "^3.0.0", + "gts": "^3.1.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", - "typescript": "^3.8.3" + "typescript": "^4.6.4" }, "scripts": { "predocs": "npm run compile", @@ -58,9 +58,9 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "dependencies": { - "google-gax": "^2.24.1" + "google-gax": "^3.0.1" } } diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index f973e1017c4d..4a2d4e621b63 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -9,7 +9,7 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-cloudbuild", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "scripts": { "test": "c8 mocha system-test --timeout=800000" From 01a0f73c092a9f6e645df37c22ea978591f292ef Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 May 2022 16:58:46 -0700 Subject: [PATCH 202/223] chore(main): release 3.0.0 (#326) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.0.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/CHANGELOG.md | 11 +++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- ...nippet_metadata.google.devtools.cloudbuild.v1.json | 2 +- .../google-devtools-cloudbuild/samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index b2025bce3f3e..eb2c8a709063 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [3.0.0](https://github.com/googleapis/nodejs-cloudbuild/compare/v2.6.0...v3.0.0) (2022-05-17) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#325) + +### Build System + +* update library to use Node 12 ([#325](https://github.com/googleapis/nodejs-cloudbuild/issues/325)) ([596e5c2](https://github.com/googleapis/nodejs-cloudbuild/commit/596e5c21bc21c1d74fecb4cb7eb887561e1598f8)) + ## [2.6.0](https://www.github.com/googleapis/nodejs-cloudbuild/compare/v2.5.0...v2.6.0) (2021-08-25) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 9f9b578ce62b..ebc9f1e0c362 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "2.6.0", + "version": "3.0.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 7a45546ca884..5c16e3283b5e 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "2.6.0", + "version": "3.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 4a2d4e621b63..24ee2aa07c91 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^2.6.0" + "@google-cloud/cloudbuild": "^3.0.0" }, "devDependencies": { "c8": "^7.0.0", From aadab9f1559b756cbe88db643d50e25e160fa6a8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 11:39:41 -0700 Subject: [PATCH 203/223] fix: fixes for dynamic routing and streaming descriptors (#327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: fixes for dynamic routing and streaming descriptors Use gapic-generator-typescript v2.14.5. PiperOrigin-RevId: 450616838 Source-Link: https://github.com/googleapis/googleapis/commit/7a47b72791e0b84d78beca4c2b26bec42ce31572 Source-Link: https://github.com/googleapis/googleapis-gen/commit/42cc6331bae0b99f61b8e01ae15b05211716c4f9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDJjYzYzMzFiYWUwYjk5ZjYxYjhlMDFhZTE1YjA1MjExNzE2YzRmOSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../src/v1/cloud_build_client.ts | 8 ++ .../test/gapic_cloud_build_v1.ts | 87 +++++++++++++------ 2 files changed, 69 insertions(+), 26 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index ca9952466a04..192d02aac57e 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -567,6 +567,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + id: request.id || '', name: request.name || '', }); this.initialize(); @@ -664,6 +665,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + id: request.id || '', name: request.name || '', }); this.initialize(); @@ -868,6 +870,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + trigger_id: request.triggerId || '', name: request.name || '', }); this.initialize(); @@ -973,6 +976,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + trigger_id: request.triggerId || '', name: request.name || '', }); this.initialize(); @@ -1077,6 +1081,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + trigger_id: request.triggerId || '', 'trigger.resource_name': request.trigger!.resourceName || '', }); this.initialize(); @@ -1185,6 +1190,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + trigger: request.trigger || '', name: request.name || '', }); this.initialize(); @@ -1560,6 +1566,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + id: request.id || '', name: request.name || '', }); this.initialize(); @@ -1850,6 +1857,7 @@ export class CloudBuildClient { options.otherArgs.headers['x-goog-request-params'] = gax.routingHeader.fromParams({ project_id: request.projectId || '', + trigger_id: request.triggerId || '', name: request.name || '', }); this.initialize(); diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 31f0cb575445..33a131ad579e 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -251,8 +251,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -283,8 +284,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -331,8 +333,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -360,6 +363,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -378,8 +382,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -410,8 +415,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -458,8 +464,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -490,6 +497,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -639,8 +647,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -671,8 +680,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -719,8 +729,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -751,6 +762,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -769,8 +781,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -802,8 +815,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -850,8 +864,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -882,6 +897,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -900,9 +916,11 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.trigger = {}; request.trigger.resourceName = ''; - const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; + const expectedHeaderRequestParams = + 'project_id=&trigger_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -934,9 +952,11 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.trigger = {}; request.trigger.resourceName = ''; - const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; + const expectedHeaderRequestParams = + 'project_id=&trigger_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -983,9 +1003,11 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.trigger = {}; request.trigger.resourceName = ''; - const expectedHeaderRequestParams = 'project_id=&trigger.resource_name='; + const expectedHeaderRequestParams = + 'project_id=&trigger_id=&trigger.resource_name='; const expectedOptions = { otherArgs: { headers: { @@ -1016,6 +1038,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.trigger = {}; request.trigger.resourceName = ''; const expectedError = new Error('The client has already been closed.'); @@ -1035,8 +1058,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; + request.trigger = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1068,8 +1092,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; + request.trigger = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1116,8 +1141,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; + request.trigger = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1151,6 +1177,7 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); request.projectId = ''; + request.trigger = ''; request.name = ''; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1492,8 +1519,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1525,8 +1553,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1580,8 +1609,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1612,8 +1642,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); request.projectId = ''; + request.id = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1876,8 +1907,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1910,8 +1942,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1965,8 +1998,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { @@ -1997,8 +2031,9 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); request.projectId = ''; + request.triggerId = ''; request.name = ''; - const expectedHeaderRequestParams = 'project_id=&name='; + const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; const expectedOptions = { otherArgs: { headers: { From 90111fc325afddea371d9df378b12ab12996af90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 20 Jun 2022 21:12:24 +0200 Subject: [PATCH 204/223] chore(deps): update dependency jsdoc-region-tag to v2 (#331) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index ebc9f1e0c362..5652036a4a0b 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -31,7 +31,7 @@ "gts": "^3.1.0", "jsdoc": "^3.6.2", "jsdoc-fresh": "^1.0.2", - "jsdoc-region-tag": "^1.0.2", + "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", From baffdc7f59de5be6ea70dae3800982020682b0ed Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 19:10:35 +0000 Subject: [PATCH 205/223] chore(main): release 3.0.1 (#328) :robot: I have created a release *beep* *boop* --- ## [3.0.1](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.0.0...v3.0.1) (2022-06-20) ### Bug Fixes * fixes for dynamic routing and streaming descriptors ([#327](https://github.com/googleapis/nodejs-cloudbuild/issues/327)) ([4cf9b63](https://github.com/googleapis/nodejs-cloudbuild/commit/4cf9b6342121cdff09767321ab3a24d56f7f13d9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../v1/snippet_metadata.google.devtools.cloudbuild.v1.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index eb2c8a709063..c0017c5c9cdd 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.0.1](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.0.0...v3.0.1) (2022-06-20) + + +### Bug Fixes + +* fixes for dynamic routing and streaming descriptors ([#327](https://github.com/googleapis/nodejs-cloudbuild/issues/327)) ([4cf9b63](https://github.com/googleapis/nodejs-cloudbuild/commit/4cf9b6342121cdff09767321ab3a24d56f7f13d9)) + ## [3.0.0](https://github.com/googleapis/nodejs-cloudbuild/compare/v2.6.0...v3.0.0) (2022-05-17) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 5652036a4a0b..7723ae85eb8f 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "3.0.0", + "version": "3.0.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 5c16e3283b5e..f20e69f83333 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.0.0", + "version": "3.0.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 24ee2aa07c91..516b3c9da78f 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.0.0" + "@google-cloud/cloudbuild": "^3.0.1" }, "devDependencies": { "c8": "^7.0.0", From 9c543f444feaf8a0a8f59d7e151464654522d12d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 09:14:26 +0000 Subject: [PATCH 206/223] feat: support regapic LRO (#333) - [ ] Regenerate this pull request now. Use gapic-generator-typescript v2.15.1. PiperOrigin-RevId: 456946341 Source-Link: https://github.com/googleapis/googleapis/commit/88fd18d9d3b872b3d06a3d9392879f50b5bf3ce5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/accfa371f667439313335c64042b063c1c53102e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWNjZmEzNzFmNjY3NDM5MzEzMzM1YzY0MDQyYjA2M2MxYzUzMTAyZSJ9 --- .../src/v1/cloud_build_client.ts | 46 ++++++++++++++----- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 192d02aac57e..2dd86b231d47 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -79,7 +80,7 @@ export class CloudBuildClient { * * @param {object} [options] - The configuration object. * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). * The common options are: * @param {object} [options.credentials] - Credentials object. * @param {string} [options.credentials.client_email] @@ -102,11 +103,10 @@ export class CloudBuildClient { * API remote host. * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP fallback mode. - * In fallback mode, a special browser-compatible transport implementation is used - * instead of gRPC transport. In browser context (if the `window` object is defined) - * the fallback mode is enabled automatically; set `options.fallback` to `false` - * if you need to override this behavior. + * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. */ constructor(opts?: ClientOptions) { // Ensure that options include all the required fields. @@ -233,16 +233,38 @@ export class CloudBuildClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=operations/**}:cancel', + body: '*', + additional_bindings: [ + { + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=operations/**}', + additional_bindings: [ + {get: '/v1/{name=projects/*/locations/*/operations/*}'}, + ], + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const createBuildResponse = protoFilesRoot.lookup( '.google.devtools.cloudbuild.v1.Build' From fb15c225eab0917d136daebb708c8bf9a23ab901 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 4 Jul 2022 23:03:05 +0200 Subject: [PATCH 207/223] chore(deps): update dependency jsdoc-fresh to v2 (#330) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 7723ae85eb8f..dfaed3777d97 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -30,7 +30,7 @@ "chai": "^4.2.0", "gts": "^3.1.0", "jsdoc": "^3.6.2", - "jsdoc-fresh": "^1.0.2", + "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^2.0.0", "mocha": "^9.2.2", From 13e12459a24f3a758874d2b4cd00412c624ed7cb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:09:55 -0400 Subject: [PATCH 208/223] chore(main): release 3.1.0 (#334) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.1.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/CHANGELOG.md | 8 ++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../snippet_metadata.google.devtools.cloudbuild.v1.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index c0017c5c9cdd..a4b6fc4dcd7c 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.1.0](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.0.1...v3.1.0) (2022-07-04) + + +### Features + +* support regapic LRO ([d769170](https://github.com/googleapis/nodejs-cloudbuild/commit/d7691703d9948ddfec8f253f9569e7b603f40ce8)) +* support regapic LRO ([#333](https://github.com/googleapis/nodejs-cloudbuild/issues/333)) ([eb65473](https://github.com/googleapis/nodejs-cloudbuild/commit/eb65473efeedf235a28de62e352db78d5d038e25)) + ## [3.0.1](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.0.0...v3.0.1) (2022-06-20) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index dfaed3777d97..b75789ae67ff 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "3.0.1", + "version": "3.1.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index f20e69f83333..c14a636a6861 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.0.1", + "version": "3.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 516b3c9da78f..b18b3ea318a4 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.0.1" + "@google-cloud/cloudbuild": "^3.1.0" }, "devDependencies": { "c8": "^7.0.0", From 6daf0d40b62059482007fbcde77efca0eb5f109b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Jul 2022 22:33:06 +0200 Subject: [PATCH 209/223] chore(deps): update dependency linkinator to v4 (#336) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index b75789ae67ff..28be799e37bb 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -32,7 +32,7 @@ "jsdoc": "^3.6.2", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", - "linkinator": "^2.0.0", + "linkinator": "^4.0.0", "mocha": "^9.2.2", "pack-n-play": "^1.0.0-2", "sinon": "^14.0.0", From ca4ec8e4cad0061c09ae8584d1ba85c73c9adb08 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 00:04:12 +0000 Subject: [PATCH 210/223] fix: better support for fallback mode (#337) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468790263 Source-Link: https://github.com/googleapis/googleapis/commit/873ab456273d105245df0fb82a6c17a814553b80 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb6f37aeff2a3472e40a7bbace8c67d75e24bee5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I2ZjM3YWVmZjJhMzQ3MmU0MGE3YmJhY2U4YzY3ZDc1ZTI0YmVlNSJ9 --- .../generated/v1/cloud_build.approve_build.js | 3 + .../generated/v1/cloud_build.cancel_build.js | 3 + .../generated/v1/cloud_build.create_build.js | 3 + .../v1/cloud_build.create_build_trigger.js | 3 + .../v1/cloud_build.create_worker_pool.js | 3 + .../v1/cloud_build.delete_build_trigger.js | 3 + .../v1/cloud_build.delete_worker_pool.js | 3 + .../generated/v1/cloud_build.get_build.js | 3 + .../v1/cloud_build.get_build_trigger.js | 3 + .../v1/cloud_build.get_worker_pool.js | 3 + .../v1/cloud_build.list_build_triggers.js | 3 + .../generated/v1/cloud_build.list_builds.js | 3 + .../v1/cloud_build.list_worker_pools.js | 3 + .../v1/cloud_build.receive_trigger_webhook.js | 3 + .../generated/v1/cloud_build.retry_build.js | 3 + .../v1/cloud_build.run_build_trigger.js | 3 + .../v1/cloud_build.update_build_trigger.js | 3 + .../v1/cloud_build.update_worker_pool.js | 3 + ...etadata.google.devtools.cloudbuild.v1.json | 36 ++-- .../src/v1/cloud_build_client.ts | 30 ++-- .../test/gapic_cloud_build_v1.ts | 156 +++++++++--------- 21 files changed, 166 insertions(+), 110 deletions(-) diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js index a6cafe4d044f..5b53567c1463 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.approve_build.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudbuild_v1_generated_CloudBuild_ApproveBuild_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js index 8651a092d121..c8a0e73d01bb 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.cancel_build.js @@ -23,6 +23,9 @@ function main(projectId, id) { // [START cloudbuild_v1_generated_CloudBuild_CancelBuild_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js index d6e6d1a26c08..f84f72d9e650 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build.js @@ -23,6 +23,9 @@ function main(projectId, build) { // [START cloudbuild_v1_generated_CloudBuild_CreateBuild_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js index a24230d7f4e9..4be76c8680bc 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_build_trigger.js @@ -23,6 +23,9 @@ function main(projectId, trigger) { // [START cloudbuild_v1_generated_CloudBuild_CreateBuildTrigger_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js index 7361205979c3..b41d78f2121b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.create_worker_pool.js @@ -23,6 +23,9 @@ function main(parent, workerPool, workerPoolId) { // [START cloudbuild_v1_generated_CloudBuild_CreateWorkerPool_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js index 43ff110c9041..2cebd45aeb91 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_build_trigger.js @@ -23,6 +23,9 @@ function main(projectId, triggerId) { // [START cloudbuild_v1_generated_CloudBuild_DeleteBuildTrigger_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js index 262eb4423ae6..cb373e0dca15 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.delete_worker_pool.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudbuild_v1_generated_CloudBuild_DeleteWorkerPool_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js index 786456d963b8..46098f262a88 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build.js @@ -23,6 +23,9 @@ function main(projectId, id) { // [START cloudbuild_v1_generated_CloudBuild_GetBuild_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js index cd80fd663f52..869ecdc3233a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_build_trigger.js @@ -23,6 +23,9 @@ function main(projectId, triggerId) { // [START cloudbuild_v1_generated_CloudBuild_GetBuildTrigger_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js index 91ebfb8b4701..95cf4571f66c 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.get_worker_pool.js @@ -23,6 +23,9 @@ function main(name) { // [START cloudbuild_v1_generated_CloudBuild_GetWorkerPool_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js index 869efeedc3ea..d11b8fb089c2 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_build_triggers.js @@ -23,6 +23,9 @@ function main(projectId) { // [START cloudbuild_v1_generated_CloudBuild_ListBuildTriggers_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js index 31ed683e0e0e..be6ed0123ca7 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_builds.js @@ -23,6 +23,9 @@ function main(projectId) { // [START cloudbuild_v1_generated_CloudBuild_ListBuilds_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js index c549beed49c3..501dce663564 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.list_worker_pools.js @@ -23,6 +23,9 @@ function main(parent) { // [START cloudbuild_v1_generated_CloudBuild_ListWorkerPools_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js index 43900f3c8425..e568c13a4fbf 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.receive_trigger_webhook.js @@ -23,6 +23,9 @@ function main() { // [START cloudbuild_v1_generated_CloudBuild_ReceiveTriggerWebhook_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js index fb60578a2743..5ce8f753f054 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.retry_build.js @@ -23,6 +23,9 @@ function main(projectId, id) { // [START cloudbuild_v1_generated_CloudBuild_RetryBuild_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js index 0d9714c25cbe..5dcbc3bbc792 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.run_build_trigger.js @@ -23,6 +23,9 @@ function main(projectId, triggerId) { // [START cloudbuild_v1_generated_CloudBuild_RunBuildTrigger_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js index b8d56cadf096..3c82e6354d7a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_build_trigger.js @@ -23,6 +23,9 @@ function main(projectId, triggerId, trigger) { // [START cloudbuild_v1_generated_CloudBuild_UpdateBuildTrigger_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js index 0417f4d4fefd..623087f8aba0 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/cloud_build.update_worker_pool.js @@ -23,6 +23,9 @@ function main(workerPool) { // [START cloudbuild_v1_generated_CloudBuild_UpdateWorkerPool_async] /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. * TODO(developer): Uncomment these variables before running the sample. */ /** diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index c14a636a6861..fd5c21501202 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -70,7 +70,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -118,7 +118,7 @@ "segments": [ { "start": 25, - "end": 74, + "end": 77, "type": "FULL" } ], @@ -174,7 +174,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -222,7 +222,7 @@ "segments": [ { "start": 25, - "end": 61, + "end": 64, "type": "FULL" } ], @@ -270,7 +270,7 @@ "segments": [ { "start": 25, - "end": 56, + "end": 59, "type": "FULL" } ], @@ -314,7 +314,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -362,7 +362,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -410,7 +410,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -462,7 +462,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -510,7 +510,7 @@ "segments": [ { "start": 25, - "end": 60, + "end": 63, "type": "FULL" } ], @@ -558,7 +558,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -610,7 +610,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -666,7 +666,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -718,7 +718,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -758,7 +758,7 @@ "segments": [ { "start": 25, - "end": 68, + "end": 71, "type": "FULL" } ], @@ -810,7 +810,7 @@ "segments": [ { "start": 25, - "end": 62, + "end": 65, "type": "FULL" } ], @@ -858,7 +858,7 @@ "segments": [ { "start": 25, - "end": 63, + "end": 66, "type": "FULL" } ], diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 2dd86b231d47..b01412e9eef0 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -30,7 +30,6 @@ import { } from 'google-gax'; import {Transform} from 'stream'; -import {RequestType} from 'google-gax/build/src/apitypes'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); /** @@ -438,7 +437,8 @@ export class CloudBuildClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1451,7 +1451,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createBuild, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.Build, @@ -1621,7 +1621,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.retryBuild, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.Build, @@ -1766,7 +1766,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.approveBuild, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.Build, @@ -1912,7 +1912,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.runBuildTrigger, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.Build, @@ -2061,7 +2061,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createWorkerPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.WorkerPool, @@ -2209,7 +2209,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteWorkerPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -2354,7 +2354,7 @@ export class CloudBuildClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateWorkerPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.devtools.cloudbuild.v1.WorkerPool, @@ -2529,7 +2529,7 @@ export class CloudBuildClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuilds.createStream( - this.innerApiCalls.listBuilds as gax.GaxCall, + this.innerApiCalls.listBuilds as GaxCall, request, callSettings ); @@ -2591,7 +2591,7 @@ export class CloudBuildClient { this.initialize(); return this.descriptors.page.listBuilds.asyncIterate( this.innerApiCalls['listBuilds'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2742,7 +2742,7 @@ export class CloudBuildClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listBuildTriggers.createStream( - this.innerApiCalls.listBuildTriggers as gax.GaxCall, + this.innerApiCalls.listBuildTriggers as GaxCall, request, callSettings ); @@ -2794,7 +2794,7 @@ export class CloudBuildClient { this.initialize(); return this.descriptors.page.listBuildTriggers.asyncIterate( this.innerApiCalls['listBuildTriggers'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -2941,7 +2941,7 @@ export class CloudBuildClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listWorkerPools.createStream( - this.innerApiCalls.listWorkerPools as gax.GaxCall, + this.innerApiCalls.listWorkerPools as GaxCall, request, callSettings ); @@ -2992,7 +2992,7 @@ export class CloudBuildClient { this.initialize(); return this.descriptors.page.listWorkerPools.asyncIterate( this.innerApiCalls['listWorkerPools'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 33a131ad579e..6102d965f2f4 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -145,99 +145,101 @@ function stubAsyncIterationCall( } describe('v1.CloudBuildClient', () => { - it('has servicePath', () => { - const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; - assert(servicePath); - }); - - it('has apiEndpoint', () => { - const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; - assert(apiEndpoint); - }); - - it('has port', () => { - const port = cloudbuildModule.v1.CloudBuildClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new cloudbuildModule.v1.CloudBuildClient(); - assert(client); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = cloudbuildModule.v1.CloudBuildClient.servicePath; + assert(servicePath); + }); - it('should create a client with gRPC fallback', () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - fallback: true, + it('has apiEndpoint', () => { + const apiEndpoint = cloudbuildModule.v1.CloudBuildClient.apiEndpoint; + assert(apiEndpoint); }); - assert(client); - }); - it('has initialize method and supports deferred initialization', async () => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has port', () => { + const port = cloudbuildModule.v1.CloudBuildClient.port; + assert(port); + assert(typeof port === 'number'); }); - assert.strictEqual(client.cloudBuildStub, undefined); - await client.initialize(); - assert(client.cloudBuildStub); - }); - it('has close method for the initialized client', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('should create a client with no option', () => { + const client = new cloudbuildModule.v1.CloudBuildClient(); + assert(client); }); - client.initialize(); - assert(client.cloudBuildStub); - client.close().then(() => { - done(); + + it('should create a client with gRPC fallback', () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + fallback: true, + }); + assert(client); }); - }); - it('has close method for the non-initialized client', done => { - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has initialize method and supports deferred initialization', async () => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudBuildStub, undefined); + await client.initialize(); + assert(client.cloudBuildStub); }); - assert.strictEqual(client.cloudBuildStub, undefined); - client.close().then(() => { - done(); + + it('has close method for the initialized client', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.cloudBuildStub); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has close method for the non-initialized client', done => { + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.cloudBuildStub, undefined); + client.close().then(() => { + done(); + }); }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new cloudbuildModule.v1.CloudBuildClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new cloudbuildModule.v1.CloudBuildClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); }); describe('getBuild', () => { From 2ba976dba7a593ade72faa2848ce30a096052b91 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 23 Aug 2022 17:00:22 +0000 Subject: [PATCH 211/223] fix: change import long to require (#339) Source-Link: https://github.com/googleapis/synthtool/commit/d229a1258999f599a90a9b674a1c5541e00db588 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e --- .../protos/protos.d.ts | 846 ++- .../protos/protos.js | 5546 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 4714 insertions(+), 1702 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 7bf9c0097491..2b6cd22fd23f 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import * as Long from "long"; +import Long = require("long"); import {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { @@ -302,126 +302,126 @@ export namespace google { namespace CloudBuild { /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createBuild}. * @param error Error, if any * @param [response] Operation */ type CreateBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getBuild}. * @param error Error, if any * @param [response] Build */ type GetBuildCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.Build) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuilds}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listBuilds}. * @param error Error, if any * @param [response] ListBuildsResponse */ type ListBuildsCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ListBuildsResponse) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#cancelBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|cancelBuild}. * @param error Error, if any * @param [response] Build */ type CancelBuildCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.Build) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#retryBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|retryBuild}. * @param error Error, if any * @param [response] Operation */ type RetryBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#approveBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|approveBuild}. * @param error Error, if any * @param [response] Operation */ type ApproveBuildCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createBuildTrigger}. * @param error Error, if any * @param [response] BuildTrigger */ type CreateBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getBuildTrigger}. * @param error Error, if any * @param [response] BuildTrigger */ type GetBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuildTriggers}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listBuildTriggers}. * @param error Error, if any * @param [response] ListBuildTriggersResponse */ type ListBuildTriggersCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ListBuildTriggersResponse) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|deleteBuildTrigger}. * @param error Error, if any * @param [response] Empty */ type DeleteBuildTriggerCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|updateBuildTrigger}. * @param error Error, if any * @param [response] BuildTrigger */ type UpdateBuildTriggerCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.BuildTrigger) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#runBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|runBuildTrigger}. * @param error Error, if any * @param [response] Operation */ type RunBuildTriggerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#receiveTriggerWebhook}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|receiveTriggerWebhook}. * @param error Error, if any * @param [response] ReceiveTriggerWebhookResponse */ type ReceiveTriggerWebhookCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createWorkerPool}. * @param error Error, if any * @param [response] Operation */ type CreateWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getWorkerPool}. * @param error Error, if any * @param [response] WorkerPool */ type GetWorkerPoolCallback = (error: (Error|null), response?: google.devtools.cloudbuild.v1.WorkerPool) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|deleteWorkerPool}. * @param error Error, if any * @param [response] Operation */ type DeleteWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|updateWorkerPool}. * @param error Error, if any * @param [response] Operation */ type UpdateWorkerPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listWorkerPools}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listWorkerPools}. * @param error Error, if any * @param [response] ListWorkerPoolsResponse */ @@ -528,6 +528,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryBuildRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RunBuildTriggerRequest. */ @@ -636,6 +643,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunBuildTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StorageSource. */ @@ -738,6 +752,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RepoSource. */ @@ -873,6 +894,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RepoSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StorageSourceManifest. */ @@ -975,6 +1003,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageSourceManifest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Source. */ @@ -1080,6 +1115,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Source + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BuiltImage. */ @@ -1182,6 +1224,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuiltImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BuildStep. */ @@ -1350,6 +1399,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Volume. */ @@ -1446,6 +1502,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Volume + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Results. */ @@ -1566,6 +1629,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Results + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ArtifactResult. */ @@ -1662,6 +1732,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArtifactResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Build. */ @@ -1920,6 +1997,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Build + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Build { @@ -2018,6 +2102,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Warning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Warning { @@ -2125,6 +2216,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FailureInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FailureInfo { @@ -2250,6 +2348,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Artifacts + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Artifacts { @@ -2354,6 +2459,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArtifactObjects + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2451,6 +2563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSpan + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BuildOperationMetadata. */ @@ -2541,6 +2660,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SourceProvenance. */ @@ -2649,6 +2775,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceProvenance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileHashes. */ @@ -2739,6 +2872,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileHashes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Hash. */ @@ -2835,6 +2975,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Hash + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Hash { @@ -2941,6 +3088,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Secrets + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an InlineSecret. */ @@ -3037,6 +3191,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InlineSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SecretManagerSecret. */ @@ -3133,6 +3294,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretManagerSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Secret. */ @@ -3229,6 +3397,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Secret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateBuildRequest. */ @@ -3331,6 +3506,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBuildRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetBuildRequest. */ @@ -3433,6 +3615,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBuildRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBuildsRequest. */ @@ -3547,6 +3736,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBuildsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBuildsResponse. */ @@ -3643,6 +3839,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBuildsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelBuildRequest. */ @@ -3745,6 +3948,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelBuildRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApproveBuildRequest. */ @@ -3841,6 +4051,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveBuildRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BuildApproval. */ @@ -3943,6 +4160,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildApproval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BuildApproval { @@ -4045,6 +4269,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApprovalConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ApprovalResult. */ @@ -4159,6 +4390,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApprovalResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ApprovalResult { @@ -4370,6 +4608,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GitHubEventsConfig. */ @@ -4487,6 +4732,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GitHubEventsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PubsubConfig. */ @@ -4595,6 +4847,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubsubConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PubsubConfig { @@ -4706,6 +4965,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebhookConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WebhookConfig { @@ -4821,6 +5087,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PullRequestFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PullRequestFilter { @@ -4936,6 +5209,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PushFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateBuildTriggerRequest. */ @@ -5038,6 +5318,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateBuildTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetBuildTriggerRequest. */ @@ -5140,6 +5427,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetBuildTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBuildTriggersRequest. */ @@ -5248,6 +5542,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBuildTriggersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListBuildTriggersResponse. */ @@ -5344,6 +5645,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBuildTriggersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteBuildTriggerRequest. */ @@ -5446,6 +5754,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteBuildTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateBuildTriggerRequest. */ @@ -5548,6 +5863,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateBuildTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BuildOptions. */ @@ -5710,6 +6032,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BuildOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BuildOptions { @@ -5802,6 +6131,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PoolOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** VerifyOption enum. */ @@ -5955,6 +6291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveTriggerWebhookRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReceiveTriggerWebhookResponse. */ @@ -6039,6 +6382,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReceiveTriggerWebhookResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WorkerPool. */ @@ -6186,6 +6536,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkerPool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace WorkerPool { @@ -6294,6 +6651,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivatePoolV1Config + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PrivatePoolV1Config { @@ -6392,6 +6756,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NetworkConfig. */ @@ -6488,6 +6859,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace NetworkConfig { @@ -6607,6 +6985,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkerPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetWorkerPoolRequest. */ @@ -6697,6 +7082,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetWorkerPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkerPoolRequest. */ @@ -6805,6 +7197,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkerPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateWorkerPoolRequest. */ @@ -6907,6 +7306,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateWorkerPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkerPoolsRequest. */ @@ -7009,6 +7415,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkerPoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListWorkerPoolsResponse. */ @@ -7105,6 +7518,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkerPoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateWorkerPoolOperationMetadata. */ @@ -7207,6 +7627,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateWorkerPoolOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateWorkerPoolOperationMetadata. */ @@ -7309,6 +7736,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateWorkerPoolOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteWorkerPoolOperationMetadata. */ @@ -7411,6 +7845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteWorkerPoolOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -7513,6 +7954,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ @@ -7660,6 +8108,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -7756,6 +8211,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** FieldBehavior enum. */ @@ -7870,6 +8332,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpBody + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ResourceDescriptor. */ @@ -7996,6 +8465,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -8108,6 +8584,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8202,6 +8685,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileDescriptorProto. */ @@ -8242,6 +8732,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -8289,6 +8782,9 @@ export namespace google { /** FileDescriptorProto syntax. */ public syntax: string; + /** FileDescriptorProto edition. */ + public edition: string; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -8358,6 +8854,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DescriptorProto. */ @@ -8502,6 +9005,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DescriptorProto { @@ -8606,6 +9116,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReservedRange. */ @@ -8702,6 +9219,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8793,6 +9317,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldDescriptorProto. */ @@ -8943,6 +9474,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldDescriptorProto { @@ -9071,6 +9609,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumDescriptorProto. */ @@ -9185,6 +9730,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EnumDescriptorProto { @@ -9283,6 +9835,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9386,6 +9945,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceDescriptorProto. */ @@ -9488,6 +10054,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodDescriptorProto. */ @@ -9608,6 +10181,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FileOptions. */ @@ -9821,6 +10401,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FileOptions { @@ -9948,6 +10535,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldOptions. */ @@ -9965,6 +10559,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -10002,6 +10599,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -10080,6 +10680,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldOptions { @@ -10187,6 +10794,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumOptions. */ @@ -10289,6 +10903,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnumValueOptions. */ @@ -10385,6 +11006,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ServiceOptions. */ @@ -10487,6 +11115,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MethodOptions. */ @@ -10598,6 +11233,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace MethodOptions { @@ -10734,6 +11376,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UninterpretedOption { @@ -10832,6 +11481,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10923,6 +11579,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SourceCodeInfo { @@ -11039,6 +11702,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11130,6 +11800,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace GeneratedCodeInfo { @@ -11148,6 +11825,9 @@ export namespace google { /** Annotation end */ end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); } /** Represents an Annotation. */ @@ -11171,6 +11851,9 @@ export namespace google { /** Annotation end. */ public end: number; + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + /** * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set @@ -11240,6 +11923,23 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } } } @@ -11337,6 +12037,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -11433,6 +12140,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Empty. */ @@ -11517,6 +12231,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FieldMask. */ @@ -11607,6 +12328,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Timestamp. */ @@ -11703,6 +12431,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11803,35 +12538,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -11953,6 +12688,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -12043,6 +12785,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -12151,6 +12900,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -12247,6 +13003,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -12337,6 +13100,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -12427,6 +13197,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -12523,6 +13300,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -12619,6 +13403,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -12725,6 +13516,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 64d9cd33c817..99f54fa2dce2 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -99,7 +99,7 @@ }; /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createBuild}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef CreateBuildCallback * @type {function} @@ -132,7 +132,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getBuild}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef GetBuildCallback * @type {function} @@ -165,7 +165,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuilds}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listBuilds}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef ListBuildsCallback * @type {function} @@ -198,7 +198,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#cancelBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|cancelBuild}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef CancelBuildCallback * @type {function} @@ -231,7 +231,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#retryBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|retryBuild}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef RetryBuildCallback * @type {function} @@ -264,7 +264,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#approveBuild}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|approveBuild}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef ApproveBuildCallback * @type {function} @@ -297,7 +297,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef CreateBuildTriggerCallback * @type {function} @@ -330,7 +330,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef GetBuildTriggerCallback * @type {function} @@ -363,7 +363,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listBuildTriggers}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listBuildTriggers}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef ListBuildTriggersCallback * @type {function} @@ -396,7 +396,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|deleteBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef DeleteBuildTriggerCallback * @type {function} @@ -429,7 +429,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|updateBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef UpdateBuildTriggerCallback * @type {function} @@ -462,7 +462,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#runBuildTrigger}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|runBuildTrigger}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef RunBuildTriggerCallback * @type {function} @@ -495,7 +495,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#receiveTriggerWebhook}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|receiveTriggerWebhook}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef ReceiveTriggerWebhookCallback * @type {function} @@ -528,7 +528,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#createWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|createWorkerPool}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef CreateWorkerPoolCallback * @type {function} @@ -561,7 +561,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#getWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|getWorkerPool}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef GetWorkerPoolCallback * @type {function} @@ -594,7 +594,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#deleteWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|deleteWorkerPool}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef DeleteWorkerPoolCallback * @type {function} @@ -627,7 +627,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#updateWorkerPool}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|updateWorkerPool}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef UpdateWorkerPoolCallback * @type {function} @@ -660,7 +660,7 @@ */ /** - * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild#listWorkerPools}. + * Callback as used by {@link google.devtools.cloudbuild.v1.CloudBuild|listWorkerPools}. * @memberof google.devtools.cloudbuild.v1.CloudBuild * @typedef ListWorkerPoolsCallback * @type {function} @@ -809,15 +809,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -924,6 +927,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RetryBuildRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.RetryBuildRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryBuildRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.RetryBuildRequest"; + }; + return RetryBuildRequest; })(); @@ -1052,18 +1070,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.triggerId = reader.string(); - break; - case 3: - message.source = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.triggerId = reader.string(); + break; + } + case 3: { + message.source = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -1183,6 +1205,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RunBuildTriggerRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.RunBuildTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunBuildTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.RunBuildTriggerRequest"; + }; + return RunBuildTriggerRequest; })(); @@ -1300,15 +1337,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generation = reader.int64(); - break; + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.object = reader.string(); + break; + } + case 3: { + message.generation = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -1429,6 +1469,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StorageSource + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.StorageSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.StorageSource"; + }; + return StorageSource; })(); @@ -1617,49 +1672,57 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.projectId = reader.string(); - break; - case 2: - message.repoName = reader.string(); - break; - case 3: - message.branchName = reader.string(); - break; - case 4: - message.tagName = reader.string(); - break; - case 5: - message.commitSha = reader.string(); - break; - case 7: - message.dir = reader.string(); - break; - case 8: - message.invertRegex = reader.bool(); - break; - case 9: - if (message.substitutions === $util.emptyObject) - message.substitutions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.repoName = reader.string(); + break; + } + case 3: { + message.branchName = reader.string(); + break; + } + case 4: { + message.tagName = reader.string(); + break; + } + case 5: { + message.commitSha = reader.string(); + break; + } + case 7: { + message.dir = reader.string(); + break; + } + case 8: { + message.invertRegex = reader.bool(); + break; + } + case 9: { + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + 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.substitutions[key] = value; + break; } - message.substitutions[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -1838,6 +1901,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RepoSource + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.RepoSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RepoSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.RepoSource"; + }; + return RepoSource; })(); @@ -1955,15 +2033,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.bucket = reader.string(); - break; - case 2: - message.object = reader.string(); - break; - case 3: - message.generation = reader.int64(); - break; + case 1: { + message.bucket = reader.string(); + break; + } + case 2: { + message.object = reader.string(); + break; + } + case 3: { + message.generation = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -2084,6 +2165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StorageSourceManifest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.StorageSourceManifest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageSourceManifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.StorageSourceManifest"; + }; + return StorageSourceManifest; })(); @@ -2215,15 +2311,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.storageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); - break; - case 3: - message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); - break; - case 8: - message.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); - break; + case 2: { + message.storageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.repoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + } + case 8: { + message.storageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2363,6 +2462,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Source + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Source + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Source.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Source"; + }; + return Source; })(); @@ -2480,15 +2594,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.digest = reader.string(); - break; - case 4: - message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.digest = reader.string(); + break; + } + case 4: { + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2600,6 +2717,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuiltImage + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuiltImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuiltImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuiltImage"; + }; + return BuiltImage; })(); @@ -2848,58 +2980,72 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.env && message.env.length)) - message.env = []; - message.env.push(reader.string()); - break; - case 3: - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - case 4: - message.dir = reader.string(); - break; - case 5: - message.id = reader.string(); - break; - case 6: - if (!(message.waitFor && message.waitFor.length)) - message.waitFor = []; - message.waitFor.push(reader.string()); - break; - case 7: - message.entrypoint = reader.string(); - break; - case 8: - if (!(message.secretEnv && message.secretEnv.length)) - message.secretEnv = []; - message.secretEnv.push(reader.string()); - break; - case 9: - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); - break; - case 10: - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - case 13: - message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - case 11: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 12: - message.status = reader.int32(); - break; - case 19: - message.script = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); + break; + } + case 3: { + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); + break; + } + case 4: { + message.dir = reader.string(); + break; + } + case 5: { + message.id = reader.string(); + break; + } + case 6: { + if (!(message.waitFor && message.waitFor.length)) + message.waitFor = []; + message.waitFor.push(reader.string()); + break; + } + case 7: { + message.entrypoint = reader.string(); + break; + } + case 8: { + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + } + case 9: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + } + case 10: { + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + case 13: { + message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + case 11: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 12: { + message.status = reader.int32(); + break; + } + case 19: { + message.script = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3229,6 +3375,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildStep + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildStep"; + }; + return BuildStep; })(); @@ -3335,12 +3496,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -3439,6 +3602,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Volume + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Volume + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Volume"; + }; + return Volume; })(); @@ -3595,32 +3773,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.images && message.images.length)) - message.images = []; - message.images.push($root.google.devtools.cloudbuild.v1.BuiltImage.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.buildStepImages && message.buildStepImages.length)) - message.buildStepImages = []; - message.buildStepImages.push(reader.string()); - break; - case 4: - message.artifactManifest = reader.string(); - break; - case 5: - message.numArtifacts = reader.int64(); - break; - case 6: - if (!(message.buildStepOutputs && message.buildStepOutputs.length)) - message.buildStepOutputs = []; - message.buildStepOutputs.push(reader.bytes()); - break; - case 7: - message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); + case 2: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push($root.google.devtools.cloudbuild.v1.BuiltImage.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.buildStepImages && message.buildStepImages.length)) + message.buildStepImages = []; + message.buildStepImages.push(reader.string()); + break; + } + case 4: { + message.artifactManifest = reader.string(); + break; + } + case 5: { + message.numArtifacts = reader.int64(); + break; + } + case 6: { + if (!(message.buildStepOutputs && message.buildStepOutputs.length)) + message.buildStepOutputs = []; + message.buildStepOutputs.push(reader.bytes()); + break; + } + case 7: { + message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); break; } } @@ -3738,7 +3922,7 @@ for (var i = 0; i < object.buildStepOutputs.length; ++i) if (typeof object.buildStepOutputs[i] === "string") $util.base64.decode(object.buildStepOutputs[i], message.buildStepOutputs[i] = $util.newBuffer($util.base64.length(object.buildStepOutputs[i])), 0); - else if (object.buildStepOutputs[i].length) + else if (object.buildStepOutputs[i].length >= 0) message.buildStepOutputs[i] = object.buildStepOutputs[i]; } if (object.artifactTiming != null) { @@ -3814,6 +3998,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Results + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Results.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Results"; + }; + return Results; })(); @@ -3922,14 +4121,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - if (!(message.fileHash && message.fileHash.length)) - message.fileHash = []; - message.fileHash.push($root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32())); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -4045,6 +4246,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ArtifactResult + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArtifactResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ArtifactResult"; + }; + return ArtifactResult; })(); @@ -4464,141 +4680,170 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 45: - message.name = reader.string(); - break; - case 1: - message.id = reader.string(); - break; - case 16: - message.projectId = reader.string(); - break; - case 2: - message.status = reader.int32(); - break; - case 24: - message.statusDetail = reader.string(); - break; - case 3: - message.source = $root.google.devtools.cloudbuild.v1.Source.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.devtools.cloudbuild.v1.BuildStep.decode(reader, reader.uint32())); - break; - case 10: - message.results = $root.google.devtools.cloudbuild.v1.Results.decode(reader, reader.uint32()); - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 12: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 13: - if (!(message.images && message.images.length)) - message.images = []; - message.images.push(reader.string()); - break; - case 40: - message.queueTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 37: - message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); - break; - case 19: - message.logsBucket = reader.string(); - break; - case 21: - message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.decode(reader, reader.uint32()); - break; - case 22: - message.buildTriggerId = reader.string(); - break; - case 23: - message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.decode(reader, reader.uint32()); - break; - case 25: - message.logUrl = reader.string(); - break; - case 29: - if (message.substitutions === $util.emptyObject) - message.substitutions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 45: { + message.name = reader.string(); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 16: { + message.projectId = reader.string(); + break; + } + case 2: { + message.status = reader.int32(); + break; + } + case 24: { + message.statusDetail = reader.string(); + break; + } + case 3: { + message.source = $root.google.devtools.cloudbuild.v1.Source.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.devtools.cloudbuild.v1.BuildStep.decode(reader, reader.uint32())); + break; + } + case 10: { + message.results = $root.google.devtools.cloudbuild.v1.Results.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); + break; + } + case 40: { + message.queueTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 37: { + message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); + break; + } + case 19: { + message.logsBucket = reader.string(); + break; + } + case 21: { + message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.decode(reader, reader.uint32()); + break; + } + case 22: { + message.buildTriggerId = reader.string(); + break; + } + case 23: { + message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.decode(reader, reader.uint32()); + break; + } + case 25: { + message.logUrl = reader.string(); + break; + } + case 29: { + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + 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.substitutions[key] = value; + break; } - message.substitutions[key] = value; - break; - case 31: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 32: - if (!(message.secrets && message.secrets.length)) - message.secrets = []; - message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); - break; - case 33: - if (message.timing === $util.emptyObject) - message.timing = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 31: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 32: { + if (!(message.secrets && message.secrets.length)) + message.secrets = []; + message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); + break; + } + case 33: { + if (message.timing === $util.emptyObject) + message.timing = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.timing[key] = value; + break; + } + case 44: { + message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.decode(reader, reader.uint32()); + break; + } + case 42: { + message.serviceAccount = reader.string(); + break; + } + case 47: { + message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); + break; + } + case 49: { + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); + break; + } + case 51: { + message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.decode(reader, reader.uint32()); + break; } - message.timing[key] = value; - break; - case 44: - message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.decode(reader, reader.uint32()); - break; - case 42: - message.serviceAccount = reader.string(); - break; - case 47: - message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); - break; - case 49: - if (!(message.warnings && message.warnings.length)) - message.warnings = []; - message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); - break; - case 51: - message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -5142,6 +5387,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Build + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Build.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build"; + }; + Build.Warning = (function() { /** @@ -5245,12 +5505,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.text = reader.string(); - break; - case 2: - message.priority = reader.int32(); - break; + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.priority = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5372,6 +5634,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Warning + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Warning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.Warning"; + }; + /** * Priority enum. * @name google.devtools.cloudbuild.v1.Build.Warning.Priority @@ -5496,12 +5773,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.detail = reader.string(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.detail = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5638,6 +5917,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FailureInfo + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FailureInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.FailureInfo"; + }; + /** * FailureType enum. * @name google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType @@ -5803,14 +6097,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.images && message.images.length)) - message.images = []; - message.images.push(reader.string()); - break; - case 2: - message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); + break; + } + case 2: { + message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -5926,6 +6222,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Artifacts + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Artifacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts"; + }; + Artifacts.ArtifactObjects = (function() { /** @@ -6042,17 +6353,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.location = reader.string(); - break; - case 2: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - case 3: - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; + case 1: { + message.location = reader.string(); + break; + } + case 2: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6177,6 +6491,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ArtifactObjects + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArtifactObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects"; + }; + return ArtifactObjects; })(); @@ -6286,12 +6615,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6400,6 +6731,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TimeSpan + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.TimeSpan + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSpan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.TimeSpan"; + }; + return TimeSpan; })(); @@ -6495,9 +6841,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); - break; + case 1: { + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6592,6 +6939,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildOperationMetadata + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildOperationMetadata"; + }; + return BuildOperationMetadata; })(); @@ -6724,37 +7086,41 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); - break; - case 6: - message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); - break; - case 9: - message.resolvedStorageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); - break; - case 4: - if (message.fileHashes === $util.emptyObject) - message.fileHashes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; + case 3: { + message.resolvedStorageSource = $root.google.devtools.cloudbuild.v1.StorageSource.decode(reader, reader.uint32()); + break; + } + case 6: { + message.resolvedRepoSource = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + } + case 9: { + message.resolvedStorageSourceManifest = $root.google.devtools.cloudbuild.v1.StorageSourceManifest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.fileHashes === $util.emptyObject) + message.fileHashes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.fileHashes[key] = value; + break; } - message.fileHashes[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -6904,7 +7270,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return SourceProvenance; + /** + * Gets the default type url for SourceProvenance + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.SourceProvenance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceProvenance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.SourceProvenance"; + }; + + return SourceProvenance; })(); v1.FileHashes = (function() { @@ -7001,11 +7382,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.fileHash && message.fileHash.length)) - message.fileHash = []; - message.fileHash.push($root.google.devtools.cloudbuild.v1.Hash.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.google.devtools.cloudbuild.v1.Hash.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7112,6 +7494,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileHashes + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.FileHashes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileHashes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.FileHashes"; + }; + return FileHashes; })(); @@ -7218,12 +7615,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -7303,7 +7702,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -7349,6 +7748,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Hash + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Hash + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Hash.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Hash"; + }; + /** * HashType enum. * @name google.devtools.cloudbuild.v1.Hash.HashType @@ -7475,16 +7889,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.secretManager && message.secretManager.length)) - message.secretManager = []; - message.secretManager.push($root.google.devtools.cloudbuild.v1.SecretManagerSecret.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.inline && message.inline.length)) - message.inline = []; - message.inline.push($root.google.devtools.cloudbuild.v1.InlineSecret.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.secretManager && message.secretManager.length)) + message.secretManager = []; + message.secretManager.push($root.google.devtools.cloudbuild.v1.SecretManagerSecret.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.inline && message.inline.length)) + message.inline = []; + message.inline.push($root.google.devtools.cloudbuild.v1.InlineSecret.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7617,6 +8033,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Secrets + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Secrets + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Secrets.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Secrets"; + }; + return Secrets; })(); @@ -7725,31 +8156,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kmsKeyName = reader.string(); - break; - case 2: - if (message.envMap === $util.emptyObject) - message.envMap = {}; - 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.bytes(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.kmsKeyName = reader.string(); + break; + } + case 2: { + if (message.envMap === $util.emptyObject) + message.envMap = {}; + 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.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.envMap[key] = value; + break; } - message.envMap[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -7820,7 +8253,7 @@ for (var keys = Object.keys(object.envMap), i = 0; i < keys.length; ++i) if (typeof object.envMap[keys[i]] === "string") $util.base64.decode(object.envMap[keys[i]], message.envMap[keys[i]] = $util.newBuffer($util.base64.length(object.envMap[keys[i]])), 0); - else if (object.envMap[keys[i]].length) + else if (object.envMap[keys[i]].length >= 0) message.envMap[keys[i]] = object.envMap[keys[i]]; } return message; @@ -7865,6 +8298,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for InlineSecret + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.InlineSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InlineSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.InlineSecret"; + }; + return InlineSecret; })(); @@ -7971,12 +8419,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.versionName = reader.string(); - break; - case 2: - message.env = reader.string(); - break; + case 1: { + message.versionName = reader.string(); + break; + } + case 2: { + message.env = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8075,6 +8525,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SecretManagerSecret + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.SecretManagerSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.SecretManagerSecret"; + }; + return SecretManagerSecret; })(); @@ -8183,31 +8648,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kmsKeyName = reader.string(); - break; - case 3: - if (message.secretEnv === $util.emptyObject) - message.secretEnv = {}; - 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.bytes(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.kmsKeyName = reader.string(); + break; + } + case 3: { + if (message.secretEnv === $util.emptyObject) + message.secretEnv = {}; + 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.bytes(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.secretEnv[key] = value; + break; } - message.secretEnv[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -8278,7 +8745,7 @@ for (var keys = Object.keys(object.secretEnv), i = 0; i < keys.length; ++i) if (typeof object.secretEnv[keys[i]] === "string") $util.base64.decode(object.secretEnv[keys[i]], message.secretEnv[keys[i]] = $util.newBuffer($util.base64.length(object.secretEnv[keys[i]])), 0); - else if (object.secretEnv[keys[i]].length) + else if (object.secretEnv[keys[i]].length >= 0) message.secretEnv[keys[i]] = object.secretEnv[keys[i]]; } return message; @@ -8323,6 +8790,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Secret + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Secret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Secret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Secret"; + }; + return Secret; })(); @@ -8440,15 +8922,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.parent = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); - break; + case 4: { + message.parent = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8560,6 +9045,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateBuildRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.CreateBuildRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBuildRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.CreateBuildRequest"; + }; + return CreateBuildRequest; })(); @@ -8677,15 +9177,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8792,6 +9295,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetBuildRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.GetBuildRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBuildRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.GetBuildRequest"; + }; + return GetBuildRequest; })(); @@ -8931,21 +9449,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 9: - message.parent = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; - case 8: - message.filter = reader.string(); - break; + case 9: { + message.parent = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 8: { + message.filter = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9068,6 +9591,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListBuildsRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListBuildsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBuildsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListBuildsRequest"; + }; + return ListBuildsRequest; })(); @@ -9176,14 +9714,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.builds && message.builds.length)) - message.builds = []; - message.builds.push($root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.builds && message.builds.length)) + message.builds = []; + message.builds.push($root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9299,6 +9839,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListBuildsResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListBuildsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBuildsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListBuildsResponse"; + }; + return ListBuildsResponse; })(); @@ -9416,15 +9971,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.id = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.id = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9531,6 +10089,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelBuildRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.CancelBuildRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelBuildRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.CancelBuildRequest"; + }; + return CancelBuildRequest; })(); @@ -9637,12 +10210,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.approvalResult = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.approvalResult = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -9746,6 +10321,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApproveBuildRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ApproveBuildRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveBuildRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ApproveBuildRequest"; + }; + return ApproveBuildRequest; })(); @@ -9863,15 +10453,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.state = reader.int32(); - break; - case 2: - message.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.decode(reader, reader.uint32()); - break; - case 3: - message.result = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); - break; + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.result = $root.google.devtools.cloudbuild.v1.ApprovalResult.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10016,6 +10609,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildApproval + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildApproval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildApproval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildApproval"; + }; + /** * State enum. * @name google.devtools.cloudbuild.v1.BuildApproval.State @@ -10131,9 +10739,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.approvalRequired = reader.bool(); - break; + case 1: { + message.approvalRequired = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10223,6 +10832,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApprovalConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ApprovalConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApprovalConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ApprovalConfig"; + }; + return ApprovalConfig; })(); @@ -10362,21 +10986,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.approverAccount = reader.string(); - break; - case 3: - message.approvalTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.decision = reader.int32(); - break; - case 5: - message.comment = reader.string(); - break; - case 6: - message.url = reader.string(); - break; + case 2: { + message.approverAccount = reader.string(); + break; + } + case 3: { + message.approvalTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.decision = reader.int32(); + break; + } + case 5: { + message.comment = reader.string(); + break; + } + case 6: { + message.url = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -10522,6 +11151,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ApprovalResult + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ApprovalResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApprovalResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ApprovalResult"; + }; + /** * Decision enum. * @name google.devtools.cloudbuild.v1.ApprovalResult.Decision @@ -10853,88 +11497,107 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 34: - message.resourceName = reader.string(); - break; - case 1: - message.id = reader.string(); - break; - case 10: - message.description = reader.string(); - break; - case 21: - message.name = reader.string(); - break; - case 19: - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - case 7: - message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); - break; - case 13: - message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); - break; - case 29: - message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.decode(reader, reader.uint32()); - break; - case 31: - message.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.decode(reader, reader.uint32()); - break; - case 18: - message.autodetect = reader.bool(); - break; - case 4: - message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); - break; - case 8: - message.filename = reader.string(); - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.disabled = reader.bool(); - break; - case 11: - if (message.substitutions === $util.emptyObject) - message.substitutions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 34: { + message.resourceName = reader.string(); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 10: { + message.description = reader.string(); + break; + } + case 21: { + message.name = reader.string(); + break; + } + case 19: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 7: { + message.triggerTemplate = $root.google.devtools.cloudbuild.v1.RepoSource.decode(reader, reader.uint32()); + break; + } + case 13: { + message.github = $root.google.devtools.cloudbuild.v1.GitHubEventsConfig.decode(reader, reader.uint32()); + break; + } + case 29: { + message.pubsubConfig = $root.google.devtools.cloudbuild.v1.PubsubConfig.decode(reader, reader.uint32()); + break; + } + case 31: { + message.webhookConfig = $root.google.devtools.cloudbuild.v1.WebhookConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.autodetect = reader.bool(); + break; + } + case 4: { + message.build = $root.google.devtools.cloudbuild.v1.Build.decode(reader, reader.uint32()); + break; + } + case 8: { + message.filename = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.disabled = reader.bool(); + break; + } + case 11: { + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + 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.substitutions[key] = value; + break; + } + case 15: { + if (!(message.ignoredFiles && message.ignoredFiles.length)) + message.ignoredFiles = []; + message.ignoredFiles.push(reader.string()); + break; + } + case 16: { + if (!(message.includedFiles && message.includedFiles.length)) + message.includedFiles = []; + message.includedFiles.push(reader.string()); + break; + } + case 30: { + message.filter = reader.string(); + break; + } + case 33: { + message.serviceAccount = reader.string(); + break; } - message.substitutions[key] = value; - break; - case 15: - if (!(message.ignoredFiles && message.ignoredFiles.length)) - message.ignoredFiles = []; - message.ignoredFiles.push(reader.string()); - break; - case 16: - if (!(message.includedFiles && message.includedFiles.length)) - message.includedFiles = []; - message.includedFiles.push(reader.string()); - break; - case 30: - message.filter = reader.string(); - break; - case 33: - message.serviceAccount = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -11270,6 +11933,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildTrigger + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildTrigger"; + }; + return BuildTrigger; })(); @@ -11423,21 +12101,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.installationId = reader.int64(); - break; - case 6: - message.owner = reader.string(); - break; - case 7: - message.name = reader.string(); - break; - case 4: - message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.decode(reader, reader.uint32()); - break; - case 5: - message.push = $root.google.devtools.cloudbuild.v1.PushFilter.decode(reader, reader.uint32()); - break; + case 1: { + message.installationId = reader.int64(); + break; + } + case 6: { + message.owner = reader.string(); + break; + } + case 7: { + message.name = reader.string(); + break; + } + case 4: { + message.pullRequest = $root.google.devtools.cloudbuild.v1.PullRequestFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.push = $root.google.devtools.cloudbuild.v1.PushFilter.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -11597,6 +12280,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GitHubEventsConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.GitHubEventsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GitHubEventsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.GitHubEventsConfig"; + }; + return GitHubEventsConfig; })(); @@ -11725,18 +12423,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subscription = reader.string(); - break; - case 2: - message.topic = reader.string(); - break; - case 3: - message.serviceAccountEmail = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; + case 1: { + message.subscription = reader.string(); + break; + } + case 2: { + message.topic = reader.string(); + break; + } + case 3: { + message.serviceAccountEmail = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -11879,6 +12581,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PubsubConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PubsubConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubsubConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PubsubConfig"; + }; + /** * State enum. * @name google.devtools.cloudbuild.v1.PubsubConfig.State @@ -12019,12 +12736,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.secret = reader.string(); - break; - case 4: - message.state = reader.int32(); - break; + case 3: { + message.secret = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12145,6 +12864,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WebhookConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.WebhookConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebhookConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.WebhookConfig"; + }; + /** * State enum. * @name google.devtools.cloudbuild.v1.WebhookConfig.State @@ -12292,15 +13026,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.branch = reader.string(); - break; - case 5: - message.commentControl = reader.int32(); - break; - case 6: - message.invertRegex = reader.bool(); - break; + case 2: { + message.branch = reader.string(); + break; + } + case 5: { + message.commentControl = reader.int32(); + break; + } + case 6: { + message.invertRegex = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -12430,6 +13167,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PullRequestFilter + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PullRequestFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PullRequestFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PullRequestFilter"; + }; + /** * CommentControl enum. * @name google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl @@ -12577,15 +13329,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.branch = reader.string(); - break; - case 3: - message.tag = reader.string(); - break; - case 4: - message.invertRegex = reader.bool(); - break; + case 2: { + message.branch = reader.string(); + break; + } + case 3: { + message.tag = reader.string(); + break; + } + case 4: { + message.invertRegex = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -12702,6 +13457,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PushFilter + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PushFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PushFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PushFilter"; + }; + return PushFilter; })(); @@ -12819,15 +13589,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.parent = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); - break; + case 3: { + message.parent = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12939,6 +13712,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateBuildTriggerRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.CreateBuildTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateBuildTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.CreateBuildTriggerRequest"; + }; + return CreateBuildTriggerRequest; })(); @@ -13056,15 +13844,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.triggerId = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.triggerId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13171,6 +13962,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetBuildTriggerRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.GetBuildTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetBuildTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.GetBuildTriggerRequest"; + }; + return GetBuildTriggerRequest; })(); @@ -13299,18 +14105,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.parent = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.parent = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13425,8 +14235,23 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListBuildTriggersRequest; - })(); + /** + * Gets the default type url for ListBuildTriggersRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBuildTriggersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListBuildTriggersRequest"; + }; + + return ListBuildTriggersRequest; + })(); v1.ListBuildTriggersResponse = (function() { @@ -13533,14 +14358,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.triggers && message.triggers.length)) - message.triggers = []; - message.triggers.push($root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13656,6 +14483,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListBuildTriggersResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListBuildTriggersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBuildTriggersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListBuildTriggersResponse"; + }; + return ListBuildTriggersResponse; })(); @@ -13773,15 +14615,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: - message.name = reader.string(); - break; - case 1: - message.projectId = reader.string(); - break; - case 2: - message.triggerId = reader.string(); - break; + case 3: { + message.name = reader.string(); + break; + } + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.triggerId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13888,6 +14733,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteBuildTriggerRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteBuildTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest"; + }; + return DeleteBuildTriggerRequest; })(); @@ -14005,15 +14865,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.projectId = reader.string(); - break; - case 2: - message.triggerId = reader.string(); - break; - case 3: - message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); - break; + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.triggerId = reader.string(); + break; + } + case 3: { + message.trigger = $root.google.devtools.cloudbuild.v1.BuildTrigger.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14125,6 +14988,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateBuildTriggerRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateBuildTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest"; + }; + return UpdateBuildTriggerRequest; })(); @@ -14363,58 +15241,71 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.sourceProvenanceHash && message.sourceProvenanceHash.length)) - message.sourceProvenanceHash = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.sourceProvenanceHash && message.sourceProvenanceHash.length)) + message.sourceProvenanceHash = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.sourceProvenanceHash.push(reader.int32()); + } else message.sourceProvenanceHash.push(reader.int32()); - } else - message.sourceProvenanceHash.push(reader.int32()); - break; - case 2: - message.requestedVerifyOption = reader.int32(); - break; - case 3: - message.machineType = reader.int32(); - break; - case 6: - message.diskSizeGb = reader.int64(); - break; - case 4: - message.substitutionOption = reader.int32(); - break; - case 17: - message.dynamicSubstitutions = reader.bool(); - break; - case 5: - message.logStreamingOption = reader.int32(); - break; - case 7: - message.workerPool = reader.string(); - break; - case 19: - message.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.decode(reader, reader.uint32()); - break; - case 11: - message.logging = reader.int32(); - break; - case 12: - if (!(message.env && message.env.length)) - message.env = []; - message.env.push(reader.string()); - break; - case 13: - if (!(message.secretEnv && message.secretEnv.length)) - message.secretEnv = []; - message.secretEnv.push(reader.string()); - break; - case 14: - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); - break; + break; + } + case 2: { + message.requestedVerifyOption = reader.int32(); + break; + } + case 3: { + message.machineType = reader.int32(); + break; + } + case 6: { + message.diskSizeGb = reader.int64(); + break; + } + case 4: { + message.substitutionOption = reader.int32(); + break; + } + case 17: { + message.dynamicSubstitutions = reader.bool(); + break; + } + case 5: { + message.logStreamingOption = reader.int32(); + break; + } + case 7: { + message.workerPool = reader.string(); + break; + } + case 19: { + message.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.decode(reader, reader.uint32()); + break; + } + case 11: { + message.logging = reader.int32(); + break; + } + case 12: { + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); + break; + } + case 13: { + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + } + case 14: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -14800,6 +15691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BuildOptions + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BuildOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildOptions"; + }; + BuildOptions.PoolOption = (function() { /** @@ -14892,9 +15798,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14984,6 +15891,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PoolOption + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.BuildOptions.PoolOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PoolOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildOptions.PoolOption"; + }; + return PoolOption; })(); @@ -15212,21 +16134,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 5: - message.name = reader.string(); - break; - case 1: - message.body = $root.google.api.HttpBody.decode(reader, reader.uint32()); - break; - case 2: - message.projectId = reader.string(); - break; - case 3: - message.trigger = reader.string(); - break; - case 4: - message.secret = reader.string(); - break; + case 5: { + message.name = reader.string(); + break; + } + case 1: { + message.body = $root.google.api.HttpBody.decode(reader, reader.uint32()); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + case 3: { + message.trigger = reader.string(); + break; + } + case 4: { + message.secret = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15354,6 +16281,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReceiveTriggerWebhookRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveTriggerWebhookRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest"; + }; + return ReceiveTriggerWebhookRequest; })(); @@ -15514,6 +16456,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReceiveTriggerWebhookResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReceiveTriggerWebhookResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse"; + }; + return ReceiveTriggerWebhookResponse; })(); @@ -15724,55 +16681,65 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.displayName = reader.string(); - break; - case 3: - message.uid = reader.string(); - break; - case 4: - if (message.annotations === $util.emptyObject) - message.annotations = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.uid = reader.string(); + break; + } + case 4: { + if (message.annotations === $util.emptyObject) + message.annotations = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.annotations[key] = value; + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 12: { + message.privatePoolV1Config = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; } - message.annotations[key] = value; - break; - case 5: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.state = reader.int32(); - break; - case 12: - message.privatePoolV1Config = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.decode(reader, reader.uint32()); - break; - case 11: - message.etag = reader.string(); - break; default: reader.skipType(tag & 7); break; @@ -16004,6 +16971,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkerPool + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.WorkerPool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkerPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.WorkerPool"; + }; + /** * State enum. * @name google.devtools.cloudbuild.v1.WorkerPool.State @@ -16130,12 +17112,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.decode(reader, reader.uint32()); - break; - case 2: - message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.decode(reader, reader.uint32()); - break; + case 1: { + message.workerConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.networkConfig = $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16244,6 +17228,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PrivatePoolV1Config + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivatePoolV1Config.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PrivatePoolV1Config"; + }; + PrivatePoolV1Config.WorkerConfig = (function() { /** @@ -16347,12 +17346,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.machineType = reader.string(); - break; - case 2: - message.diskSizeGb = reader.int64(); - break; + case 1: { + message.machineType = reader.string(); + break; + } + case 2: { + message.diskSizeGb = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -16465,6 +17466,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WorkerConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PrivatePoolV1Config.WorkerConfig"; + }; + return WorkerConfig; })(); @@ -16571,12 +17587,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.peeredNetwork = reader.string(); - break; - case 2: - message.egressOption = reader.int32(); - break; + case 1: { + message.peeredNetwork = reader.string(); + break; + } + case 2: { + message.egressOption = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16693,6 +17711,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NetworkConfig + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig"; + }; + /** * EgressOption enum. * @name google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption @@ -16840,18 +17873,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); - break; - case 3: - message.workerPoolId = reader.string(); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + break; + } + case 3: { + message.workerPoolId = reader.string(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -16971,6 +18008,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkerPoolRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkerPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.CreateWorkerPoolRequest"; + }; + return CreateWorkerPoolRequest; })(); @@ -17066,9 +18118,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17158,6 +18211,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetWorkerPoolRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.GetWorkerPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetWorkerPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.GetWorkerPoolRequest"; + }; + return GetWorkerPoolRequest; })(); @@ -17286,18 +18354,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.etag = reader.string(); - break; - case 3: - message.allowMissing = reader.bool(); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.allowMissing = reader.bool(); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17412,6 +18484,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkerPoolRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkerPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest"; + }; + return DeleteWorkerPoolRequest; })(); @@ -17529,15 +18616,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 4: - message.validateOnly = reader.bool(); - break; + case 1: { + message.workerPool = $root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 4: { + message.validateOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -17654,6 +18744,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateWorkerPoolRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateWorkerPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest"; + }; + return UpdateWorkerPoolRequest; })(); @@ -17771,15 +18876,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17886,6 +18994,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkerPoolsRequest + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkerPoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListWorkerPoolsRequest"; + }; + return ListWorkerPoolsRequest; })(); @@ -17994,14 +19117,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.workerPools && message.workerPools.length)) - message.workerPools = []; - message.workerPools.push($root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.workerPools && message.workerPools.length)) + message.workerPools = []; + message.workerPools.push($root.google.devtools.cloudbuild.v1.WorkerPool.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -18117,6 +19242,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListWorkerPoolsResponse + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ListWorkerPoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkerPoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ListWorkerPoolsResponse"; + }; + return ListWorkerPoolsResponse; })(); @@ -18234,15 +19374,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerPool = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.workerPool = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18359,6 +19502,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateWorkerPoolOperationMetadata + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateWorkerPoolOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata"; + }; + return CreateWorkerPoolOperationMetadata; })(); @@ -18476,15 +19634,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerPool = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.workerPool = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18601,6 +19762,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateWorkerPoolOperationMetadata + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateWorkerPoolOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata"; + }; + return UpdateWorkerPoolOperationMetadata; })(); @@ -18718,15 +19894,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.workerPool = reader.string(); - break; - case 2: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.workerPool = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.completeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18843,6 +20022,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteWorkerPoolOperationMetadata + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteWorkerPoolOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata"; + }; + return DeleteWorkerPoolOperationMetadata; })(); @@ -18969,14 +20163,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fullyDecodeReservedExpansion = reader.bool(); - break; + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -19092,6 +20288,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + return Http; })(); @@ -19302,38 +20513,48 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.responseBody = reader.string(); - break; - case 11: - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -19555,6 +20776,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + return HttpRule; })(); @@ -19661,12 +20897,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19765,6 +21003,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + return CustomHttpPattern; })(); @@ -19910,17 +21163,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.contentType = reader.string(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - if (!(message.extensions && message.extensions.length)) - message.extensions = []; - message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.contentType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + case 3: { + if (!(message.extensions && message.extensions.length)) + message.extensions = []; + message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -19991,7 +21247,7 @@ if (object.data != null) if (typeof object.data === "string") $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) + else if (object.data.length >= 0) message.data = object.data; if (object.extensions) { if (!Array.isArray(object.extensions)) @@ -20054,6 +21310,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for HttpBody + * @function getTypeUrl + * @memberof google.api.HttpBody + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpBody"; + }; + return HttpBody; })(); @@ -20222,36 +21493,43 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - case 3: - message.nameField = reader.string(); - break; - case 4: - message.history = reader.int32(); - break; - case 5: - message.plural = reader.string(); - break; - case 6: - message.singular = reader.string(); - break; - case 10: - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -20449,6 +21727,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + /** * History enum. * @name google.api.ResourceDescriptor.History @@ -20585,12 +21878,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20689,6 +21984,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + return ResourceReference; })(); @@ -20798,11 +22108,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -20909,6 +22220,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + return FileDescriptorSet; })(); @@ -20930,6 +22256,7 @@ * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** @@ -21050,6 +22377,14 @@ */ FileDescriptorProto.prototype.syntax = ""; + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + /** * Creates a new FileDescriptorProto instance using the specified properties. * @function create @@ -21105,6 +22440,8 @@ writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); return writer; }; @@ -21139,66 +22476,82 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -21310,6 +22663,9 @@ if (message.syntax != null && message.hasOwnProperty("syntax")) if (!$util.isString(message.syntax)) return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + if (!$util.isString(message.edition)) + return "edition: string expected"; return null; }; @@ -21402,6 +22758,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -21433,6 +22791,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -21479,6 +22838,8 @@ } if (message.syntax != null && message.hasOwnProperty("syntax")) object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; @@ -21493,6 +22854,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + return FileDescriptorProto; })(); @@ -21703,52 +23079,62 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22049,6 +23435,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + DescriptorProto.ExtensionRange = (function() { /** @@ -22163,15 +23564,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22283,6 +23687,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + return ExtensionRange; })(); @@ -22389,12 +23808,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -22493,6 +23914,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + return ReservedRange; })(); @@ -22593,11 +24029,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22704,6 +24141,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + return ExtensionRangeOptions; })(); @@ -22909,39 +24361,50 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - case 17: - message.proto3Optional = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23228,6 +24691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + /** * Type enum. * @name google.protobuf.FieldDescriptorProto.Type @@ -23396,12 +24874,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23505,6 +24985,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + return OneofDescriptorProto; })(); @@ -23650,27 +25145,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -23846,6 +25346,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + EnumDescriptorProto.EnumReservedRange = (function() { /** @@ -23949,12 +25464,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24053,6 +25570,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + return EnumReservedRange; })(); @@ -24173,15 +25705,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24293,6 +25828,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + return EnumValueDescriptorProto; })(); @@ -24412,17 +25962,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -24552,6 +26105,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + return ServiceDescriptorProto; })(); @@ -24702,24 +26270,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -24855,6 +26429,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + return MethodDescriptorProto; })(); @@ -25185,76 +26774,98 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 42: - message.phpGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 39: - message.swiftPrefix = reader.string(); - break; - case 40: - message.phpClassPrefix = reader.string(); - break; - case 41: - message.phpNamespace = reader.string(); - break; - case 44: - message.phpMetadataNamespace = reader.string(); - break; - case 45: - message.rubyPackage = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -25567,6 +27178,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + /** * OptimizeMode enum. * @name google.protobuf.FileOptions.OptimizeMode @@ -25735,26 +27361,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1053: - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25908,6 +27540,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + return MessageOptions; })(); @@ -25921,6 +27568,7 @@ * @property {boolean|null} [packed] FieldOptions packed * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy * @property {boolean|null} [deprecated] FieldOptions deprecated * @property {boolean|null} [weak] FieldOptions weak * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption @@ -25977,6 +27625,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -26053,6 +27709,8 @@ writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); if (message.uninterpretedOption != null && message.uninterpretedOption.length) for (var i = 0; i < message.uninterpretedOption.length; ++i) $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); @@ -26086,54 +27744,67 @@ * @memberof google.protobuf.FieldOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1052: - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + * @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()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - case 1055: - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26193,6 +27864,9 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) if (typeof message.lazy !== "boolean") return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; if (message.deprecated != null && message.hasOwnProperty("deprecated")) if (typeof message.deprecated !== "boolean") return "deprecated: boolean expected"; @@ -26278,6 +27952,8 @@ } if (object.lazy != null) message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); if (object.weak != null) @@ -26365,6 +28041,7 @@ object.lazy = false; object.jstype = options.enums === String ? "JS_NORMAL" : 0; object.weak = false; + object.unverifiedLazy = false; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -26379,6 +28056,8 @@ object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -26405,6 +28084,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + /** * CType enum. * @name google.protobuf.FieldOptions.CType @@ -26534,11 +28228,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -26645,6 +28340,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + return OneofOptions; })(); @@ -26764,17 +28474,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -26899,6 +28612,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + return EnumOptions; })(); @@ -27007,14 +28735,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -27130,6 +28860,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + return EnumValueOptions; })(); @@ -27260,20 +29005,24 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 1049: - message[".google.api.defaultHost"] = reader.string(); - break; - case 1050: - message[".google.api.oauthScopes"] = reader.string(); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -27406,6 +29155,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + return ServiceOptions; })(); @@ -27560,28 +29324,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 34: - message.idempotencyLevel = reader.int32(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - case 1051: - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - case 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - break; + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27771,6 +29541,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + /** * IdempotencyLevel enum. * @name google.protobuf.MethodOptions.IdempotencyLevel @@ -27950,29 +29735,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28085,7 +29877,7 @@ if (object.stringValue != null) if (typeof object.stringValue === "string") $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) + else if (object.stringValue.length >= 0) message.stringValue = object.stringValue; if (object.aggregateValue != null) message.aggregateValue = String(object.aggregateValue); @@ -28166,6 +29958,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + UninterpretedOption.NamePart = (function() { /** @@ -28267,12 +30074,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -28373,6 +30182,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + return NamePart; })(); @@ -28473,11 +30297,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -28584,6 +30409,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + SourceCodeInfo.Location = (function() { /** @@ -28732,37 +30572,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -28923,6 +30768,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + return Location; })(); @@ -29023,11 +30883,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -29134,6 +30995,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + GeneratedCodeInfo.Annotation = (function() { /** @@ -29144,6 +31020,7 @@ * @property {string|null} [sourceFile] Annotation sourceFile * @property {number|null} [begin] Annotation begin * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic */ /** @@ -29194,6 +31071,14 @@ */ Annotation.prototype.end = 0; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + /** * Creates a new Annotation instance using the specified properties. * @function create @@ -29230,6 +31115,8 @@ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); if (message.end != null && Object.hasOwnProperty.call(message, "end")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); return writer; }; @@ -29264,25 +31151,33 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -29334,6 +31229,15 @@ if (message.end != null && message.hasOwnProperty("end")) if (!$util.isInteger(message.end)) return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -29362,6 +31266,20 @@ message.begin = object.begin | 0; if (object.end != null) message.end = object.end | 0; + switch (object.semantic) { + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } return message; }; @@ -29384,6 +31302,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -29396,6 +31315,8 @@ object.begin = message.begin; if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; @@ -29410,6 +31331,37 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + return Annotation; })(); @@ -29519,12 +31471,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type_url = reader.string(); - break; - case 2: - message.value = reader.bytes(); - break; + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -29586,7 +31540,7 @@ if (object.value != null) if (typeof object.value === "string") $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) + else if (object.value.length >= 0) message.value = object.value; return message; }; @@ -29632,6 +31586,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + return Any; })(); @@ -29738,12 +31707,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -29856,6 +31827,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -30016,6 +32002,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + return Empty; })(); @@ -30113,11 +32114,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -30219,6 +32221,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -30325,12 +32342,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); - break; + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -30443,6 +32462,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -30491,7 +32525,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -30524,7 +32558,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -30557,7 +32591,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -30590,7 +32624,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -30623,7 +32657,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -30808,21 +32842,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -30973,6 +33012,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -31068,9 +33122,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31160,6 +33215,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -31288,18 +33358,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31414,6 +33488,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -31522,14 +33611,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31645,6 +33736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -31740,9 +33846,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31832,6 +33939,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -31927,9 +34049,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32019,6 +34142,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -32125,12 +34263,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -32234,6 +34374,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -32340,12 +34495,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32444,6 +34601,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -32575,17 +34747,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.code = reader.int32(); - break; - case 2: - message.message = reader.string(); - break; - case 3: - if (!(message.details && message.details.length)) - message.details = []; - message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -32710,6 +34885,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + return Status; })(); diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 3066f2aec4af..4408124f3841 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -2623,6 +2623,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -3151,6 +3155,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -3443,6 +3454,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From c60d9ce0d3d13a9454e1c85ce7e5c8a8fb50d0ac Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 04:56:20 +0000 Subject: [PATCH 212/223] fix: do not import the whole google-gax from proto JS (#1553) (#342) fix: use google-gax v3.3.0 Source-Link: https://github.com/googleapis/synthtool/commit/c73d112a11a1f1a93efa67c50495c19aa3a88910 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e --- packages/google-devtools-cloudbuild/package.json | 2 +- packages/google-devtools-cloudbuild/protos/protos.d.ts | 2 +- packages/google-devtools-cloudbuild/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 28be799e37bb..f9dcca7a1faf 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -61,6 +61,6 @@ "node": ">=12.0.0" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" } } diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 2b6cd22fd23f..45299ec94218 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -13,7 +13,7 @@ // limitations under the License. import Long = require("long"); -import {protobuf as $protobuf} from "google-gax"; +import type {protobuf as $protobuf} from "google-gax"; /** Namespace google. */ export namespace google { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 99f54fa2dce2..b4d068b8a2c6 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -19,7 +19,7 @@ define(["protobufjs/minimal"], factory); /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax").protobufMinimal); + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); })(this, function($protobuf) { "use strict"; From 2d693a31c122cb1d8ea9852aa5dbac3730b782e9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:46:17 +0000 Subject: [PATCH 213/223] fix: allow passing gax instance to client constructor (#343) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 470911839 Source-Link: https://github.com/googleapis/googleapis/commit/352756699ebc5b2144c252867c265ea44448712e Source-Link: https://github.com/googleapis/googleapis-gen/commit/f16a1d224f00a630ea43d6a9a1a31f566f45cdea Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9 feat: accept google-gax instance as a parameter Please see the documentation of the client constructor for details. PiperOrigin-RevId: 470332808 Source-Link: https://github.com/googleapis/googleapis/commit/d4a23675457cd8f0b44080e0594ec72de1291b89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e97a1ac204ead4fe7341f91e72db7c6ac6016341 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9 --- .../src/v1/cloud_build_client.ts | 140 ++++++++++-------- 1 file changed, 80 insertions(+), 60 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index b01412e9eef0..53c78fe62256 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -17,8 +17,8 @@ // ** All changes to this file may be overwritten. ** /* global window */ -import * as gax from 'google-gax'; -import { +import type * as gax from 'google-gax'; +import type { Callback, CallOptions, Descriptors, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,6 @@ import jsonProtos = require('../../protos/protos.json'); * This file defines retry strategy and timeouts for all API methods in this library. */ import * as gapicConfig from './cloud_build_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -106,8 +104,18 @@ export class CloudBuildClient { * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. * For more information, please check the * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - */ - constructor(opts?: ClientOptions) { + * @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 CloudBuildClient({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 CloudBuildClient; const servicePath = @@ -127,8 +135,13 @@ export class CloudBuildClient { opts['scopes'] = staticMembers.scopes; } + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gax.fallback : gax; + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. this._gaxGrpc = new this._gaxModule.GrpcClient(opts); @@ -360,7 +373,7 @@ export class CloudBuildClient { this.innerApiCalls = {}; // Add a warn function to the client constructor so it can be easily tested. - this.warn = gax.warn; + this.warn = this._gaxModule.warn; } /** @@ -587,7 +600,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', id: request.id || '', name: request.name || '', @@ -685,7 +698,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', id: request.id || '', name: request.name || '', @@ -791,7 +804,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -890,7 +903,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', trigger_id: request.triggerId || '', name: request.name || '', @@ -996,7 +1009,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', trigger_id: request.triggerId || '', name: request.name || '', @@ -1101,7 +1114,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', trigger_id: request.triggerId || '', 'trigger.resource_name': request.trigger!.resourceName || '', @@ -1210,7 +1223,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', trigger: request.trigger || '', name: request.name || '', @@ -1304,7 +1317,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1417,7 +1430,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -1444,11 +1457,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createBuild, this._gaxModule.createDefaultBackoffSettings() @@ -1586,7 +1600,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', id: request.id || '', name: request.name || '', @@ -1614,11 +1628,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.retryBuild, this._gaxModule.createDefaultBackoffSettings() @@ -1733,7 +1748,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -1759,11 +1774,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.approveBuild, this._gaxModule.createDefaultBackoffSettings() @@ -1877,7 +1893,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', trigger_id: request.triggerId || '', name: request.name || '', @@ -1905,11 +1921,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.BuildOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.runBuildTrigger, this._gaxModule.createDefaultBackoffSettings() @@ -2028,7 +2045,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2054,11 +2071,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.CreateWorkerPoolOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createWorkerPool, this._gaxModule.createDefaultBackoffSettings() @@ -2176,7 +2194,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ name: request.name || '', }); this.initialize(); @@ -2202,11 +2220,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteWorkerPool, this._gaxModule.createDefaultBackoffSettings() @@ -2321,7 +2340,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'worker_pool.name': request.workerPool!.name || '', }); this.initialize(); @@ -2347,11 +2366,12 @@ export class CloudBuildClient { protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolOperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateWorkerPool, this._gaxModule.createDefaultBackoffSettings() @@ -2469,7 +2489,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2521,7 +2541,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2582,7 +2602,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2692,7 +2712,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2734,7 +2754,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2785,7 +2805,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ project_id: request.projectId || '', parent: request.parent || '', }); @@ -2893,7 +2913,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); this.initialize(); @@ -2934,7 +2954,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkerPools']; @@ -2984,7 +3004,7 @@ export class CloudBuildClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ parent: request.parent || '', }); const defaultCallSettings = this._defaults['listWorkerPools']; From efcfa13f4a71cac07675129ea1924824bce20299 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 8 Sep 2022 16:52:57 -0400 Subject: [PATCH 214/223] chore(main): release 3.1.1 (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.1.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/CHANGELOG.md | 11 +++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- ...nippet_metadata.google.devtools.cloudbuild.v1.json | 2 +- .../google-devtools-cloudbuild/samples/package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index a4b6fc4dcd7c..ca63c4a71b5d 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [3.1.1](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.1.0...v3.1.1) (2022-09-01) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#343](https://github.com/googleapis/nodejs-cloudbuild/issues/343)) ([4828f1e](https://github.com/googleapis/nodejs-cloudbuild/commit/4828f1e49b530f19d4d25fcc797b9ffe90c7d4ff)) +* Better support for fallback mode ([#337](https://github.com/googleapis/nodejs-cloudbuild/issues/337)) ([909b6c8](https://github.com/googleapis/nodejs-cloudbuild/commit/909b6c8c5f34eeda975f2f818725b9ece202e60d)) +* Change import long to require ([#339](https://github.com/googleapis/nodejs-cloudbuild/issues/339)) ([c1cdde2](https://github.com/googleapis/nodejs-cloudbuild/commit/c1cdde2c692c107414a461620c7e0634b7fc957f)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-cloudbuild/issues/1553)) ([#342](https://github.com/googleapis/nodejs-cloudbuild/issues/342)) ([80cda93](https://github.com/googleapis/nodejs-cloudbuild/commit/80cda938f92ae85266d2468dbb51856fb1d33579)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-cloudbuild/issues/1546)) ([#341](https://github.com/googleapis/nodejs-cloudbuild/issues/341)) ([f5133f8](https://github.com/googleapis/nodejs-cloudbuild/commit/f5133f8a4e5411a452583b0541c60b09124152be)) + ## [3.1.0](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.0.1...v3.1.0) (2022-07-04) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index f9dcca7a1faf..457b80cfe773 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "3.1.0", + "version": "3.1.1", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index fd5c21501202..229605cd7645 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.1.0", + "version": "3.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index b18b3ea318a4..914beeffc17f 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.1.0" + "@google-cloud/cloudbuild": "^3.1.1" }, "devDependencies": { "c8": "^7.0.0", From ee2a454cc3a61a3e6a5f061b5691f2480c5bc8ca Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 14 Sep 2022 22:30:22 +0000 Subject: [PATCH 215/223] fix: preserve default values in x-goog-request-params header (#344) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 474338479 Source-Link: https://github.com/googleapis/googleapis/commit/d5d35e0353b59719e8917103b1bc7df2782bf6ba Source-Link: https://github.com/googleapis/googleapis-gen/commit/efcd3f93962a103f68f003e2a1eecde6fa216a27 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWZjZDNmOTM5NjJhMTAzZjY4ZjAwM2UyYTFlZWNkZTZmYTIxNmEyNyJ9 --- .../src/v1/cloud_build_client.ts | 96 +- .../test/gapic_cloud_build_v1.ts | 2339 +++++++++-------- 2 files changed, 1344 insertions(+), 1091 deletions(-) diff --git a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts index 53c78fe62256..5fcf1cfcd576 100644 --- a/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts +++ b/packages/google-devtools-cloudbuild/src/v1/cloud_build_client.ts @@ -601,9 +601,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - id: request.id || '', - name: request.name || '', + project_id: request.projectId ?? '', + id: request.id ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getBuild(request, options, callback); @@ -699,9 +699,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - id: request.id || '', - name: request.name || '', + project_id: request.projectId ?? '', + id: request.id ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.cancelBuild(request, options, callback); @@ -805,8 +805,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createBuildTrigger(request, options, callback); @@ -904,9 +904,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - trigger_id: request.triggerId || '', - name: request.name || '', + project_id: request.projectId ?? '', + trigger_id: request.triggerId ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getBuildTrigger(request, options, callback); @@ -1010,9 +1010,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - trigger_id: request.triggerId || '', - name: request.name || '', + project_id: request.projectId ?? '', + trigger_id: request.triggerId ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteBuildTrigger(request, options, callback); @@ -1115,9 +1115,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - trigger_id: request.triggerId || '', - 'trigger.resource_name': request.trigger!.resourceName || '', + project_id: request.projectId ?? '', + trigger_id: request.triggerId ?? '', + 'trigger.resource_name': request.trigger!.resourceName ?? '', }); this.initialize(); return this.innerApiCalls.updateBuildTrigger(request, options, callback); @@ -1224,9 +1224,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - trigger: request.trigger || '', - name: request.name || '', + project_id: request.projectId ?? '', + trigger: request.trigger ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.receiveTriggerWebhook(request, options, callback); @@ -1318,7 +1318,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.getWorkerPool(request, options, callback); @@ -1431,8 +1431,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createBuild(request, options, callback); @@ -1601,9 +1601,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - id: request.id || '', - name: request.name || '', + project_id: request.projectId ?? '', + id: request.id ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.retryBuild(request, options, callback); @@ -1749,7 +1749,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.approveBuild(request, options, callback); @@ -1894,9 +1894,9 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - trigger_id: request.triggerId || '', - name: request.name || '', + project_id: request.projectId ?? '', + trigger_id: request.triggerId ?? '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.runBuildTrigger(request, options, callback); @@ -2046,7 +2046,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.createWorkerPool(request, options, callback); @@ -2195,7 +2195,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - name: request.name || '', + name: request.name ?? '', }); this.initialize(); return this.innerApiCalls.deleteWorkerPool(request, options, callback); @@ -2341,7 +2341,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'worker_pool.name': request.workerPool!.name || '', + 'worker_pool.name': request.workerPool!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateWorkerPool(request, options, callback); @@ -2490,8 +2490,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listBuilds(request, options, callback); @@ -2542,8 +2542,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuilds']; const callSettings = defaultCallSettings.merge(options); @@ -2603,8 +2603,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuilds']; const callSettings = defaultCallSettings.merge(options); @@ -2713,8 +2713,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listBuildTriggers(request, options, callback); @@ -2755,8 +2755,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuildTriggers']; const callSettings = defaultCallSettings.merge(options); @@ -2806,8 +2806,8 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - project_id: request.projectId || '', - parent: request.parent || '', + project_id: request.projectId ?? '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listBuildTriggers']; const callSettings = defaultCallSettings.merge(options); @@ -2914,7 +2914,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); this.initialize(); return this.innerApiCalls.listWorkerPools(request, options, callback); @@ -2955,7 +2955,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkerPools']; const callSettings = defaultCallSettings.merge(options); @@ -3005,7 +3005,7 @@ export class CloudBuildClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - parent: request.parent || '', + parent: request.parent ?? '', }); const defaultCallSettings = this._defaults['listWorkerPools']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 6102d965f2f4..0f96d298ea36 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} from 'google-gax'; +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + function generateSampleMessage(instance: T) { const filledObject = ( instance.constructor as typeof protobuf.Message @@ -252,28 +267,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); client.innerApiCalls.getBuild = stubSimpleCall(expectedResponse); const [response] = await client.getBuild(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuild without error using callback', async () => { @@ -285,17 +301,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -318,11 +332,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuild with error', async () => { @@ -334,25 +351,26 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.getBuild = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getBuild(request), expectedError); - assert( - (client.innerApiCalls.getBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuild with closed client', async () => { @@ -364,9 +382,14 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBuild(request), expectedError); @@ -383,28 +406,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); client.innerApiCalls.cancelBuild = stubSimpleCall(expectedResponse); const [response] = await client.cancelBuild(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelBuild without error using callback', async () => { @@ -416,17 +440,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.Build() ); @@ -449,11 +471,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.cancelBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelBuild with error', async () => { @@ -465,28 +490,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.cancelBuild = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.cancelBuild(request), expectedError); - assert( - (client.innerApiCalls.cancelBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes cancelBuild with closed client', async () => { @@ -498,9 +524,14 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; + const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.cancelBuild(request), expectedError); @@ -517,16 +548,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -534,11 +564,14 @@ describe('v1.CloudBuildClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.createBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuildTrigger without error using callback', async () => { @@ -550,16 +583,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -582,11 +614,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuildTrigger with error', async () => { @@ -598,27 +633,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.createBuildTrigger = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createBuildTrigger(request), expectedError); - assert( - (client.innerApiCalls.createBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuildTrigger with closed client', async () => { @@ -630,8 +667,14 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - request.projectId = ''; - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ + 'parent', + ]); + request.parent = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createBuildTrigger(request), expectedError); @@ -648,28 +691,33 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); client.innerApiCalls.getBuildTrigger = stubSimpleCall(expectedResponse); const [response] = await client.getBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuildTrigger without error using callback', async () => { @@ -681,17 +729,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -714,11 +764,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuildTrigger with error', async () => { @@ -730,28 +783,33 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.getBuildTrigger = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getBuildTrigger(request), expectedError); - assert( - (client.innerApiCalls.getBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getBuildTrigger with closed client', async () => { @@ -763,9 +821,18 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getBuildTrigger(request), expectedError); @@ -782,17 +849,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -800,11 +869,14 @@ describe('v1.CloudBuildClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.deleteBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBuildTrigger without error using callback', async () => { @@ -816,17 +888,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.protobuf.Empty() ); @@ -849,11 +923,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBuildTrigger with error', async () => { @@ -865,28 +942,33 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteBuildTrigger = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.deleteBuildTrigger(request), expectedError); - assert( - (client.innerApiCalls.deleteBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteBuildTrigger with closed client', async () => { @@ -898,9 +980,18 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; + const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.deleteBuildTrigger(request), expectedError); @@ -917,19 +1008,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.trigger = {}; - request.trigger.resourceName = ''; - const expectedHeaderRequestParams = - 'project_id=&trigger_id=&trigger.resource_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + request.trigger ??= {}; + const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'trigger', + 'resourceName', + ]); + request.trigger.resourceName = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -937,11 +1030,14 @@ describe('v1.CloudBuildClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.updateBuildTrigger(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBuildTrigger without error using callback', async () => { @@ -953,19 +1049,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.trigger = {}; - request.trigger.resourceName = ''; - const expectedHeaderRequestParams = - 'project_id=&trigger_id=&trigger.resource_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + request.trigger ??= {}; + const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'trigger', + 'resourceName', + ]); + request.trigger.resourceName = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() ); @@ -988,11 +1086,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBuildTrigger with error', async () => { @@ -1004,30 +1105,35 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.trigger = {}; - request.trigger.resourceName = ''; - const expectedHeaderRequestParams = - 'project_id=&trigger_id=&trigger.resource_name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + request.trigger ??= {}; + const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'trigger', + 'resourceName', + ]); + request.trigger.resourceName = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.updateBuildTrigger = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateBuildTrigger(request), expectedError); - assert( - (client.innerApiCalls.updateBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateBuildTrigger with closed client', async () => { @@ -1039,10 +1145,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.trigger = {}; - request.trigger.resourceName = ''; + const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + request.trigger ??= {}; + const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ + 'trigger', + 'resourceName', + ]); + request.trigger.resourceName = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateBuildTrigger(request), expectedError); @@ -1059,17 +1175,22 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); - request.projectId = ''; - request.trigger = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['projectId'] + ); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['trigger'] + ); + request.trigger = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['name'] + ); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() ); @@ -1077,11 +1198,14 @@ describe('v1.CloudBuildClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.receiveTriggerWebhook(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.receiveTriggerWebhook as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes receiveTriggerWebhook without error using callback', async () => { @@ -1093,17 +1217,22 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); - request.projectId = ''; - request.trigger = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['projectId'] + ); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['trigger'] + ); + request.trigger = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['name'] + ); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookResponse() ); @@ -1126,11 +1255,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.receiveTriggerWebhook as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes receiveTriggerWebhook with error', async () => { @@ -1142,17 +1274,22 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); - request.projectId = ''; - request.trigger = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['projectId'] + ); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['trigger'] + ); + request.trigger = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['name'] + ); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.receiveTriggerWebhook = stubSimpleCall( undefined, @@ -1162,11 +1299,14 @@ describe('v1.CloudBuildClient', () => { client.receiveTriggerWebhook(request), expectedError ); - assert( - (client.innerApiCalls.receiveTriggerWebhook as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.receiveTriggerWebhook as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes receiveTriggerWebhook with closed client', async () => { @@ -1178,9 +1318,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); - request.projectId = ''; - request.trigger = ''; - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['projectId'] + ); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['trigger'] + ); + request.trigger = defaultValue2; + const defaultValue3 = getTypeDefaultValue( + 'ReceiveTriggerWebhookRequest', + ['name'] + ); + request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1200,26 +1352,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); client.innerApiCalls.getWorkerPool = stubSimpleCall(expectedResponse); const [response] = await client.getWorkerPool(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkerPool without error using callback', async () => { @@ -1231,15 +1382,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() ); @@ -1262,11 +1409,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkerPool with error', async () => { @@ -1278,26 +1428,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getWorkerPool = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getWorkerPool(request), expectedError); - assert( - (client.innerApiCalls.getWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getWorkerPool with closed client', async () => { @@ -1309,7 +1458,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getWorkerPool(request), expectedError); @@ -1326,16 +1478,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1343,11 +1494,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.createBuild(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuild without error using callback', async () => { @@ -1359,16 +1513,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1398,11 +1551,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuild with call error', async () => { @@ -1414,27 +1570,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.createBuild = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createBuild(request), expectedError); - assert( - (client.innerApiCalls.createBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createBuild with LRO error', async () => { @@ -1446,16 +1604,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.createBuild = stubLongRunningCall( undefined, @@ -1464,11 +1621,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.createBuild(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateBuildProgress without error', async () => { @@ -1520,17 +1680,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1538,11 +1696,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.retryBuild(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.retryBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes retryBuild without error using callback', async () => { @@ -1554,17 +1715,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1594,11 +1753,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.retryBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes retryBuild with call error', async () => { @@ -1610,28 +1772,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.retryBuild = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.retryBuild(request), expectedError); - assert( - (client.innerApiCalls.retryBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes retryBuild with LRO error', async () => { @@ -1643,17 +1806,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - request.projectId = ''; - request.id = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + request.id = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.retryBuild = stubLongRunningCall( undefined, @@ -1662,11 +1823,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.retryBuild(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.retryBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.retryBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkRetryBuildProgress without error', async () => { @@ -1718,15 +1882,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1734,11 +1894,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.approveBuild(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.approveBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveBuild without error using callback', async () => { @@ -1750,15 +1913,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1788,11 +1947,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.approveBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveBuild with call error', async () => { @@ -1804,26 +1966,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.approveBuild = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.approveBuild(request), expectedError); - assert( - (client.innerApiCalls.approveBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes approveBuild with LRO error', async () => { @@ -1835,15 +1996,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.approveBuild = stubLongRunningCall( undefined, @@ -1852,11 +2009,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.approveBuild(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.approveBuild as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.approveBuild as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkApproveBuildProgress without error', async () => { @@ -1908,17 +2068,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1927,11 +2089,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.runBuildTrigger(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes runBuildTrigger without error using callback', async () => { @@ -1943,17 +2108,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1983,11 +2150,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes runBuildTrigger with call error', async () => { @@ -1999,28 +2169,33 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.runBuildTrigger(request), expectedError); - assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes runBuildTrigger with LRO error', async () => { @@ -2032,17 +2207,19 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - request.projectId = ''; - request.triggerId = ''; - request.name = ''; - const expectedHeaderRequestParams = 'project_id=&trigger_id=&name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'triggerId', + ]); + request.triggerId = defaultValue2; + const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ + 'name', + ]); + request.name = defaultValue3; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); client.innerApiCalls.runBuildTrigger = stubLongRunningCall( undefined, @@ -2051,11 +2228,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.runBuildTrigger(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.runBuildTrigger as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runBuildTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkRunBuildTriggerProgress without error', async () => { @@ -2110,15 +2290,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2127,11 +2303,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.createWorkerPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkerPool without error using callback', async () => { @@ -2143,15 +2322,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2181,11 +2356,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkerPool with call error', async () => { @@ -2197,26 +2375,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkerPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createWorkerPool(request), expectedError); - assert( - (client.innerApiCalls.createWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createWorkerPool with LRO error', async () => { @@ -2228,15 +2405,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createWorkerPool = stubLongRunningCall( undefined, @@ -2245,11 +2418,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.createWorkerPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateWorkerPoolProgress without error', async () => { @@ -2304,15 +2480,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2321,11 +2493,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.deleteWorkerPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkerPool without error using callback', async () => { @@ -2337,15 +2512,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2375,11 +2546,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkerPool with call error', async () => { @@ -2391,26 +2565,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkerPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteWorkerPool(request), expectedError); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteWorkerPool with LRO error', async () => { @@ -2422,15 +2595,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteWorkerPool = stubLongRunningCall( undefined, @@ -2439,11 +2608,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.deleteWorkerPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteWorkerPoolProgress without error', async () => { @@ -2498,16 +2670,13 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); - request.workerPool = {}; - request.workerPool.name = ''; - const expectedHeaderRequestParams = 'worker_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.workerPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ + 'workerPool', + 'name', + ]); + request.workerPool.name = defaultValue1; + const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2516,11 +2685,14 @@ describe('v1.CloudBuildClient', () => { const [operation] = await client.updateWorkerPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateWorkerPool without error using callback', async () => { @@ -2532,16 +2704,13 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); - request.workerPool = {}; - request.workerPool.name = ''; - const expectedHeaderRequestParams = 'worker_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.workerPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ + 'workerPool', + 'name', + ]); + request.workerPool.name = defaultValue1; + const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2571,11 +2740,14 @@ describe('v1.CloudBuildClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateWorkerPool with call error', async () => { @@ -2587,27 +2759,27 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); - request.workerPool = {}; - request.workerPool.name = ''; - const expectedHeaderRequestParams = 'worker_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.workerPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ + 'workerPool', + 'name', + ]); + request.workerPool.name = defaultValue1; + const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateWorkerPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateWorkerPool(request), expectedError); - assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateWorkerPool with LRO error', async () => { @@ -2619,16 +2791,13 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); - request.workerPool = {}; - request.workerPool.name = ''; - const expectedHeaderRequestParams = 'worker_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.workerPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ + 'workerPool', + 'name', + ]); + request.workerPool.name = defaultValue1; + const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateWorkerPool = stubLongRunningCall( undefined, @@ -2637,11 +2806,14 @@ describe('v1.CloudBuildClient', () => { ); const [operation] = await client.updateWorkerPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateWorkerPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateWorkerPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateWorkerPoolProgress without error', async () => { @@ -2696,16 +2868,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2714,11 +2885,14 @@ describe('v1.CloudBuildClient', () => { client.innerApiCalls.listBuilds = stubSimpleCall(expectedResponse); const [response] = await client.listBuilds(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuilds as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuilds without error using callback', async () => { @@ -2730,16 +2904,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2764,11 +2937,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuilds as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuilds with error', async () => { @@ -2780,27 +2956,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.listBuilds = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listBuilds(request), expectedError); - assert( - (client.innerApiCalls.listBuilds as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuilds as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuildsStream without error', async () => { @@ -2812,9 +2990,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2845,11 +3029,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuilds, request) ); - assert.strictEqual( - (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuilds.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2862,9 +3047,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.createStream = stubPageStreamingCall( undefined, @@ -2892,11 +3083,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuilds, request) ); - assert.strictEqual( - (client.descriptors.page.listBuilds.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuilds.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2909,9 +3101,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), generateSampleMessage(new protos.google.devtools.cloudbuild.v1.Build()), @@ -2931,11 +3129,12 @@ describe('v1.CloudBuildClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -2948,9 +3147,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.descriptors.page.listBuilds.asyncIterate = stubAsyncIterationCall( undefined, @@ -2969,11 +3174,12 @@ describe('v1.CloudBuildClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listBuilds.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuilds.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -2988,16 +3194,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -3012,11 +3217,14 @@ describe('v1.CloudBuildClient', () => { client.innerApiCalls.listBuildTriggers = stubSimpleCall(expectedResponse); const [response] = await client.listBuildTriggers(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuildTriggers without error using callback', async () => { @@ -3028,16 +3236,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -3068,11 +3275,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuildTriggers with error', async () => { @@ -3084,27 +3294,29 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.innerApiCalls.listBuildTriggers = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listBuildTriggers(request), expectedError); - assert( - (client.innerApiCalls.listBuildTriggers as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listBuildTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listBuildTriggersStream without error', async () => { @@ -3116,9 +3328,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -3156,11 +3374,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuildTriggers, request) ); - assert.strictEqual( - ( - client.descriptors.page.listBuildTriggers.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuildTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3173,9 +3392,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3202,11 +3427,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listBuildTriggers, request) ); - assert.strictEqual( - ( - client.descriptors.page.listBuildTriggers.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuildTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3219,9 +3445,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.BuildTrigger() @@ -3248,11 +3480,12 @@ describe('v1.CloudBuildClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3265,9 +3498,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - request.projectId = ''; - request.parent = ''; - const expectedHeaderRequestParams = 'project_id=&parent='; + const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'projectId', + ]); + request.projectId = defaultValue1; + const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ + 'parent', + ]); + request.parent = defaultValue2; + const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); client.descriptors.page.listBuildTriggers.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3285,11 +3524,12 @@ describe('v1.CloudBuildClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listBuildTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3304,15 +3544,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() @@ -3327,11 +3563,14 @@ describe('v1.CloudBuildClient', () => { client.innerApiCalls.listWorkerPools = stubSimpleCall(expectedResponse); const [response] = await client.listWorkerPools(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkerPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkerPools without error using callback', async () => { @@ -3343,15 +3582,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() @@ -3382,11 +3617,14 @@ describe('v1.CloudBuildClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listWorkerPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkerPools with error', async () => { @@ -3398,26 +3636,25 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listWorkerPools = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listWorkerPools(request), expectedError); - assert( - (client.innerApiCalls.listWorkerPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listWorkerPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listWorkerPoolsStream without error', async () => { @@ -3429,8 +3666,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() @@ -3467,11 +3707,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkerPools, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkerPools.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkerPools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3484,8 +3725,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkerPools.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3511,11 +3755,12 @@ describe('v1.CloudBuildClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listWorkerPools, request) ); - assert.strictEqual( - ( - client.descriptors.page.listWorkerPools.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkerPools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3528,8 +3773,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.devtools.cloudbuild.v1.WorkerPool() @@ -3555,11 +3803,12 @@ describe('v1.CloudBuildClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkerPools.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkerPools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3572,8 +3821,11 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listWorkerPools.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3591,11 +3843,12 @@ describe('v1.CloudBuildClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listWorkerPools.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listWorkerPools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From d6749dcd44c30f3931240dffba0cecab1301bae4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 13:21:15 -0700 Subject: [PATCH 216/223] test: use fully qualified request type name in tests (#348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: use fully qualified request type name in tests PiperOrigin-RevId: 475685359 Source-Link: https://github.com/googleapis/googleapis/commit/7a129736313ceb1f277c3b7f7e16d2e04cc901dd Source-Link: https://github.com/googleapis/googleapis-gen/commit/370c729e2ba062a167449c27882ba5f379c5c34d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzcwYzcyOWUyYmEwNjJhMTY3NDQ5YzI3ODgyYmE1ZjM3OWM1YzM0ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../test/gapic_cloud_build_v1.ts | 1069 ++++++++++------- 1 file changed, 632 insertions(+), 437 deletions(-) diff --git a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts index 0f96d298ea36..45cff8de2a31 100644 --- a/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts +++ b/packages/google-devtools-cloudbuild/test/gapic_cloud_build_v1.ts @@ -267,13 +267,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -301,13 +308,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -351,13 +365,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -382,13 +403,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -406,13 +434,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -440,13 +475,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -490,13 +532,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -524,13 +573,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CancelBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CancelBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CancelBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('CancelBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CancelBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -548,13 +604,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -583,13 +641,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -633,13 +693,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -667,13 +729,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildTriggerRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildTriggerRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -691,17 +755,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -729,17 +796,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -783,17 +853,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -821,17 +894,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('GetBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -849,17 +925,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -888,17 +967,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -942,17 +1024,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -980,17 +1065,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('DeleteBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1008,19 +1096,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; request.trigger ??= {}; - const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'trigger', - 'resourceName', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['trigger', 'resourceName'] + ); request.trigger.resourceName = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -1049,19 +1139,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; request.trigger ??= {}; - const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'trigger', - 'resourceName', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['trigger', 'resourceName'] + ); request.trigger.resourceName = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -1105,19 +1197,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; request.trigger ??= {}; - const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'trigger', - 'resourceName', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['trigger', 'resourceName'] + ); request.trigger.resourceName = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&trigger.resource_name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -1145,19 +1239,21 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; request.trigger ??= {}; - const defaultValue3 = getTypeDefaultValue('UpdateBuildTriggerRequest', [ - 'trigger', - 'resourceName', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateBuildTriggerRequest', + ['trigger', 'resourceName'] + ); request.trigger.resourceName = defaultValue3; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1176,17 +1272,17 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['projectId'] ); request.projectId = defaultValue1; const defaultValue2 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['trigger'] ); request.trigger = defaultValue2; const defaultValue3 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['name'] ); request.name = defaultValue3; @@ -1218,17 +1314,17 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['projectId'] ); request.projectId = defaultValue1; const defaultValue2 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['trigger'] ); request.trigger = defaultValue2; const defaultValue3 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['name'] ); request.name = defaultValue3; @@ -1275,17 +1371,17 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['projectId'] ); request.projectId = defaultValue1; const defaultValue2 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['trigger'] ); request.trigger = defaultValue2; const defaultValue3 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['name'] ); request.name = defaultValue3; @@ -1319,17 +1415,17 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['projectId'] ); request.projectId = defaultValue1; const defaultValue2 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['trigger'] ); request.trigger = defaultValue2; const defaultValue3 = getTypeDefaultValue( - 'ReceiveTriggerWebhookRequest', + '.google.devtools.cloudbuild.v1.ReceiveTriggerWebhookRequest', ['name'] ); request.name = defaultValue3; @@ -1352,9 +1448,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1382,9 +1479,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1428,9 +1526,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1458,9 +1557,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.GetWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.GetWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1478,13 +1578,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -1513,13 +1615,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = generateSampleMessage( @@ -1570,13 +1674,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -1604,13 +1710,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('CreateBuildRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateBuildRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -1680,13 +1788,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -1715,13 +1830,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -1772,13 +1894,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -1806,13 +1935,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RetryBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('RetryBuildRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RetryBuildRequest', ['id']); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['id'] + ); request.id = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RetryBuildRequest', ['name']); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RetryBuildRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -1882,9 +2018,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ApproveBuildRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1913,9 +2050,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ApproveBuildRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1966,9 +2104,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ApproveBuildRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1996,9 +2135,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ApproveBuildRequest() ); - const defaultValue1 = getTypeDefaultValue('ApproveBuildRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ApproveBuildRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2068,17 +2208,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -2108,17 +2251,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedResponse = generateSampleMessage( @@ -2169,17 +2315,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -2207,17 +2356,20 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.RunBuildTriggerRequest() ); - const defaultValue1 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'triggerId', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['triggerId'] + ); request.triggerId = defaultValue2; - const defaultValue3 = getTypeDefaultValue('RunBuildTriggerRequest', [ - 'name', - ]); + const defaultValue3 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.RunBuildTriggerRequest', + ['name'] + ); request.name = defaultValue3; const expectedHeaderRequestParams = `project_id=${defaultValue1}&trigger_id=${defaultValue2}&name=${defaultValue3}`; const expectedError = new Error('expected'); @@ -2290,9 +2442,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2322,9 +2475,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2375,9 +2529,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2405,9 +2560,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateWorkerPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.CreateWorkerPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2480,9 +2636,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2512,9 +2669,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2565,9 +2723,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2595,9 +2754,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteWorkerPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.DeleteWorkerPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2671,10 +2831,10 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); request.workerPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ - 'workerPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest', + ['workerPool', 'name'] + ); request.workerPool.name = defaultValue1; const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2705,10 +2865,10 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); request.workerPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ - 'workerPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest', + ['workerPool', 'name'] + ); request.workerPool.name = defaultValue1; const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -2760,10 +2920,10 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); request.workerPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ - 'workerPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest', + ['workerPool', 'name'] + ); request.workerPool.name = defaultValue1; const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2792,10 +2952,10 @@ describe('v1.CloudBuildClient', () => { new protos.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest() ); request.workerPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateWorkerPoolRequest', [ - 'workerPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.UpdateWorkerPoolRequest', + ['workerPool', 'name'] + ); request.workerPool.name = defaultValue1; const expectedHeaderRequestParams = `worker_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -2868,13 +3028,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -2904,13 +3066,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -2956,13 +3120,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -2990,13 +3156,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3047,13 +3215,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -3101,13 +3271,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3147,13 +3319,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildsRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildsRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildsRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -3194,13 +3368,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3236,13 +3412,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3294,13 +3472,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -3328,13 +3508,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3392,13 +3574,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -3445,13 +3629,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedResponse = [ @@ -3498,13 +3684,15 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListBuildTriggersRequest() ); - const defaultValue1 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'projectId', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['projectId'] + ); request.projectId = defaultValue1; - const defaultValue2 = getTypeDefaultValue('ListBuildTriggersRequest', [ - 'parent', - ]); + const defaultValue2 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListBuildTriggersRequest', + ['parent'] + ); request.parent = defaultValue2; const expectedHeaderRequestParams = `project_id=${defaultValue1}&parent=${defaultValue2}`; const expectedError = new Error('expected'); @@ -3544,9 +3732,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3582,9 +3771,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3636,9 +3826,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3666,9 +3857,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3725,9 +3917,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3773,9 +3966,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3821,9 +4015,10 @@ describe('v1.CloudBuildClient', () => { const request = generateSampleMessage( new protos.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListWorkerPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.devtools.cloudbuild.v1.ListWorkerPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From 9c117a082072363bd83a612853c9aa742f45e6fe Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 22 Sep 2022 14:15:14 -0700 Subject: [PATCH 217/223] chore(main): release 3.1.2 (#345) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.1.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/CHANGELOG.md | 7 +++++++ packages/google-devtools-cloudbuild/package.json | 2 +- .../v1/snippet_metadata.google.devtools.cloudbuild.v1.json | 2 +- packages/google-devtools-cloudbuild/samples/package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index ca63c4a71b5d..732ce5489afc 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.2](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.1.1...v3.1.2) (2022-09-22) + + +### Bug Fixes + +* Preserve default values in x-goog-request-params header ([#344](https://github.com/googleapis/nodejs-cloudbuild/issues/344)) ([004810d](https://github.com/googleapis/nodejs-cloudbuild/commit/004810d748249c000e8df308b70c03097e65fc25)) + ## [3.1.1](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.1.0...v3.1.1) (2022-09-01) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 457b80cfe773..cc2662b58c7e 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "3.1.1", + "version": "3.1.2", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 229605cd7645..ead43ace724a 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.1.1", + "version": "3.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 914beeffc17f..eff1440160bb 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.1.1" + "@google-cloud/cloudbuild": "^3.1.2" }, "devDependencies": { "c8": "^7.0.0", From 16f63995b179fe5284c40a1ab53c1ca972f78567 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:47:52 -0700 Subject: [PATCH 218/223] fix(deps): use google-gax v3.5.2 (#354) --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index cc2662b58c7e..80000a4f06ad 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -61,6 +61,6 @@ "node": ">=12.0.0" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" } } From 66b3ec5340024ceeb939d97227d3bff07dfe10a6 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:40:16 +0100 Subject: [PATCH 219/223] chore(deps): update dependency jsdoc to v4 (#357) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jsdoc](https://togithub.com/jsdoc/jsdoc) | [`^3.6.2` -> `^4.0.0`](https://renovatebot.com/diffs/npm/jsdoc/3.6.11/4.0.0) | [![age](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/compatibility-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/jsdoc/4.0.0/confidence-slim/3.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
jsdoc/jsdoc ### [`v4.0.0`](https://togithub.com/jsdoc/jsdoc/blob/HEAD/CHANGES.md#​400-November-2022) [Compare Source](https://togithub.com/jsdoc/jsdoc/compare/3.6.11...084218523a7d69fec14a852ce680f374f526af28) - JSDoc releases now use [semantic versioning](https://semver.org/). If JSDoc makes backwards-incompatible changes in the future, the major version will be incremented. - JSDoc no longer uses the [`taffydb`](https://taffydb.com/) package. If your JSDoc template or plugin uses the `taffydb` package, see the [instructions for replacing `taffydb` with `@jsdoc/salty`](https://togithub.com/jsdoc/jsdoc/tree/main/packages/jsdoc-salty#use-salty-in-a-jsdoc-template). - JSDoc now supports Node.js 12.0.0 and later.
--- ### Configuration 📅 **Schedule**: Branch creation - "after 9am and before 3pm" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-cloudbuild). --- packages/google-devtools-cloudbuild/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 80000a4f06ad..2d20723f914a 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -29,7 +29,7 @@ "c8": "^7.0.0", "chai": "^4.2.0", "gts": "^3.1.0", - "jsdoc": "^3.6.2", + "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", "jsdoc-region-tag": "^2.0.0", "linkinator": "^4.0.0", From 1fbc75ffa0e0b94b5afb7127c72a482bf0ada7b5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 10 Nov 2022 10:44:29 +0000 Subject: [PATCH 220/223] fix: regenerated protos JS and TS definitions (#358) samples: pull in latest typeless bot, clean up some comments Source-Link: https://togithub.com/googleapis/synthtool/commit/0a68e568b6911b60bb6fd452eba4848b176031d8 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:5b05f26103855c3a15433141389c478d1d3fe088fb5d4e3217c4793f6b3f245e --- .../protos/protos.d.ts | 2 +- .../protos/protos.js | 218 +++++++++++++++--- .../protos/protos.json | 5 + 3 files changed, 196 insertions(+), 29 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 45299ec94218..919a558b88a1 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import Long = require("long"); import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); /** Namespace google. */ export namespace google { diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index b4d068b8a2c6..2a9e38b0773b 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -3241,6 +3241,12 @@ message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); } switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "STATUS_UNKNOWN": case 0: message.status = 0; @@ -3356,7 +3362,7 @@ if (message.timeout != null && message.hasOwnProperty("timeout")) object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) object.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pullTiming, options); if (message.script != null && message.hasOwnProperty("script")) @@ -5065,6 +5071,12 @@ if (object.projectId != null) message.projectId = String(object.projectId); switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; case "STATUS_UNKNOWN": case 0: message.status = 0; @@ -5296,7 +5308,7 @@ if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; if (message.source != null && message.hasOwnProperty("source")) object.source = $root.google.devtools.cloudbuild.v1.Source.toObject(message.source, options); if (message.createTime != null && message.hasOwnProperty("createTime")) @@ -5579,6 +5591,12 @@ if (object.text != null) message.text = String(object.text); switch (object.priority) { + default: + if (typeof object.priority === "number") { + message.priority = object.priority; + break; + } + break; case "PRIORITY_UNSPECIFIED": case 0: message.priority = 0; @@ -5619,7 +5637,7 @@ if (message.text != null && message.hasOwnProperty("text")) object.text = message.text; if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] : message.priority; + object.priority = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] === undefined ? message.priority : $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] : message.priority; return object; }; @@ -5848,6 +5866,12 @@ return object; var message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "FAILURE_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -5900,7 +5924,7 @@ object.detail = ""; } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] : message.type; + object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] === undefined ? message.type : $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] : message.type; if (message.detail != null && message.hasOwnProperty("detail")) object.detail = message.detail; return object; @@ -7686,6 +7710,12 @@ return object; var message = new $root.google.devtools.cloudbuild.v1.Hash(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "NONE": case 0: message.type = 0; @@ -7731,7 +7761,7 @@ } } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.type] : message.type; + object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.type] === undefined ? message.type : $root.google.devtools.cloudbuild.v1.Hash.HashType[message.type] : message.type; if (message.value != null && message.hasOwnProperty("value")) object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; @@ -10537,6 +10567,12 @@ return object; var message = new $root.google.devtools.cloudbuild.v1.BuildApproval(); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -10590,7 +10626,7 @@ object.result = null; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildApproval.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildApproval.State[message.state] === undefined ? message.state : $root.google.devtools.cloudbuild.v1.BuildApproval.State[message.state] : message.state; if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.devtools.cloudbuild.v1.ApprovalConfig.toObject(message.config, options); if (message.result != null && message.hasOwnProperty("result")) @@ -11087,6 +11123,12 @@ message.approvalTime = $root.google.protobuf.Timestamp.fromObject(object.approvalTime); } switch (object.decision) { + default: + if (typeof object.decision === "number") { + message.decision = object.decision; + break; + } + break; case "DECISION_UNSPECIFIED": case 0: message.decision = 0; @@ -11132,7 +11174,7 @@ if (message.approvalTime != null && message.hasOwnProperty("approvalTime")) object.approvalTime = $root.google.protobuf.Timestamp.toObject(message.approvalTime, options); if (message.decision != null && message.hasOwnProperty("decision")) - object.decision = options.enums === String ? $root.google.devtools.cloudbuild.v1.ApprovalResult.Decision[message.decision] : message.decision; + object.decision = options.enums === String ? $root.google.devtools.cloudbuild.v1.ApprovalResult.Decision[message.decision] === undefined ? message.decision : $root.google.devtools.cloudbuild.v1.ApprovalResult.Decision[message.decision] : message.decision; if (message.comment != null && message.hasOwnProperty("comment")) object.comment = message.comment; if (message.url != null && message.hasOwnProperty("url")) @@ -12516,6 +12558,12 @@ if (object.serviceAccountEmail != null) message.serviceAccountEmail = String(object.serviceAccountEmail); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -12566,7 +12614,7 @@ if (message.serviceAccountEmail != null && message.hasOwnProperty("serviceAccountEmail")) object.serviceAccountEmail = message.serviceAccountEmail; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.PubsubConfig.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.PubsubConfig.State[message.state] === undefined ? message.state : $root.google.devtools.cloudbuild.v1.PubsubConfig.State[message.state] : message.state; return object; }; @@ -12812,6 +12860,12 @@ if (object.secret != null) message.secret = String(object.secret); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -12849,7 +12903,7 @@ object.authMethod = "secret"; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WebhookConfig.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WebhookConfig.State[message.state] === undefined ? message.state : $root.google.devtools.cloudbuild.v1.WebhookConfig.State[message.state] : message.state; return object; }; @@ -13109,6 +13163,12 @@ if (object.branch != null) message.branch = String(object.branch); switch (object.commentControl) { + default: + if (typeof object.commentControl === "number") { + message.commentControl = object.commentControl; + break; + } + break; case "COMMENTS_DISABLED": case 0: message.commentControl = 0; @@ -13150,7 +13210,7 @@ object.gitRef = "branch"; } if (message.commentControl != null && message.hasOwnProperty("commentControl")) - object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; + object.commentControl = options.enums === String ? $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] === undefined ? message.commentControl : $root.google.devtools.cloudbuild.v1.PullRequestFilter.CommentControl[message.commentControl] : message.commentControl; if (message.invertRegex != null && message.hasOwnProperty("invertRegex")) object.invertRegex = message.invertRegex; return object; @@ -15461,6 +15521,10 @@ for (var i = 0; i < object.sourceProvenanceHash.length; ++i) switch (object.sourceProvenanceHash[i]) { default: + if (typeof object.sourceProvenanceHash[i] === "number") { + message.sourceProvenanceHash[i] = object.sourceProvenanceHash[i]; + break; + } case "NONE": case 0: message.sourceProvenanceHash[i] = 0; @@ -15476,6 +15540,12 @@ } } switch (object.requestedVerifyOption) { + default: + if (typeof object.requestedVerifyOption === "number") { + message.requestedVerifyOption = object.requestedVerifyOption; + break; + } + break; case "NOT_VERIFIED": case 0: message.requestedVerifyOption = 0; @@ -15486,6 +15556,12 @@ break; } switch (object.machineType) { + default: + if (typeof object.machineType === "number") { + message.machineType = object.machineType; + break; + } + break; case "UNSPECIFIED": case 0: message.machineType = 0; @@ -15517,6 +15593,12 @@ else if (typeof object.diskSizeGb === "object") message.diskSizeGb = new $util.LongBits(object.diskSizeGb.low >>> 0, object.diskSizeGb.high >>> 0).toNumber(); switch (object.substitutionOption) { + default: + if (typeof object.substitutionOption === "number") { + message.substitutionOption = object.substitutionOption; + break; + } + break; case "MUST_MATCH": case 0: message.substitutionOption = 0; @@ -15529,6 +15611,12 @@ if (object.dynamicSubstitutions != null) message.dynamicSubstitutions = Boolean(object.dynamicSubstitutions); switch (object.logStreamingOption) { + default: + if (typeof object.logStreamingOption === "number") { + message.logStreamingOption = object.logStreamingOption; + break; + } + break; case "STREAM_DEFAULT": case 0: message.logStreamingOption = 0; @@ -15550,6 +15638,12 @@ message.pool = $root.google.devtools.cloudbuild.v1.BuildOptions.PoolOption.fromObject(object.pool); } switch (object.logging) { + default: + if (typeof object.logging === "number") { + message.logging = object.logging; + break; + } + break; case "LOGGING_UNSPECIFIED": case 0: message.logging = 0; @@ -15639,16 +15733,16 @@ if (message.sourceProvenanceHash && message.sourceProvenanceHash.length) { object.sourceProvenanceHash = []; for (var j = 0; j < message.sourceProvenanceHash.length; ++j) - object.sourceProvenanceHash[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] : message.sourceProvenanceHash[j]; + object.sourceProvenanceHash[j] = options.enums === String ? $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] === undefined ? message.sourceProvenanceHash[j] : $root.google.devtools.cloudbuild.v1.Hash.HashType[message.sourceProvenanceHash[j]] : message.sourceProvenanceHash[j]; } if (message.requestedVerifyOption != null && message.hasOwnProperty("requestedVerifyOption")) - object.requestedVerifyOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] : message.requestedVerifyOption; + object.requestedVerifyOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] === undefined ? message.requestedVerifyOption : $root.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption[message.requestedVerifyOption] : message.requestedVerifyOption; if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] : message.machineType; + object.machineType = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] === undefined ? message.machineType : $root.google.devtools.cloudbuild.v1.BuildOptions.MachineType[message.machineType] : message.machineType; if (message.substitutionOption != null && message.hasOwnProperty("substitutionOption")) - object.substitutionOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] : message.substitutionOption; + object.substitutionOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] === undefined ? message.substitutionOption : $root.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption[message.substitutionOption] : message.substitutionOption; if (message.logStreamingOption != null && message.hasOwnProperty("logStreamingOption")) - object.logStreamingOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] : message.logStreamingOption; + object.logStreamingOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] === undefined ? message.logStreamingOption : $root.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption[message.logStreamingOption] : message.logStreamingOption; if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) if (typeof message.diskSizeGb === "number") object.diskSizeGb = options.longs === String ? String(message.diskSizeGb) : message.diskSizeGb; @@ -15657,7 +15751,7 @@ if (message.workerPool != null && message.hasOwnProperty("workerPool")) object.workerPool = message.workerPool; if (message.logging != null && message.hasOwnProperty("logging")) - object.logging = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] : message.logging; + object.logging = options.enums === String ? $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] === undefined ? message.logging : $root.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode[message.logging] : message.logging; if (message.env && message.env.length) { object.env = []; for (var j = 0; j < message.env.length; ++j) @@ -16874,6 +16968,12 @@ message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -16949,7 +17049,7 @@ if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.devtools.cloudbuild.v1.WorkerPool.State[message.state] === undefined ? message.state : $root.google.devtools.cloudbuild.v1.WorkerPool.State[message.state] : message.state; if (message.etag != null && message.hasOwnProperty("etag")) object.etag = message.etag; if (message.privatePoolV1Config != null && message.hasOwnProperty("privatePoolV1Config")) { @@ -17660,6 +17760,12 @@ if (object.peeredNetwork != null) message.peeredNetwork = String(object.peeredNetwork); switch (object.egressOption) { + default: + if (typeof object.egressOption === "number") { + message.egressOption = object.egressOption; + break; + } + break; case "EGRESS_OPTION_UNSPECIFIED": case 0: message.egressOption = 0; @@ -17696,7 +17802,7 @@ if (message.peeredNetwork != null && message.hasOwnProperty("peeredNetwork")) object.peeredNetwork = message.peeredNetwork; if (message.egressOption != null && message.hasOwnProperty("egressOption")) - object.egressOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] : message.egressOption; + object.egressOption = options.enums === String ? $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] === undefined ? message.egressOption : $root.google.devtools.cloudbuild.v1.PrivatePoolV1Config.NetworkConfig.EgressOption[message.egressOption] : message.egressOption; return object; }; @@ -21632,6 +21738,12 @@ if (object.nameField != null) message.nameField = String(object.nameField); switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; case "HISTORY_UNSPECIFIED": case 0: message.history = 0; @@ -21656,6 +21768,10 @@ for (var i = 0; i < object.style.length; ++i) switch (object.style[i]) { default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } case "STYLE_UNSPECIFIED": case 0: message.style[i] = 0; @@ -21703,7 +21819,7 @@ if (message.nameField != null && message.hasOwnProperty("nameField")) object.nameField = message.nameField; if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; if (message.plural != null && message.hasOwnProperty("plural")) object.plural = message.plural; if (message.singular != null && message.hasOwnProperty("singular")) @@ -21711,7 +21827,7 @@ if (message.style && message.style.length) { object.style = []; for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } return object; }; @@ -24522,6 +24638,12 @@ if (object.number != null) message.number = object.number | 0; switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; case "LABEL_OPTIONAL": case 1: message.label = 1; @@ -24536,6 +24658,12 @@ break; } switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_DOUBLE": case 1: message.type = 1; @@ -24662,9 +24790,9 @@ if (message.number != null && message.hasOwnProperty("number")) object.number = message.number; if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; if (message.typeName != null && message.hasOwnProperty("typeName")) object.typeName = message.typeName; if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) @@ -27011,6 +27139,12 @@ if (object.javaStringCheckUtf8 != null) message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; case "SPEED": case 1: message.optimizeFor = 1; @@ -27119,7 +27253,7 @@ if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) object.javaOuterClassname = message.javaOuterClassname; if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) object.javaMultipleFiles = message.javaMultipleFiles; if (message.goPackage != null && message.hasOwnProperty("goPackage")) @@ -27921,6 +28055,12 @@ return object; var message = new $root.google.protobuf.FieldOptions(); switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; case "STRING": case 0: message.ctype = 0; @@ -27937,6 +28077,12 @@ if (object.packed != null) message.packed = Boolean(object.packed); switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; case "JS_NORMAL": case 0: message.jstype = 0; @@ -27975,6 +28121,10 @@ for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) switch (object[".google.api.fieldBehavior"][i]) { default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: message[".google.api.fieldBehavior"][i] = 0; @@ -28045,7 +28195,7 @@ object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; if (message.packed != null && message.hasOwnProperty("packed")) object.packed = message.packed; if (message.deprecated != null && message.hasOwnProperty("deprecated")) @@ -28053,7 +28203,7 @@ if (message.lazy != null && message.hasOwnProperty("lazy")) object.lazy = message.lazy; if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; if (message.weak != null && message.hasOwnProperty("weak")) object.weak = message.weak; if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) @@ -28066,7 +28216,7 @@ if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { object[".google.api.fieldBehavior"] = []; for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); @@ -29443,6 +29593,12 @@ if (object.deprecated != null) message.deprecated = Boolean(object.deprecated); switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; case "IDEMPOTENCY_UNKNOWN": case 0: message.idempotencyLevel = 0; @@ -29512,7 +29668,7 @@ if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -31267,6 +31423,12 @@ if (object.end != null) message.end = object.end | 0; switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; case "NONE": case 0: message.semantic = 0; @@ -31316,7 +31478,7 @@ if (message.end != null && message.hasOwnProperty("end")) object.end = message.end; if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; }; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 4408124f3841..79e7f05380ca 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -1953,6 +1953,11 @@ } }, "LoggingMode": { + "valuesOptions": { + "STACKDRIVER_ONLY": { + "deprecated": true + } + }, "values": { "LOGGING_UNSPECIFIED": 0, "LEGACY": 1, From 9845e3db7a23059bc52a1507ba93ac16be5f62d9 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Fri, 11 Nov 2022 02:10:27 +0100 Subject: [PATCH 221/223] chore(deps): update node.js to v19 (#351) --- packages/google-devtools-cloudbuild/cloudbuild.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-devtools-cloudbuild/cloudbuild.yaml b/packages/google-devtools-cloudbuild/cloudbuild.yaml index 16339fd1ab2b..6a5515e42ef6 100644 --- a/packages/google-devtools-cloudbuild/cloudbuild.yaml +++ b/packages/google-devtools-cloudbuild/cloudbuild.yaml @@ -1,7 +1,7 @@ steps: -- name: node:18 +- name: node:19 entrypoint: npm args: ['install'] -- name: node:18 +- name: node:19 entrypoint: npm args: ['test'] From 3ef007046d8fb3321c73d592bfb395a11960d472 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:10:16 +0000 Subject: [PATCH 222/223] feat: Integration of Cloud Build with Artifact Registry (#352) - [ ] Regenerate this pull request now. Committer: @amcooper PiperOrigin-RevId: 484745059 Source-Link: https://togithub.com/googleapis/googleapis/commit/b819b9552ddb98c5d2f68719c34b729cfa370fcc Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/b7ff84f154b8c5bc0b32208fe6c39827a2a86451 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjdmZjg0ZjE1NGI4YzViYzBiMzIyMDhmZTZjMzk4MjdhMmE4NjQ1MSJ9 BEGIN_NESTED_COMMIT feat: Add allow_failure, exit_code, and allow_exit_code to BuildStep message Committer: @arvinddayal PiperOrigin-RevId: 484308212 Source-Link: https://togithub.com/googleapis/googleapis/commit/bc84ad52ed3d36c2433d8c5e8245166a6097159c Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c6550a66efe7595832473efe51a58ddd0a05c2d8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzY1NTBhNjZlZmU3NTk1ODMyNDczZWZlNTFhNThkZGQwYTA1YzJkOCJ9 END_NESTED_COMMIT --- .../devtools/cloudbuild/v1/cloudbuild.proto | 111 + .../protos/protos.d.ts | 484 ++ .../protos/protos.js | 6465 ++++++++++------- .../protos/protos.json | 111 + 4 files changed, 4603 insertions(+), 2568 deletions(-) diff --git a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto index 3f980c7b184f..c007e65b4411 100644 --- a/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto +++ b/packages/google-devtools-cloudbuild/protos/google/devtools/cloudbuild/v1/cloudbuild.proto @@ -504,6 +504,30 @@ message BuiltImage { TimeSpan push_timing = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// Artifact uploaded using the PythonPackage directive. +message UploadedPythonPackage { + // URI of the uploaded artifact. + string uri = 1; + + // Hash types and values of the Python Artifact. + FileHashes file_hashes = 2; + + // Output only. Stores timing information for pushing the specified artifact. + TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A Maven artifact uploaded using the MavenArtifact directive. +message UploadedMavenArtifact { + // URI of the uploaded artifact. + string uri = 1; + + // Hash types and values of the Maven Artifact. + FileHashes file_hashes = 2; + + // Output only. Stores timing information for pushing the specified artifact. + TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + // A step in the build pipeline. message BuildStep { // Required. The name of the container image that will run this particular @@ -598,6 +622,21 @@ message BuildStep { // as the build progresses. Build.Status status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Allow this build step to fail without failing the entire build. + // + // If false, the entire build will fail if this step fails. Otherwise, the + // build will succeed, but this step will still have a failure status. + // Error information will be reported in the failure_detail field. + bool allow_failure = 14; + + // Output only. Return code from running the step. + int32 exit_code = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allow this build step to fail without failing the entire build if and + // only if the exit code is one of the specified codes. If allow_failure + // is also specified, this field will take precedence. + repeated int32 allow_exit_codes = 18; + // A shell script to be executed in the step. // // When script is provided, the user cannot specify the entrypoint or args. @@ -645,6 +684,12 @@ message Results { // Time to push all non-container artifacts. TimeSpan artifact_timing = 7; + + // Python artifacts uploaded to Artifact Registry at the end of the build. + repeated UploadedPythonPackage python_packages = 8; + + // Maven artifacts uploaded to Artifact Registry at the end of the build. + repeated UploadedMavenArtifact maven_artifacts = 9; } // An artifact that was uploaded during a build. This @@ -938,6 +983,54 @@ message Artifacts { TimeSpan timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } + // A Maven artifact to upload to Artifact Registry upon successful completion + // of all build steps. + message MavenArtifact { + // Artifact Registry repository, in the form + // "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" + // + // Artifact in the workspace specified by path will be uploaded to + // Artifact Registry with this location as a prefix. + string repository = 1; + + // Path to an artifact in the build's workspace to be uploaded to + // Artifact Registry. + // This can be either an absolute path, + // e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar + // or a relative path from /workspace, + // e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. + string path = 2; + + // Maven `artifactId` value used when uploading the artifact to Artifact + // Registry. + string artifact_id = 3; + + // Maven `groupId` value used when uploading the artifact to Artifact + // Registry. + string group_id = 4; + + // Maven `version` value used when uploading the artifact to Artifact + // Registry. + string version = 5; + } + + // Python package to upload to Artifact Registry upon successful completion + // of all build steps. A package can encapsulate multiple objects to be + // uploaded to a single repository. + message PythonPackage { + // Artifact Registry repository, in the form + // "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" + // + // Files in the workspace matching any path pattern will be uploaded to + // Artifact Registry with this location as a prefix. + string repository = 1; + + // Path globs used to match files in the build's workspace. For Python/ + // Twine, this is usually `dist/*`, and sometimes additionally an `.asc` + // file. + repeated string paths = 2; + } + // A list of images to be pushed upon the successful completion of all build // steps. // @@ -961,6 +1054,24 @@ message Artifacts { // // If any objects fail to be pushed, the build is marked FAILURE. ArtifactObjects objects = 2; + + // A list of Maven artifacts to be uploaded to Artifact Registry upon + // successful completion of all build steps. + // + // Artifacts in the workspace matching specified paths globs will be uploaded + // to the specified Artifact Registry repository using the builder service + // account's credentials. + // + // If any artifacts fail to be pushed, the build is marked FAILURE. + repeated MavenArtifact maven_artifacts = 3; + + // A list of Python packages to be uploaded to Artifact Registry upon + // successful completion of all build steps. + // + // The build service account credentials will be used to perform the upload. + // + // If any objects fail to be pushed, the build is marked FAILURE. + repeated PythonPackage python_packages = 5; } // Start and end times for a build execution phase. diff --git a/packages/google-devtools-cloudbuild/protos/protos.d.ts b/packages/google-devtools-cloudbuild/protos/protos.d.ts index 919a558b88a1..4a2570fd8983 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.d.ts +++ b/packages/google-devtools-cloudbuild/protos/protos.d.ts @@ -1233,6 +1233,224 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an UploadedPythonPackage. */ + interface IUploadedPythonPackage { + + /** UploadedPythonPackage uri */ + uri?: (string|null); + + /** UploadedPythonPackage fileHashes */ + fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedPythonPackage pushTiming */ + pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents an UploadedPythonPackage. */ + class UploadedPythonPackage implements IUploadedPythonPackage { + + /** + * Constructs a new UploadedPythonPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUploadedPythonPackage); + + /** UploadedPythonPackage uri. */ + public uri: string; + + /** UploadedPythonPackage fileHashes. */ + public fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedPythonPackage pushTiming. */ + public pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new UploadedPythonPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns UploadedPythonPackage instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUploadedPythonPackage): google.devtools.cloudbuild.v1.UploadedPythonPackage; + + /** + * Encodes the specified UploadedPythonPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedPythonPackage.verify|verify} messages. + * @param message UploadedPythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUploadedPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UploadedPythonPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedPythonPackage.verify|verify} messages. + * @param message UploadedPythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUploadedPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UploadedPythonPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UploadedPythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.UploadedPythonPackage; + + /** + * Decodes an UploadedPythonPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UploadedPythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.UploadedPythonPackage; + + /** + * Verifies an UploadedPythonPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UploadedPythonPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UploadedPythonPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UploadedPythonPackage; + + /** + * Creates a plain object from an UploadedPythonPackage message. Also converts values to other types if specified. + * @param message UploadedPythonPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UploadedPythonPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UploadedPythonPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UploadedPythonPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UploadedMavenArtifact. */ + interface IUploadedMavenArtifact { + + /** UploadedMavenArtifact uri */ + uri?: (string|null); + + /** UploadedMavenArtifact fileHashes */ + fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedMavenArtifact pushTiming */ + pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + } + + /** Represents an UploadedMavenArtifact. */ + class UploadedMavenArtifact implements IUploadedMavenArtifact { + + /** + * Constructs a new UploadedMavenArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.IUploadedMavenArtifact); + + /** UploadedMavenArtifact uri. */ + public uri: string; + + /** UploadedMavenArtifact fileHashes. */ + public fileHashes?: (google.devtools.cloudbuild.v1.IFileHashes|null); + + /** UploadedMavenArtifact pushTiming. */ + public pushTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** + * Creates a new UploadedMavenArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns UploadedMavenArtifact instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.IUploadedMavenArtifact): google.devtools.cloudbuild.v1.UploadedMavenArtifact; + + /** + * Encodes the specified UploadedMavenArtifact message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedMavenArtifact.verify|verify} messages. + * @param message UploadedMavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.IUploadedMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UploadedMavenArtifact message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedMavenArtifact.verify|verify} messages. + * @param message UploadedMavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.IUploadedMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UploadedMavenArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UploadedMavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.UploadedMavenArtifact; + + /** + * Decodes an UploadedMavenArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UploadedMavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.UploadedMavenArtifact; + + /** + * Verifies an UploadedMavenArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UploadedMavenArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UploadedMavenArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.UploadedMavenArtifact; + + /** + * Creates a plain object from an UploadedMavenArtifact message. Also converts values to other types if specified. + * @param message UploadedMavenArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.UploadedMavenArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UploadedMavenArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UploadedMavenArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a BuildStep. */ interface IBuildStep { @@ -1275,6 +1493,15 @@ export namespace google { /** BuildStep status */ status?: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status|null); + /** BuildStep allowFailure */ + allowFailure?: (boolean|null); + + /** BuildStep exitCode */ + exitCode?: (number|null); + + /** BuildStep allowExitCodes */ + allowExitCodes?: (number[]|null); + /** BuildStep script */ script?: (string|null); } @@ -1327,6 +1554,15 @@ export namespace google { /** BuildStep status. */ public status: (google.devtools.cloudbuild.v1.Build.Status|keyof typeof google.devtools.cloudbuild.v1.Build.Status); + /** BuildStep allowFailure. */ + public allowFailure: boolean; + + /** BuildStep exitCode. */ + public exitCode: number; + + /** BuildStep allowExitCodes. */ + public allowExitCodes: number[]; + /** BuildStep script. */ public script: string; @@ -1531,6 +1767,12 @@ export namespace google { /** Results artifactTiming */ artifactTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + + /** Results pythonPackages */ + pythonPackages?: (google.devtools.cloudbuild.v1.IUploadedPythonPackage[]|null); + + /** Results mavenArtifacts */ + mavenArtifacts?: (google.devtools.cloudbuild.v1.IUploadedMavenArtifact[]|null); } /** Represents a Results. */ @@ -1560,6 +1802,12 @@ export namespace google { /** Results artifactTiming. */ public artifactTiming?: (google.devtools.cloudbuild.v1.ITimeSpan|null); + /** Results pythonPackages. */ + public pythonPackages: google.devtools.cloudbuild.v1.IUploadedPythonPackage[]; + + /** Results mavenArtifacts. */ + public mavenArtifacts: google.devtools.cloudbuild.v1.IUploadedMavenArtifact[]; + /** * Creates a new Results instance using the specified properties. * @param [properties] Properties to set @@ -2262,6 +2510,12 @@ export namespace google { /** Artifacts objects */ objects?: (google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null); + + /** Artifacts mavenArtifacts */ + mavenArtifacts?: (google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact[]|null); + + /** Artifacts pythonPackages */ + pythonPackages?: (google.devtools.cloudbuild.v1.Artifacts.IPythonPackage[]|null); } /** Represents an Artifacts. */ @@ -2279,6 +2533,12 @@ export namespace google { /** Artifacts objects. */ public objects?: (google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null); + /** Artifacts mavenArtifacts. */ + public mavenArtifacts: google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact[]; + + /** Artifacts pythonPackages. */ + public pythonPackages: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage[]; + /** * Creates a new Artifacts instance using the specified properties. * @param [properties] Properties to set @@ -2467,6 +2727,230 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a MavenArtifact. */ + interface IMavenArtifact { + + /** MavenArtifact repository */ + repository?: (string|null); + + /** MavenArtifact path */ + path?: (string|null); + + /** MavenArtifact artifactId */ + artifactId?: (string|null); + + /** MavenArtifact groupId */ + groupId?: (string|null); + + /** MavenArtifact version */ + version?: (string|null); + } + + /** Represents a MavenArtifact. */ + class MavenArtifact implements IMavenArtifact { + + /** + * Constructs a new MavenArtifact. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact); + + /** MavenArtifact repository. */ + public repository: string; + + /** MavenArtifact path. */ + public path: string; + + /** MavenArtifact artifactId. */ + public artifactId: string; + + /** MavenArtifact groupId. */ + public groupId: string; + + /** MavenArtifact version. */ + public version: string; + + /** + * Creates a new MavenArtifact instance using the specified properties. + * @param [properties] Properties to set + * @returns MavenArtifact instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact): google.devtools.cloudbuild.v1.Artifacts.MavenArtifact; + + /** + * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.verify|verify} messages. + * @param message MavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.verify|verify} messages. + * @param message MavenArtifact message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Artifacts.MavenArtifact; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Artifacts.MavenArtifact; + + /** + * Verifies a MavenArtifact message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MavenArtifact message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MavenArtifact + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Artifacts.MavenArtifact; + + /** + * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. + * @param message MavenArtifact + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Artifacts.MavenArtifact, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MavenArtifact to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MavenArtifact + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonPackage. */ + interface IPythonPackage { + + /** PythonPackage repository */ + repository?: (string|null); + + /** PythonPackage paths */ + paths?: (string[]|null); + } + + /** Represents a PythonPackage. */ + class PythonPackage implements IPythonPackage { + + /** + * Constructs a new PythonPackage. + * @param [properties] Properties to set + */ + constructor(properties?: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage); + + /** PythonPackage repository. */ + public repository: string; + + /** PythonPackage paths. */ + public paths: string[]; + + /** + * Creates a new PythonPackage instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonPackage instance + */ + public static create(properties?: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage): google.devtools.cloudbuild.v1.Artifacts.PythonPackage; + + /** + * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.PythonPackage.verify|verify} messages. + * @param message PythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.PythonPackage.verify|verify} messages. + * @param message PythonPackage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.devtools.cloudbuild.v1.Artifacts.IPythonPackage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonPackage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.devtools.cloudbuild.v1.Artifacts.PythonPackage; + + /** + * Decodes a PythonPackage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonPackage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.devtools.cloudbuild.v1.Artifacts.PythonPackage; + + /** + * Verifies a PythonPackage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonPackage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonPackage + */ + public static fromObject(object: { [k: string]: any }): google.devtools.cloudbuild.v1.Artifacts.PythonPackage; + + /** + * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. + * @param message PythonPackage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.devtools.cloudbuild.v1.Artifacts.PythonPackage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonPackage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonPackage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a TimeSpan. */ diff --git a/packages/google-devtools-cloudbuild/protos/protos.js b/packages/google-devtools-cloudbuild/protos/protos.js index 2a9e38b0773b..d750d27e63d3 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.js +++ b/packages/google-devtools-cloudbuild/protos/protos.js @@ -2735,42 +2735,26 @@ return BuiltImage; })(); - v1.BuildStep = (function() { + v1.UploadedPythonPackage = (function() { /** - * Properties of a BuildStep. + * Properties of an UploadedPythonPackage. * @memberof google.devtools.cloudbuild.v1 - * @interface IBuildStep - * @property {string|null} [name] BuildStep name - * @property {Array.|null} [env] BuildStep env - * @property {Array.|null} [args] BuildStep args - * @property {string|null} [dir] BuildStep dir - * @property {string|null} [id] BuildStep id - * @property {Array.|null} [waitFor] BuildStep waitFor - * @property {string|null} [entrypoint] BuildStep entrypoint - * @property {Array.|null} [secretEnv] BuildStep secretEnv - * @property {Array.|null} [volumes] BuildStep volumes - * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] BuildStep timing - * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pullTiming] BuildStep pullTiming - * @property {google.protobuf.IDuration|null} [timeout] BuildStep timeout - * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] BuildStep status - * @property {string|null} [script] BuildStep script + * @interface IUploadedPythonPackage + * @property {string|null} [uri] UploadedPythonPackage uri + * @property {google.devtools.cloudbuild.v1.IFileHashes|null} [fileHashes] UploadedPythonPackage fileHashes + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pushTiming] UploadedPythonPackage pushTiming */ /** - * Constructs a new BuildStep. + * Constructs a new UploadedPythonPackage. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a BuildStep. - * @implements IBuildStep + * @classdesc Represents an UploadedPythonPackage. + * @implements IUploadedPythonPackage * @constructor - * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IUploadedPythonPackage=} [properties] Properties to set */ - function BuildStep(properties) { - this.env = []; - this.args = []; - this.waitFor = []; - this.secretEnv = []; - this.volumes = []; + function UploadedPythonPackage(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2778,272 +2762,103 @@ } /** - * BuildStep name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.name = ""; - - /** - * BuildStep env. - * @member {Array.} env - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.env = $util.emptyArray; - - /** - * BuildStep args. - * @member {Array.} args - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.args = $util.emptyArray; - - /** - * BuildStep dir. - * @member {string} dir - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.dir = ""; - - /** - * BuildStep id. - * @member {string} id - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.id = ""; - - /** - * BuildStep waitFor. - * @member {Array.} waitFor - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.waitFor = $util.emptyArray; - - /** - * BuildStep entrypoint. - * @member {string} entrypoint - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.entrypoint = ""; - - /** - * BuildStep secretEnv. - * @member {Array.} secretEnv - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.secretEnv = $util.emptyArray; - - /** - * BuildStep volumes. - * @member {Array.} volumes - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.volumes = $util.emptyArray; - - /** - * BuildStep timing. - * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.timing = null; - - /** - * BuildStep pullTiming. - * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pullTiming - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - */ - BuildStep.prototype.pullTiming = null; - - /** - * BuildStep timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.devtools.cloudbuild.v1.BuildStep + * UploadedPythonPackage uri. + * @member {string} uri + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @instance */ - BuildStep.prototype.timeout = null; + UploadedPythonPackage.prototype.uri = ""; /** - * BuildStep status. - * @member {google.devtools.cloudbuild.v1.Build.Status} status - * @memberof google.devtools.cloudbuild.v1.BuildStep + * UploadedPythonPackage fileHashes. + * @member {google.devtools.cloudbuild.v1.IFileHashes|null|undefined} fileHashes + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @instance */ - BuildStep.prototype.status = 0; + UploadedPythonPackage.prototype.fileHashes = null; /** - * BuildStep script. - * @member {string} script - * @memberof google.devtools.cloudbuild.v1.BuildStep + * UploadedPythonPackage pushTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pushTiming + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @instance */ - BuildStep.prototype.script = ""; + UploadedPythonPackage.prototype.pushTiming = null; /** - * Creates a new BuildStep instance using the specified properties. + * Creates a new UploadedPythonPackage instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static - * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep instance + * @param {google.devtools.cloudbuild.v1.IUploadedPythonPackage=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UploadedPythonPackage} UploadedPythonPackage instance */ - BuildStep.create = function create(properties) { - return new BuildStep(properties); + UploadedPythonPackage.create = function create(properties) { + return new UploadedPythonPackage(properties); }; /** - * Encodes the specified BuildStep message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * Encodes the specified UploadedPythonPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedPythonPackage.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static - * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUploadedPythonPackage} message UploadedPythonPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildStep.encode = function encode(message, writer) { + UploadedPythonPackage.encode = function encode(message, writer) { 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.env != null && message.env.length) - for (var i = 0; i < message.env.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.env[i]); - if (message.args != null && message.args.length) - for (var i = 0; i < message.args.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); - if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); - if (message.waitFor != null && message.waitFor.length) - for (var i = 0; i < message.waitFor.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); - if (message.entrypoint != null && Object.hasOwnProperty.call(message, "entrypoint")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.entrypoint); - if (message.secretEnv != null && message.secretEnv.length) - for (var i = 0; i < message.secretEnv.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.secretEnv[i]); - if (message.volumes != null && message.volumes.length) - for (var i = 0; i < message.volumes.length; ++i) - $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) - $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.status); - if (message.pullTiming != null && Object.hasOwnProperty.call(message, "pullTiming")) - $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pullTiming, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.script != null && Object.hasOwnProperty.call(message, "script")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.script); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHashes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pushTiming != null && Object.hasOwnProperty.call(message, "pushTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pushTiming, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified BuildStep message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. + * Encodes the specified UploadedPythonPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedPythonPackage.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static - * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUploadedPythonPackage} message UploadedPythonPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BuildStep.encodeDelimited = function encodeDelimited(message, writer) { + UploadedPythonPackage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BuildStep message from the specified reader or buffer. + * Decodes an UploadedPythonPackage message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + * @returns {google.devtools.cloudbuild.v1.UploadedPythonPackage} UploadedPythonPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildStep.decode = function decode(reader, length) { + UploadedPythonPackage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildStep(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UploadedPythonPackage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.uri = reader.string(); break; } case 2: { - if (!(message.env && message.env.length)) - message.env = []; - message.env.push(reader.string()); + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.args && message.args.length)) - message.args = []; - message.args.push(reader.string()); - break; - } - case 4: { - message.dir = reader.string(); - break; - } - case 5: { - message.id = reader.string(); - break; - } - case 6: { - if (!(message.waitFor && message.waitFor.length)) - message.waitFor = []; - message.waitFor.push(reader.string()); - break; - } - case 7: { - message.entrypoint = reader.string(); - break; - } - case 8: { - if (!(message.secretEnv && message.secretEnv.length)) - message.secretEnv = []; - message.secretEnv.push(reader.string()); - break; - } - case 9: { - if (!(message.volumes && message.volumes.length)) - message.volumes = []; - message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); - break; - } - case 10: { - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - } - case 13: { - message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - } - case 11: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 12: { - message.status = reader.int32(); - break; - } - case 19: { - message.script = reader.string(); + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); break; } default: @@ -3055,369 +2870,151 @@ }; /** - * Decodes a BuildStep message from the specified reader or buffer, length delimited. + * Decodes an UploadedPythonPackage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + * @returns {google.devtools.cloudbuild.v1.UploadedPythonPackage} UploadedPythonPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BuildStep.decodeDelimited = function decodeDelimited(reader) { + UploadedPythonPackage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BuildStep message. + * Verifies an UploadedPythonPackage message. * @function verify - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BuildStep.verify = function verify(message) { + UploadedPythonPackage.verify = function verify(message) { if (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.env != null && message.hasOwnProperty("env")) { - if (!Array.isArray(message.env)) - return "env: array expected"; - for (var i = 0; i < message.env.length; ++i) - if (!$util.isString(message.env[i])) - return "env: string[] expected"; - } - if (message.args != null && message.hasOwnProperty("args")) { - if (!Array.isArray(message.args)) - return "args: array expected"; - for (var i = 0; i < message.args.length; ++i) - if (!$util.isString(message.args[i])) - return "args: string[] expected"; - } - if (message.dir != null && message.hasOwnProperty("dir")) - if (!$util.isString(message.dir)) - return "dir: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.waitFor != null && message.hasOwnProperty("waitFor")) { - if (!Array.isArray(message.waitFor)) - return "waitFor: array expected"; - for (var i = 0; i < message.waitFor.length; ++i) - if (!$util.isString(message.waitFor[i])) - return "waitFor: string[] expected"; - } - if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) - if (!$util.isString(message.entrypoint)) - return "entrypoint: string expected"; - if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { - if (!Array.isArray(message.secretEnv)) - return "secretEnv: array expected"; - for (var i = 0; i < message.secretEnv.length; ++i) - if (!$util.isString(message.secretEnv[i])) - return "secretEnv: string[] expected"; - } - if (message.volumes != null && message.hasOwnProperty("volumes")) { - if (!Array.isArray(message.volumes)) - return "volumes: array expected"; - for (var i = 0; i < message.volumes.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); - if (error) - return "volumes." + error; - } - } - if (message.timing != null && message.hasOwnProperty("timing")) { - var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); - if (error) - return "timing." + error; - } - if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) { - var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pullTiming); + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHashes); if (error) - return "pullTiming." + error; + return "fileHashes." + error; } - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pushTiming); if (error) - return "timeout." + error; + return "pushTiming." + error; } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 10: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 9: - break; - } - if (message.script != null && message.hasOwnProperty("script")) - if (!$util.isString(message.script)) - return "script: string expected"; return null; }; /** - * Creates a BuildStep message from a plain object. Also converts values to their respective internal types. + * Creates an UploadedPythonPackage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep + * @returns {google.devtools.cloudbuild.v1.UploadedPythonPackage} UploadedPythonPackage */ - BuildStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.BuildStep) + UploadedPythonPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UploadedPythonPackage) return object; - var message = new $root.google.devtools.cloudbuild.v1.BuildStep(); - if (object.name != null) - message.name = String(object.name); - if (object.env) { - if (!Array.isArray(object.env)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.env: array expected"); - message.env = []; - for (var i = 0; i < object.env.length; ++i) - message.env[i] = String(object.env[i]); - } - if (object.args) { - if (!Array.isArray(object.args)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.args: array expected"); - message.args = []; - for (var i = 0; i < object.args.length; ++i) - message.args[i] = String(object.args[i]); - } - if (object.dir != null) - message.dir = String(object.dir); - if (object.id != null) - message.id = String(object.id); - if (object.waitFor) { - if (!Array.isArray(object.waitFor)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.waitFor: array expected"); - message.waitFor = []; - for (var i = 0; i < object.waitFor.length; ++i) - message.waitFor[i] = String(object.waitFor[i]); - } - if (object.entrypoint != null) - message.entrypoint = String(object.entrypoint); - if (object.secretEnv) { - if (!Array.isArray(object.secretEnv)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.secretEnv: array expected"); - message.secretEnv = []; - for (var i = 0; i < object.secretEnv.length; ++i) - message.secretEnv[i] = String(object.secretEnv[i]); - } - if (object.volumes) { - if (!Array.isArray(object.volumes)) - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: array expected"); - message.volumes = []; - for (var i = 0; i < object.volumes.length; ++i) { - if (typeof object.volumes[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: object expected"); - message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); - } - } - if (object.timing != null) { - if (typeof object.timing !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timing: object expected"); - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); - } - if (object.pullTiming != null) { - if (typeof object.pullTiming !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.pullTiming: object expected"); - message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pullTiming); - } - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + var message = new $root.google.devtools.cloudbuild.v1.UploadedPythonPackage(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.fileHashes != null) { + if (typeof object.fileHashes !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedPythonPackage.fileHashes: object expected"); + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHashes); } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNKNOWN": - case 0: - message.status = 0; - break; - case "PENDING": - case 10: - message.status = 10; - break; - case "QUEUED": - case 1: - message.status = 1; - break; - case "WORKING": - case 2: - message.status = 2; - break; - case "SUCCESS": - case 3: - message.status = 3; - break; - case "FAILURE": - case 4: - message.status = 4; - break; - case "INTERNAL_ERROR": - case 5: - message.status = 5; - break; - case "TIMEOUT": - case 6: - message.status = 6; - break; - case "CANCELLED": - case 7: - message.status = 7; - break; - case "EXPIRED": - case 9: - message.status = 9; - break; + if (object.pushTiming != null) { + if (typeof object.pushTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedPythonPackage.pushTiming: object expected"); + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pushTiming); } - if (object.script != null) - message.script = String(object.script); return message; }; /** - * Creates a plain object from a BuildStep message. Also converts values to other types if specified. + * Creates a plain object from an UploadedPythonPackage message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.BuildStep + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage * @static - * @param {google.devtools.cloudbuild.v1.BuildStep} message BuildStep + * @param {google.devtools.cloudbuild.v1.UploadedPythonPackage} message UploadedPythonPackage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BuildStep.toObject = function toObject(message, options) { + UploadedPythonPackage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.env = []; - object.args = []; - object.waitFor = []; - object.secretEnv = []; - object.volumes = []; - } if (options.defaults) { - object.name = ""; - object.dir = ""; - object.id = ""; - object.entrypoint = ""; - object.timing = null; - object.timeout = null; - object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; - object.pullTiming = null; - object.script = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.env && message.env.length) { - object.env = []; - for (var j = 0; j < message.env.length; ++j) - object.env[j] = message.env[j]; - } - if (message.args && message.args.length) { - object.args = []; - for (var j = 0; j < message.args.length; ++j) - object.args[j] = message.args[j]; + object.uri = ""; + object.fileHashes = null; + object.pushTiming = null; } - if (message.dir != null && message.hasOwnProperty("dir")) - object.dir = message.dir; - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.waitFor && message.waitFor.length) { - object.waitFor = []; - for (var j = 0; j < message.waitFor.length; ++j) - object.waitFor[j] = message.waitFor[j]; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) + object.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHashes, options); + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + object.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pushTiming, options); + return object; + }; + + /** + * Converts this UploadedPythonPackage to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage + * @instance + * @returns {Object.} JSON object + */ + UploadedPythonPackage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UploadedPythonPackage + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.UploadedPythonPackage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UploadedPythonPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) - object.entrypoint = message.entrypoint; - if (message.secretEnv && message.secretEnv.length) { - object.secretEnv = []; - for (var j = 0; j < message.secretEnv.length; ++j) - object.secretEnv[j] = message.secretEnv[j]; - } - if (message.volumes && message.volumes.length) { - object.volumes = []; - for (var j = 0; j < message.volumes.length; ++j) - object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); - } - if (message.timing != null && message.hasOwnProperty("timing")) - object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; - if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) - object.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pullTiming, options); - if (message.script != null && message.hasOwnProperty("script")) - object.script = message.script; - return object; - }; - - /** - * Converts this BuildStep to JSON. - * @function toJSON - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @instance - * @returns {Object.} JSON object - */ - BuildStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BuildStep - * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.BuildStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BuildStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildStep"; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UploadedPythonPackage"; }; - return BuildStep; + return UploadedPythonPackage; })(); - v1.Volume = (function() { + v1.UploadedMavenArtifact = (function() { /** - * Properties of a Volume. + * Properties of an UploadedMavenArtifact. * @memberof google.devtools.cloudbuild.v1 - * @interface IVolume - * @property {string|null} [name] Volume name - * @property {string|null} [path] Volume path + * @interface IUploadedMavenArtifact + * @property {string|null} [uri] UploadedMavenArtifact uri + * @property {google.devtools.cloudbuild.v1.IFileHashes|null} [fileHashes] UploadedMavenArtifact fileHashes + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pushTiming] UploadedMavenArtifact pushTiming */ /** - * Constructs a new Volume. + * Constructs a new UploadedMavenArtifact. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a Volume. - * @implements IVolume + * @classdesc Represents an UploadedMavenArtifact. + * @implements IUploadedMavenArtifact * @constructor - * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IUploadedMavenArtifact=} [properties] Properties to set */ - function Volume(properties) { + function UploadedMavenArtifact(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3425,89 +3022,103 @@ } /** - * Volume name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.Volume + * UploadedMavenArtifact uri. + * @member {string} uri + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @instance */ - Volume.prototype.name = ""; + UploadedMavenArtifact.prototype.uri = ""; /** - * Volume path. - * @member {string} path - * @memberof google.devtools.cloudbuild.v1.Volume + * UploadedMavenArtifact fileHashes. + * @member {google.devtools.cloudbuild.v1.IFileHashes|null|undefined} fileHashes + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @instance */ - Volume.prototype.path = ""; + UploadedMavenArtifact.prototype.fileHashes = null; /** - * Creates a new Volume instance using the specified properties. + * UploadedMavenArtifact pushTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pushTiming + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact + * @instance + */ + UploadedMavenArtifact.prototype.pushTiming = null; + + /** + * Creates a new UploadedMavenArtifact instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static - * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Volume} Volume instance + * @param {google.devtools.cloudbuild.v1.IUploadedMavenArtifact=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.UploadedMavenArtifact} UploadedMavenArtifact instance */ - Volume.create = function create(properties) { - return new Volume(properties); + UploadedMavenArtifact.create = function create(properties) { + return new UploadedMavenArtifact(properties); }; /** - * Encodes the specified Volume message. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * Encodes the specified UploadedMavenArtifact message. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedMavenArtifact.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static - * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUploadedMavenArtifact} message UploadedMavenArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Volume.encode = function encode(message, writer) { + UploadedMavenArtifact.encode = function encode(message, writer) { 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.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.uri != null && Object.hasOwnProperty.call(message, "uri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri); + if (message.fileHashes != null && Object.hasOwnProperty.call(message, "fileHashes")) + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHashes, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pushTiming != null && Object.hasOwnProperty.call(message, "pushTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pushTiming, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. + * Encodes the specified UploadedMavenArtifact message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.UploadedMavenArtifact.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static - * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IUploadedMavenArtifact} message UploadedMavenArtifact message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Volume.encodeDelimited = function encodeDelimited(message, writer) { + UploadedMavenArtifact.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Volume message from the specified reader or buffer. + * Decodes an UploadedMavenArtifact message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Volume} Volume + * @returns {google.devtools.cloudbuild.v1.UploadedMavenArtifact} UploadedMavenArtifact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.decode = function decode(reader, length) { + UploadedMavenArtifact.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Volume(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.uri = reader.string(); break; } case 2: { - message.path = reader.string(); + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); break; } default: @@ -3519,139 +3130,171 @@ }; /** - * Decodes a Volume message from the specified reader or buffer, length delimited. + * Decodes an UploadedMavenArtifact message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Volume} Volume + * @returns {google.devtools.cloudbuild.v1.UploadedMavenArtifact} UploadedMavenArtifact * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Volume.decodeDelimited = function decodeDelimited(reader) { + UploadedMavenArtifact.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Volume message. + * Verifies an UploadedMavenArtifact message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Volume.verify = function verify(message) { + UploadedMavenArtifact.verify = function verify(message) { if (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.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; + if (message.uri != null && message.hasOwnProperty("uri")) + if (!$util.isString(message.uri)) + return "uri: string expected"; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHashes); + if (error) + return "fileHashes." + error; + } + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pushTiming); + if (error) + return "pushTiming." + error; + } return null; }; /** - * Creates a Volume message from a plain object. Also converts values to their respective internal types. + * Creates an UploadedMavenArtifact message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Volume} Volume + * @returns {google.devtools.cloudbuild.v1.UploadedMavenArtifact} UploadedMavenArtifact */ - Volume.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Volume) + UploadedMavenArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact) return object; - var message = new $root.google.devtools.cloudbuild.v1.Volume(); - if (object.name != null) - message.name = String(object.name); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact(); + if (object.uri != null) + message.uri = String(object.uri); + if (object.fileHashes != null) { + if (typeof object.fileHashes !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedMavenArtifact.fileHashes: object expected"); + message.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHashes); + } + if (object.pushTiming != null) { + if (typeof object.pushTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.UploadedMavenArtifact.pushTiming: object expected"); + message.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pushTiming); + } return message; }; /** - * Creates a plain object from a Volume message. Also converts values to other types if specified. + * Creates a plain object from an UploadedMavenArtifact message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static - * @param {google.devtools.cloudbuild.v1.Volume} message Volume + * @param {google.devtools.cloudbuild.v1.UploadedMavenArtifact} message UploadedMavenArtifact * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Volume.toObject = function toObject(message, options) { + UploadedMavenArtifact.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.path = ""; + object.uri = ""; + object.fileHashes = null; + object.pushTiming = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.uri != null && message.hasOwnProperty("uri")) + object.uri = message.uri; + if (message.fileHashes != null && message.hasOwnProperty("fileHashes")) + object.fileHashes = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHashes, options); + if (message.pushTiming != null && message.hasOwnProperty("pushTiming")) + object.pushTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pushTiming, options); return object; }; /** - * Converts this Volume to JSON. + * Converts this UploadedMavenArtifact to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @instance * @returns {Object.} JSON object */ - Volume.prototype.toJSON = function toJSON() { + UploadedMavenArtifact.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Volume + * Gets the default type url for UploadedMavenArtifact * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Volume + * @memberof google.devtools.cloudbuild.v1.UploadedMavenArtifact * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UploadedMavenArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Volume"; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.UploadedMavenArtifact"; }; - return Volume; + return UploadedMavenArtifact; })(); - v1.Results = (function() { + v1.BuildStep = (function() { /** - * Properties of a Results. + * Properties of a BuildStep. * @memberof google.devtools.cloudbuild.v1 - * @interface IResults - * @property {Array.|null} [images] Results images - * @property {Array.|null} [buildStepImages] Results buildStepImages - * @property {string|null} [artifactManifest] Results artifactManifest - * @property {number|Long|null} [numArtifacts] Results numArtifacts - * @property {Array.|null} [buildStepOutputs] Results buildStepOutputs - * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [artifactTiming] Results artifactTiming + * @interface IBuildStep + * @property {string|null} [name] BuildStep name + * @property {Array.|null} [env] BuildStep env + * @property {Array.|null} [args] BuildStep args + * @property {string|null} [dir] BuildStep dir + * @property {string|null} [id] BuildStep id + * @property {Array.|null} [waitFor] BuildStep waitFor + * @property {string|null} [entrypoint] BuildStep entrypoint + * @property {Array.|null} [secretEnv] BuildStep secretEnv + * @property {Array.|null} [volumes] BuildStep volumes + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] BuildStep timing + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [pullTiming] BuildStep pullTiming + * @property {google.protobuf.IDuration|null} [timeout] BuildStep timeout + * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] BuildStep status + * @property {boolean|null} [allowFailure] BuildStep allowFailure + * @property {number|null} [exitCode] BuildStep exitCode + * @property {Array.|null} [allowExitCodes] BuildStep allowExitCodes + * @property {string|null} [script] BuildStep script */ /** - * Constructs a new Results. + * Constructs a new BuildStep. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a Results. - * @implements IResults + * @classdesc Represents a BuildStep. + * @implements IBuildStep * @constructor - * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set */ - function Results(properties) { - this.images = []; - this.buildStepImages = []; - this.buildStepOutputs = []; + function BuildStep(properties) { + this.env = []; + this.args = []; + this.waitFor = []; + this.secretEnv = []; + this.volumes = []; + this.allowExitCodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3659,154 +3302,325 @@ } /** - * Results images. - * @member {Array.} images - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.images = $util.emptyArray; + BuildStep.prototype.name = ""; /** - * Results buildStepImages. - * @member {Array.} buildStepImages - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep env. + * @member {Array.} env + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.buildStepImages = $util.emptyArray; + BuildStep.prototype.env = $util.emptyArray; /** - * Results artifactManifest. - * @member {string} artifactManifest - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep args. + * @member {Array.} args + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.artifactManifest = ""; + BuildStep.prototype.args = $util.emptyArray; /** - * Results numArtifacts. - * @member {number|Long} numArtifacts - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep dir. + * @member {string} dir + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.numArtifacts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + BuildStep.prototype.dir = ""; /** - * Results buildStepOutputs. - * @member {Array.} buildStepOutputs - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.buildStepOutputs = $util.emptyArray; + BuildStep.prototype.id = ""; /** - * Results artifactTiming. - * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} artifactTiming - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep waitFor. + * @member {Array.} waitFor + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance */ - Results.prototype.artifactTiming = null; + BuildStep.prototype.waitFor = $util.emptyArray; /** - * Creates a new Results instance using the specified properties. - * @function create - * @memberof google.devtools.cloudbuild.v1.Results + * BuildStep entrypoint. + * @member {string} entrypoint + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.entrypoint = ""; + + /** + * BuildStep secretEnv. + * @member {Array.} secretEnv + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.secretEnv = $util.emptyArray; + + /** + * BuildStep volumes. + * @member {Array.} volumes + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.volumes = $util.emptyArray; + + /** + * BuildStep timing. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.timing = null; + + /** + * BuildStep pullTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} pullTiming + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.pullTiming = null; + + /** + * BuildStep timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.timeout = null; + + /** + * BuildStep status. + * @member {google.devtools.cloudbuild.v1.Build.Status} status + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.status = 0; + + /** + * BuildStep allowFailure. + * @member {boolean} allowFailure + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.allowFailure = false; + + /** + * BuildStep exitCode. + * @member {number} exitCode + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.exitCode = 0; + + /** + * BuildStep allowExitCodes. + * @member {Array.} allowExitCodes + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.allowExitCodes = $util.emptyArray; + + /** + * BuildStep script. + * @member {string} script + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @instance + */ + BuildStep.prototype.script = ""; + + /** + * Creates a new BuildStep instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static - * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Results} Results instance + * @param {google.devtools.cloudbuild.v1.IBuildStep=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep instance */ - Results.create = function create(properties) { - return new Results(properties); + BuildStep.create = function create(properties) { + return new BuildStep(properties); }; /** - * Encodes the specified Results message. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * Encodes the specified BuildStep message. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static - * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Results.encode = function encode(message, writer) { + BuildStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.images != null && message.images.length) - for (var i = 0; i < message.images.length; ++i) - $root.google.devtools.cloudbuild.v1.BuiltImage.encode(message.images[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.buildStepImages != null && message.buildStepImages.length) - for (var i = 0; i < message.buildStepImages.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.buildStepImages[i]); - if (message.artifactManifest != null && Object.hasOwnProperty.call(message, "artifactManifest")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactManifest); - if (message.numArtifacts != null && Object.hasOwnProperty.call(message, "numArtifacts")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.numArtifacts); - if (message.buildStepOutputs != null && message.buildStepOutputs.length) - for (var i = 0; i < message.buildStepOutputs.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.buildStepOutputs[i]); - if (message.artifactTiming != null && Object.hasOwnProperty.call(message, "artifactTiming")) - $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.artifactTiming, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.env != null && message.env.length) + for (var i = 0; i < message.env.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.env[i]); + if (message.args != null && message.args.length) + for (var i = 0; i < message.args.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.args[i]); + if (message.dir != null && Object.hasOwnProperty.call(message, "dir")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dir); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.id); + if (message.waitFor != null && message.waitFor.length) + for (var i = 0; i < message.waitFor.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.waitFor[i]); + if (message.entrypoint != null && Object.hasOwnProperty.call(message, "entrypoint")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.entrypoint); + if (message.secretEnv != null && message.secretEnv.length) + for (var i = 0; i < message.secretEnv.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.secretEnv[i]); + if (message.volumes != null && message.volumes.length) + for (var i = 0; i < message.volumes.length; ++i) + $root.google.devtools.cloudbuild.v1.Volume.encode(message.volumes[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.status); + if (message.pullTiming != null && Object.hasOwnProperty.call(message, "pullTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.pullTiming, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.allowFailure != null && Object.hasOwnProperty.call(message, "allowFailure")) + writer.uint32(/* id 14, wireType 0 =*/112).bool(message.allowFailure); + if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.exitCode); + if (message.allowExitCodes != null && message.allowExitCodes.length) { + writer.uint32(/* id 18, wireType 2 =*/146).fork(); + for (var i = 0; i < message.allowExitCodes.length; ++i) + writer.int32(message.allowExitCodes[i]); + writer.ldelim(); + } + if (message.script != null && Object.hasOwnProperty.call(message, "script")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.script); return writer; }; /** - * Encodes the specified Results message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * Encodes the specified BuildStep message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.BuildStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static - * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IBuildStep} message BuildStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Results.encodeDelimited = function encodeDelimited(message, writer) { + BuildStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Results message from the specified reader or buffer. + * Decodes a BuildStep message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Results} Results + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Results.decode = function decode(reader, length) { + BuildStep.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Results(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.BuildStep(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - if (!(message.images && message.images.length)) - message.images = []; - message.images.push($root.google.devtools.cloudbuild.v1.BuiltImage.decode(reader, reader.uint32())); + if (!(message.env && message.env.length)) + message.env = []; + message.env.push(reader.string()); break; } case 3: { - if (!(message.buildStepImages && message.buildStepImages.length)) - message.buildStepImages = []; - message.buildStepImages.push(reader.string()); + if (!(message.args && message.args.length)) + message.args = []; + message.args.push(reader.string()); break; } case 4: { - message.artifactManifest = reader.string(); + message.dir = reader.string(); break; } case 5: { - message.numArtifacts = reader.int64(); + message.id = reader.string(); break; } case 6: { - if (!(message.buildStepOutputs && message.buildStepOutputs.length)) - message.buildStepOutputs = []; - message.buildStepOutputs.push(reader.bytes()); + if (!(message.waitFor && message.waitFor.length)) + message.waitFor = []; + message.waitFor.push(reader.string()); break; } case 7: { - message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + message.entrypoint = reader.string(); + break; + } + case 8: { + if (!(message.secretEnv && message.secretEnv.length)) + message.secretEnv = []; + message.secretEnv.push(reader.string()); + break; + } + case 9: { + if (!(message.volumes && message.volumes.length)) + message.volumes = []; + message.volumes.push($root.google.devtools.cloudbuild.v1.Volume.decode(reader, reader.uint32())); + break; + } + case 10: { + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + case 13: { + message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + case 11: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 12: { + message.status = reader.int32(); + break; + } + case 14: { + message.allowFailure = reader.bool(); + break; + } + case 16: { + message.exitCode = reader.int32(); + break; + } + case 18: { + if (!(message.allowExitCodes && message.allowExitCodes.length)) + message.allowExitCodes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.allowExitCodes.push(reader.int32()); + } else + message.allowExitCodes.push(reader.int32()); + break; + } + case 19: { + message.script = reader.string(); break; } default: @@ -3818,230 +3632,405 @@ }; /** - * Decodes a Results message from the specified reader or buffer, length delimited. + * Decodes a BuildStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Results} Results + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Results.decodeDelimited = function decodeDelimited(reader) { + BuildStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Results message. + * Verifies a BuildStep message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Results.verify = function verify(message) { + BuildStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.images != null && message.hasOwnProperty("images")) { - if (!Array.isArray(message.images)) - return "images: array expected"; - for (var i = 0; i < message.images.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.BuiltImage.verify(message.images[i]); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.env != null && message.hasOwnProperty("env")) { + if (!Array.isArray(message.env)) + return "env: array expected"; + for (var i = 0; i < message.env.length; ++i) + if (!$util.isString(message.env[i])) + return "env: string[] expected"; + } + if (message.args != null && message.hasOwnProperty("args")) { + if (!Array.isArray(message.args)) + return "args: array expected"; + for (var i = 0; i < message.args.length; ++i) + if (!$util.isString(message.args[i])) + return "args: string[] expected"; + } + if (message.dir != null && message.hasOwnProperty("dir")) + if (!$util.isString(message.dir)) + return "dir: string expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.waitFor != null && message.hasOwnProperty("waitFor")) { + if (!Array.isArray(message.waitFor)) + return "waitFor: array expected"; + for (var i = 0; i < message.waitFor.length; ++i) + if (!$util.isString(message.waitFor[i])) + return "waitFor: string[] expected"; + } + if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + if (!$util.isString(message.entrypoint)) + return "entrypoint: string expected"; + if (message.secretEnv != null && message.hasOwnProperty("secretEnv")) { + if (!Array.isArray(message.secretEnv)) + return "secretEnv: array expected"; + for (var i = 0; i < message.secretEnv.length; ++i) + if (!$util.isString(message.secretEnv[i])) + return "secretEnv: string[] expected"; + } + if (message.volumes != null && message.hasOwnProperty("volumes")) { + if (!Array.isArray(message.volumes)) + return "volumes: array expected"; + for (var i = 0; i < message.volumes.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Volume.verify(message.volumes[i]); if (error) - return "images." + error; + return "volumes." + error; } } - if (message.buildStepImages != null && message.hasOwnProperty("buildStepImages")) { - if (!Array.isArray(message.buildStepImages)) - return "buildStepImages: array expected"; - for (var i = 0; i < message.buildStepImages.length; ++i) - if (!$util.isString(message.buildStepImages[i])) - return "buildStepImages: string[] expected"; + if (message.timing != null && message.hasOwnProperty("timing")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); + if (error) + return "timing." + error; } - if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) - if (!$util.isString(message.artifactManifest)) - return "artifactManifest: string expected"; - if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) - if (!$util.isInteger(message.numArtifacts) && !(message.numArtifacts && $util.isInteger(message.numArtifacts.low) && $util.isInteger(message.numArtifacts.high))) - return "numArtifacts: integer|Long expected"; - if (message.buildStepOutputs != null && message.hasOwnProperty("buildStepOutputs")) { - if (!Array.isArray(message.buildStepOutputs)) - return "buildStepOutputs: array expected"; - for (var i = 0; i < message.buildStepOutputs.length; ++i) - if (!(message.buildStepOutputs[i] && typeof message.buildStepOutputs[i].length === "number" || $util.isString(message.buildStepOutputs[i]))) - return "buildStepOutputs: buffer[] expected"; + if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.pullTiming); + if (error) + return "pullTiming." + error; } - if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) { - var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.artifactTiming); + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); if (error) - return "artifactTiming." + error; + return "timeout." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 10: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + break; + } + if (message.allowFailure != null && message.hasOwnProperty("allowFailure")) + if (typeof message.allowFailure !== "boolean") + return "allowFailure: boolean expected"; + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + if (!$util.isInteger(message.exitCode)) + return "exitCode: integer expected"; + if (message.allowExitCodes != null && message.hasOwnProperty("allowExitCodes")) { + if (!Array.isArray(message.allowExitCodes)) + return "allowExitCodes: array expected"; + for (var i = 0; i < message.allowExitCodes.length; ++i) + if (!$util.isInteger(message.allowExitCodes[i])) + return "allowExitCodes: integer[] expected"; } + if (message.script != null && message.hasOwnProperty("script")) + if (!$util.isString(message.script)) + return "script: string expected"; return null; }; /** - * Creates a Results message from a plain object. Also converts values to their respective internal types. + * Creates a BuildStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Results} Results + * @returns {google.devtools.cloudbuild.v1.BuildStep} BuildStep */ - Results.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Results) + BuildStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.BuildStep) return object; - var message = new $root.google.devtools.cloudbuild.v1.Results(); - if (object.images) { - if (!Array.isArray(object.images)) - throw TypeError(".google.devtools.cloudbuild.v1.Results.images: array expected"); - message.images = []; - for (var i = 0; i < object.images.length; ++i) { - if (typeof object.images[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Results.images: object expected"); - message.images[i] = $root.google.devtools.cloudbuild.v1.BuiltImage.fromObject(object.images[i]); - } - } - if (object.buildStepImages) { - if (!Array.isArray(object.buildStepImages)) - throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepImages: array expected"); - message.buildStepImages = []; - for (var i = 0; i < object.buildStepImages.length; ++i) - message.buildStepImages[i] = String(object.buildStepImages[i]); + var message = new $root.google.devtools.cloudbuild.v1.BuildStep(); + if (object.name != null) + message.name = String(object.name); + if (object.env) { + if (!Array.isArray(object.env)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.env: array expected"); + message.env = []; + for (var i = 0; i < object.env.length; ++i) + message.env[i] = String(object.env[i]); } - if (object.artifactManifest != null) - message.artifactManifest = String(object.artifactManifest); - if (object.numArtifacts != null) - if ($util.Long) - (message.numArtifacts = $util.Long.fromValue(object.numArtifacts)).unsigned = false; - else if (typeof object.numArtifacts === "string") - message.numArtifacts = parseInt(object.numArtifacts, 10); - else if (typeof object.numArtifacts === "number") - message.numArtifacts = object.numArtifacts; - else if (typeof object.numArtifacts === "object") - message.numArtifacts = new $util.LongBits(object.numArtifacts.low >>> 0, object.numArtifacts.high >>> 0).toNumber(); - if (object.buildStepOutputs) { - if (!Array.isArray(object.buildStepOutputs)) - throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepOutputs: array expected"); - message.buildStepOutputs = []; - for (var i = 0; i < object.buildStepOutputs.length; ++i) - if (typeof object.buildStepOutputs[i] === "string") - $util.base64.decode(object.buildStepOutputs[i], message.buildStepOutputs[i] = $util.newBuffer($util.base64.length(object.buildStepOutputs[i])), 0); - else if (object.buildStepOutputs[i].length >= 0) - message.buildStepOutputs[i] = object.buildStepOutputs[i]; + if (object.args) { + if (!Array.isArray(object.args)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.args: array expected"); + message.args = []; + for (var i = 0; i < object.args.length; ++i) + message.args[i] = String(object.args[i]); } - if (object.artifactTiming != null) { - if (typeof object.artifactTiming !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Results.artifactTiming: object expected"); - message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.artifactTiming); + if (object.dir != null) + message.dir = String(object.dir); + if (object.id != null) + message.id = String(object.id); + if (object.waitFor) { + if (!Array.isArray(object.waitFor)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.waitFor: array expected"); + message.waitFor = []; + for (var i = 0; i < object.waitFor.length; ++i) + message.waitFor[i] = String(object.waitFor[i]); } - return message; - }; - - /** - * Creates a plain object from a Results message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.cloudbuild.v1.Results - * @static - * @param {google.devtools.cloudbuild.v1.Results} message Results - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Results.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.images = []; - object.buildStepImages = []; - object.buildStepOutputs = []; + if (object.entrypoint != null) + message.entrypoint = String(object.entrypoint); + if (object.secretEnv) { + if (!Array.isArray(object.secretEnv)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.secretEnv: array expected"); + message.secretEnv = []; + for (var i = 0; i < object.secretEnv.length; ++i) + message.secretEnv[i] = String(object.secretEnv[i]); } - if (options.defaults) { - object.artifactManifest = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.numArtifacts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numArtifacts = options.longs === String ? "0" : 0; - object.artifactTiming = null; + if (object.volumes) { + if (!Array.isArray(object.volumes)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: array expected"); + message.volumes = []; + for (var i = 0; i < object.volumes.length; ++i) { + if (typeof object.volumes[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.volumes: object expected"); + message.volumes[i] = $root.google.devtools.cloudbuild.v1.Volume.fromObject(object.volumes[i]); + } } - if (message.images && message.images.length) { - object.images = []; - for (var j = 0; j < message.images.length; ++j) - object.images[j] = $root.google.devtools.cloudbuild.v1.BuiltImage.toObject(message.images[j], options); + if (object.timing != null) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timing: object expected"); + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); } - if (message.buildStepImages && message.buildStepImages.length) { - object.buildStepImages = []; - for (var j = 0; j < message.buildStepImages.length; ++j) - object.buildStepImages[j] = message.buildStepImages[j]; + if (object.pullTiming != null) { + if (typeof object.pullTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.pullTiming: object expected"); + message.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.pullTiming); } - if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) - object.artifactManifest = message.artifactManifest; - if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) - if (typeof message.numArtifacts === "number") - object.numArtifacts = options.longs === String ? String(message.numArtifacts) : message.numArtifacts; - else - object.numArtifacts = options.longs === String ? $util.Long.prototype.toString.call(message.numArtifacts) : options.longs === Number ? new $util.LongBits(message.numArtifacts.low >>> 0, message.numArtifacts.high >>> 0).toNumber() : message.numArtifacts; - if (message.buildStepOutputs && message.buildStepOutputs.length) { - object.buildStepOutputs = []; - for (var j = 0; j < message.buildStepOutputs.length; ++j) - object.buildStepOutputs[j] = options.bytes === String ? $util.base64.encode(message.buildStepOutputs[j], 0, message.buildStepOutputs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.buildStepOutputs[j]) : message.buildStepOutputs[j]; + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); } - if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) - object.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.artifactTiming, options); - return object; + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNKNOWN": + case 0: + message.status = 0; + break; + case "PENDING": + case 10: + message.status = 10; + break; + case "QUEUED": + case 1: + message.status = 1; + break; + case "WORKING": + case 2: + message.status = 2; + break; + case "SUCCESS": + case 3: + message.status = 3; + break; + case "FAILURE": + case 4: + message.status = 4; + break; + case "INTERNAL_ERROR": + case 5: + message.status = 5; + break; + case "TIMEOUT": + case 6: + message.status = 6; + break; + case "CANCELLED": + case 7: + message.status = 7; + break; + case "EXPIRED": + case 9: + message.status = 9; + break; + } + if (object.allowFailure != null) + message.allowFailure = Boolean(object.allowFailure); + if (object.exitCode != null) + message.exitCode = object.exitCode | 0; + if (object.allowExitCodes) { + if (!Array.isArray(object.allowExitCodes)) + throw TypeError(".google.devtools.cloudbuild.v1.BuildStep.allowExitCodes: array expected"); + message.allowExitCodes = []; + for (var i = 0; i < object.allowExitCodes.length; ++i) + message.allowExitCodes[i] = object.allowExitCodes[i] | 0; + } + if (object.script != null) + message.script = String(object.script); + return message; }; /** - * Converts this Results to JSON. + * Creates a plain object from a BuildStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.BuildStep + * @static + * @param {google.devtools.cloudbuild.v1.BuildStep} message BuildStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BuildStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.env = []; + object.args = []; + object.waitFor = []; + object.secretEnv = []; + object.volumes = []; + object.allowExitCodes = []; + } + if (options.defaults) { + object.name = ""; + object.dir = ""; + object.id = ""; + object.entrypoint = ""; + object.timing = null; + object.timeout = null; + object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; + object.pullTiming = null; + object.allowFailure = false; + object.exitCode = 0; + object.script = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.env && message.env.length) { + object.env = []; + for (var j = 0; j < message.env.length; ++j) + object.env[j] = message.env[j]; + } + if (message.args && message.args.length) { + object.args = []; + for (var j = 0; j < message.args.length; ++j) + object.args[j] = message.args[j]; + } + if (message.dir != null && message.hasOwnProperty("dir")) + object.dir = message.dir; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.waitFor && message.waitFor.length) { + object.waitFor = []; + for (var j = 0; j < message.waitFor.length; ++j) + object.waitFor[j] = message.waitFor[j]; + } + if (message.entrypoint != null && message.hasOwnProperty("entrypoint")) + object.entrypoint = message.entrypoint; + if (message.secretEnv && message.secretEnv.length) { + object.secretEnv = []; + for (var j = 0; j < message.secretEnv.length; ++j) + object.secretEnv[j] = message.secretEnv[j]; + } + if (message.volumes && message.volumes.length) { + object.volumes = []; + for (var j = 0; j < message.volumes.length; ++j) + object.volumes[j] = $root.google.devtools.cloudbuild.v1.Volume.toObject(message.volumes[j], options); + } + if (message.timing != null && message.hasOwnProperty("timing")) + object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + if (message.pullTiming != null && message.hasOwnProperty("pullTiming")) + object.pullTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.pullTiming, options); + if (message.allowFailure != null && message.hasOwnProperty("allowFailure")) + object.allowFailure = message.allowFailure; + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + object.exitCode = message.exitCode; + if (message.allowExitCodes && message.allowExitCodes.length) { + object.allowExitCodes = []; + for (var j = 0; j < message.allowExitCodes.length; ++j) + object.allowExitCodes[j] = message.allowExitCodes[j]; + } + if (message.script != null && message.hasOwnProperty("script")) + object.script = message.script; + return object; + }; + + /** + * Converts this BuildStep to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @instance * @returns {Object.} JSON object */ - Results.prototype.toJSON = function toJSON() { + BuildStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Results + * Gets the default type url for BuildStep * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Results + * @memberof google.devtools.cloudbuild.v1.BuildStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Results.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BuildStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Results"; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.BuildStep"; }; - return Results; + return BuildStep; })(); - v1.ArtifactResult = (function() { + v1.Volume = (function() { /** - * Properties of an ArtifactResult. + * Properties of a Volume. * @memberof google.devtools.cloudbuild.v1 - * @interface IArtifactResult - * @property {string|null} [location] ArtifactResult location - * @property {Array.|null} [fileHash] ArtifactResult fileHash + * @interface IVolume + * @property {string|null} [name] Volume name + * @property {string|null} [path] Volume path */ /** - * Constructs a new ArtifactResult. + * Constructs a new Volume. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents an ArtifactResult. - * @implements IArtifactResult + * @classdesc Represents a Volume. + * @implements IVolume * @constructor - * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set */ - function ArtifactResult(properties) { - this.fileHash = []; + function Volume(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4049,92 +4038,89 @@ } /** - * ArtifactResult location. - * @member {string} location - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * Volume name. + * @member {string} name + * @memberof google.devtools.cloudbuild.v1.Volume * @instance */ - ArtifactResult.prototype.location = ""; + Volume.prototype.name = ""; /** - * ArtifactResult fileHash. - * @member {Array.} fileHash - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * Volume path. + * @member {string} path + * @memberof google.devtools.cloudbuild.v1.Volume * @instance */ - ArtifactResult.prototype.fileHash = $util.emptyArray; + Volume.prototype.path = ""; /** - * Creates a new ArtifactResult instance using the specified properties. + * Creates a new Volume instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static - * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult instance + * @param {google.devtools.cloudbuild.v1.IVolume=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Volume} Volume instance */ - ArtifactResult.create = function create(properties) { - return new ArtifactResult(properties); + Volume.create = function create(properties) { + return new Volume(properties); }; /** - * Encodes the specified ArtifactResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * Encodes the specified Volume message. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static - * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArtifactResult.encode = function encode(message, writer) { + Volume.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.fileHash != null && message.fileHash.length) - for (var i = 0; i < message.fileHash.length; ++i) - $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHash[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); return writer; }; /** - * Encodes the specified ArtifactResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. + * Encodes the specified Volume message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Volume.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static - * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IVolume} message Volume message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArtifactResult.encodeDelimited = function encodeDelimited(message, writer) { + Volume.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArtifactResult message from the specified reader or buffer. + * Decodes a Volume message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + * @returns {google.devtools.cloudbuild.v1.Volume} Volume * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArtifactResult.decode = function decode(reader, length) { + Volume.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Volume(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.location = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.fileHash && message.fileHash.length)) - message.fileHash = []; - message.fileHash.push($root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32())); + message.path = reader.string(); break; } default: @@ -4146,183 +4132,143 @@ }; /** - * Decodes an ArtifactResult message from the specified reader or buffer, length delimited. + * Decodes a Volume message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + * @returns {google.devtools.cloudbuild.v1.Volume} Volume * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArtifactResult.decodeDelimited = function decodeDelimited(reader) { + Volume.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArtifactResult message. + * Verifies a Volume message. * @function verify - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArtifactResult.verify = function verify(message) { + Volume.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.fileHash != null && message.hasOwnProperty("fileHash")) { - if (!Array.isArray(message.fileHash)) - return "fileHash: array expected"; - for (var i = 0; i < message.fileHash.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHash[i]); - if (error) - return "fileHash." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; return null; }; /** - * Creates an ArtifactResult message from a plain object. Also converts values to their respective internal types. + * Creates a Volume message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + * @returns {google.devtools.cloudbuild.v1.Volume} Volume */ - ArtifactResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.ArtifactResult) + Volume.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Volume) return object; - var message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); - if (object.location != null) - message.location = String(object.location); - if (object.fileHash) { - if (!Array.isArray(object.fileHash)) - throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: array expected"); - message.fileHash = []; - for (var i = 0; i < object.fileHash.length; ++i) { - if (typeof object.fileHash[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: object expected"); - message.fileHash[i] = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHash[i]); - } - } + var message = new $root.google.devtools.cloudbuild.v1.Volume(); + if (object.name != null) + message.name = String(object.name); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from an ArtifactResult message. Also converts values to other types if specified. + * Creates a plain object from a Volume message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static - * @param {google.devtools.cloudbuild.v1.ArtifactResult} message ArtifactResult + * @param {google.devtools.cloudbuild.v1.Volume} message Volume * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArtifactResult.toObject = function toObject(message, options) { + Volume.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.fileHash = []; - if (options.defaults) - object.location = ""; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.fileHash && message.fileHash.length) { - object.fileHash = []; - for (var j = 0; j < message.fileHash.length; ++j) - object.fileHash[j] = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHash[j], options); + if (options.defaults) { + object.name = ""; + object.path = ""; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ArtifactResult to JSON. + * Converts this Volume to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @instance * @returns {Object.} JSON object */ - ArtifactResult.prototype.toJSON = function toJSON() { + Volume.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ArtifactResult + * Gets the default type url for Volume * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @memberof google.devtools.cloudbuild.v1.Volume * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ArtifactResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Volume.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ArtifactResult"; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Volume"; }; - return ArtifactResult; + return Volume; })(); - v1.Build = (function() { + v1.Results = (function() { /** - * Properties of a Build. + * Properties of a Results. * @memberof google.devtools.cloudbuild.v1 - * @interface IBuild - * @property {string|null} [name] Build name - * @property {string|null} [id] Build id - * @property {string|null} [projectId] Build projectId - * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] Build status - * @property {string|null} [statusDetail] Build statusDetail - * @property {google.devtools.cloudbuild.v1.ISource|null} [source] Build source - * @property {Array.|null} [steps] Build steps - * @property {google.devtools.cloudbuild.v1.IResults|null} [results] Build results - * @property {google.protobuf.ITimestamp|null} [createTime] Build createTime - * @property {google.protobuf.ITimestamp|null} [startTime] Build startTime - * @property {google.protobuf.ITimestamp|null} [finishTime] Build finishTime - * @property {google.protobuf.IDuration|null} [timeout] Build timeout - * @property {Array.|null} [images] Build images - * @property {google.protobuf.IDuration|null} [queueTtl] Build queueTtl - * @property {google.devtools.cloudbuild.v1.IArtifacts|null} [artifacts] Build artifacts - * @property {string|null} [logsBucket] Build logsBucket - * @property {google.devtools.cloudbuild.v1.ISourceProvenance|null} [sourceProvenance] Build sourceProvenance - * @property {string|null} [buildTriggerId] Build buildTriggerId - * @property {google.devtools.cloudbuild.v1.IBuildOptions|null} [options] Build options - * @property {string|null} [logUrl] Build logUrl - * @property {Object.|null} [substitutions] Build substitutions - * @property {Array.|null} [tags] Build tags - * @property {Array.|null} [secrets] Build secrets - * @property {Object.|null} [timing] Build timing - * @property {google.devtools.cloudbuild.v1.IBuildApproval|null} [approval] Build approval - * @property {string|null} [serviceAccount] Build serviceAccount - * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets - * @property {Array.|null} [warnings] Build warnings - * @property {google.devtools.cloudbuild.v1.Build.IFailureInfo|null} [failureInfo] Build failureInfo + * @interface IResults + * @property {Array.|null} [images] Results images + * @property {Array.|null} [buildStepImages] Results buildStepImages + * @property {string|null} [artifactManifest] Results artifactManifest + * @property {number|Long|null} [numArtifacts] Results numArtifacts + * @property {Array.|null} [buildStepOutputs] Results buildStepOutputs + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [artifactTiming] Results artifactTiming + * @property {Array.|null} [pythonPackages] Results pythonPackages + * @property {Array.|null} [mavenArtifacts] Results mavenArtifacts */ /** - * Constructs a new Build. + * Constructs a new Results. * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents a Build. - * @implements IBuild + * @classdesc Represents a Results. + * @implements IResults * @constructor - * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set */ - function Build(properties) { - this.steps = []; + function Results(properties) { this.images = []; - this.substitutions = {}; - this.tags = []; - this.secrets = []; - this.timing = {}; - this.warnings = []; + this.buildStepImages = []; + this.buildStepOutputs = []; + this.pythonPackages = []; + this.mavenArtifacts = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4330,524 +4276,566 @@ } /** - * Build name. - * @member {string} name - * @memberof google.devtools.cloudbuild.v1.Build + * Results images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.name = ""; + Results.prototype.images = $util.emptyArray; /** - * Build id. - * @member {string} id - * @memberof google.devtools.cloudbuild.v1.Build + * Results buildStepImages. + * @member {Array.} buildStepImages + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.id = ""; + Results.prototype.buildStepImages = $util.emptyArray; /** - * Build projectId. - * @member {string} projectId - * @memberof google.devtools.cloudbuild.v1.Build + * Results artifactManifest. + * @member {string} artifactManifest + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.projectId = ""; + Results.prototype.artifactManifest = ""; /** - * Build status. - * @member {google.devtools.cloudbuild.v1.Build.Status} status - * @memberof google.devtools.cloudbuild.v1.Build + * Results numArtifacts. + * @member {number|Long} numArtifacts + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.status = 0; + Results.prototype.numArtifacts = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Build statusDetail. - * @member {string} statusDetail - * @memberof google.devtools.cloudbuild.v1.Build + * Results buildStepOutputs. + * @member {Array.} buildStepOutputs + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.statusDetail = ""; + Results.prototype.buildStepOutputs = $util.emptyArray; /** - * Build source. - * @member {google.devtools.cloudbuild.v1.ISource|null|undefined} source - * @memberof google.devtools.cloudbuild.v1.Build + * Results artifactTiming. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} artifactTiming + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.source = null; + Results.prototype.artifactTiming = null; /** - * Build steps. - * @member {Array.} steps - * @memberof google.devtools.cloudbuild.v1.Build + * Results pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.steps = $util.emptyArray; + Results.prototype.pythonPackages = $util.emptyArray; /** - * Build results. - * @member {google.devtools.cloudbuild.v1.IResults|null|undefined} results - * @memberof google.devtools.cloudbuild.v1.Build + * Results mavenArtifacts. + * @member {Array.} mavenArtifacts + * @memberof google.devtools.cloudbuild.v1.Results * @instance */ - Build.prototype.results = null; + Results.prototype.mavenArtifacts = $util.emptyArray; /** - * Build createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Creates a new Results instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Results} Results instance */ - Build.prototype.createTime = null; + Results.create = function create(properties) { + return new Results(properties); + }; /** - * Build startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Encodes the specified Results message. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Build.prototype.startTime = null; + Results.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + $root.google.devtools.cloudbuild.v1.BuiltImage.encode(message.images[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.buildStepImages != null && message.buildStepImages.length) + for (var i = 0; i < message.buildStepImages.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.buildStepImages[i]); + if (message.artifactManifest != null && Object.hasOwnProperty.call(message, "artifactManifest")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.artifactManifest); + if (message.numArtifacts != null && Object.hasOwnProperty.call(message, "numArtifacts")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.numArtifacts); + if (message.buildStepOutputs != null && message.buildStepOutputs.length) + for (var i = 0; i < message.buildStepOutputs.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.buildStepOutputs[i]); + if (message.artifactTiming != null && Object.hasOwnProperty.call(message, "artifactTiming")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.artifactTiming, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + $root.google.devtools.cloudbuild.v1.UploadedPythonPackage.encode(message.pythonPackages[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.mavenArtifacts != null && message.mavenArtifacts.length) + for (var i = 0; i < message.mavenArtifacts.length; ++i) + $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.encode(message.mavenArtifacts[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; /** - * Build finishTime. - * @member {google.protobuf.ITimestamp|null|undefined} finishTime - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Encodes the specified Results message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Results.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.IResults} message Results message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Build.prototype.finishTime = null; - - /** - * Build timeout. - * @member {google.protobuf.IDuration|null|undefined} timeout - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.timeout = null; - - /** - * Build images. - * @member {Array.} images - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.images = $util.emptyArray; - - /** - * Build queueTtl. - * @member {google.protobuf.IDuration|null|undefined} queueTtl - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.queueTtl = null; - - /** - * Build artifacts. - * @member {google.devtools.cloudbuild.v1.IArtifacts|null|undefined} artifacts - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.artifacts = null; - - /** - * Build logsBucket. - * @member {string} logsBucket - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.logsBucket = ""; + Results.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Build sourceProvenance. - * @member {google.devtools.cloudbuild.v1.ISourceProvenance|null|undefined} sourceProvenance - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Decodes a Results message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Results} Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Build.prototype.sourceProvenance = null; + Results.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Results(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push($root.google.devtools.cloudbuild.v1.BuiltImage.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.buildStepImages && message.buildStepImages.length)) + message.buildStepImages = []; + message.buildStepImages.push(reader.string()); + break; + } + case 4: { + message.artifactManifest = reader.string(); + break; + } + case 5: { + message.numArtifacts = reader.int64(); + break; + } + case 6: { + if (!(message.buildStepOutputs && message.buildStepOutputs.length)) + message.buildStepOutputs = []; + message.buildStepOutputs.push(reader.bytes()); + break; + } + case 7: { + message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push($root.google.devtools.cloudbuild.v1.UploadedPythonPackage.decode(reader, reader.uint32())); + break; + } + case 9: { + if (!(message.mavenArtifacts && message.mavenArtifacts.length)) + message.mavenArtifacts = []; + message.mavenArtifacts.push($root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Build buildTriggerId. - * @member {string} buildTriggerId - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Decodes a Results message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Results} Results + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Build.prototype.buildTriggerId = ""; + Results.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Build options. - * @member {google.devtools.cloudbuild.v1.IBuildOptions|null|undefined} options - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Verifies a Results message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Build.prototype.options = null; + Results.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuiltImage.verify(message.images[i]); + if (error) + return "images." + error; + } + } + if (message.buildStepImages != null && message.hasOwnProperty("buildStepImages")) { + if (!Array.isArray(message.buildStepImages)) + return "buildStepImages: array expected"; + for (var i = 0; i < message.buildStepImages.length; ++i) + if (!$util.isString(message.buildStepImages[i])) + return "buildStepImages: string[] expected"; + } + if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + if (!$util.isString(message.artifactManifest)) + return "artifactManifest: string expected"; + if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + if (!$util.isInteger(message.numArtifacts) && !(message.numArtifacts && $util.isInteger(message.numArtifacts.low) && $util.isInteger(message.numArtifacts.high))) + return "numArtifacts: integer|Long expected"; + if (message.buildStepOutputs != null && message.hasOwnProperty("buildStepOutputs")) { + if (!Array.isArray(message.buildStepOutputs)) + return "buildStepOutputs: array expected"; + for (var i = 0; i < message.buildStepOutputs.length; ++i) + if (!(message.buildStepOutputs[i] && typeof message.buildStepOutputs[i].length === "number" || $util.isString(message.buildStepOutputs[i]))) + return "buildStepOutputs: buffer[] expected"; + } + if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.artifactTiming); + if (error) + return "artifactTiming." + error; + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.UploadedPythonPackage.verify(message.pythonPackages[i]); + if (error) + return "pythonPackages." + error; + } + } + if (message.mavenArtifacts != null && message.hasOwnProperty("mavenArtifacts")) { + if (!Array.isArray(message.mavenArtifacts)) + return "mavenArtifacts: array expected"; + for (var i = 0; i < message.mavenArtifacts.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.verify(message.mavenArtifacts[i]); + if (error) + return "mavenArtifacts." + error; + } + } + return null; + }; /** - * Build logUrl. - * @member {string} logUrl - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Creates a Results message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Results} Results */ - Build.prototype.logUrl = ""; + Results.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Results) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Results(); + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) { + if (typeof object.images[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.images: object expected"); + message.images[i] = $root.google.devtools.cloudbuild.v1.BuiltImage.fromObject(object.images[i]); + } + } + if (object.buildStepImages) { + if (!Array.isArray(object.buildStepImages)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepImages: array expected"); + message.buildStepImages = []; + for (var i = 0; i < object.buildStepImages.length; ++i) + message.buildStepImages[i] = String(object.buildStepImages[i]); + } + if (object.artifactManifest != null) + message.artifactManifest = String(object.artifactManifest); + if (object.numArtifacts != null) + if ($util.Long) + (message.numArtifacts = $util.Long.fromValue(object.numArtifacts)).unsigned = false; + else if (typeof object.numArtifacts === "string") + message.numArtifacts = parseInt(object.numArtifacts, 10); + else if (typeof object.numArtifacts === "number") + message.numArtifacts = object.numArtifacts; + else if (typeof object.numArtifacts === "object") + message.numArtifacts = new $util.LongBits(object.numArtifacts.low >>> 0, object.numArtifacts.high >>> 0).toNumber(); + if (object.buildStepOutputs) { + if (!Array.isArray(object.buildStepOutputs)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.buildStepOutputs: array expected"); + message.buildStepOutputs = []; + for (var i = 0; i < object.buildStepOutputs.length; ++i) + if (typeof object.buildStepOutputs[i] === "string") + $util.base64.decode(object.buildStepOutputs[i], message.buildStepOutputs[i] = $util.newBuffer($util.base64.length(object.buildStepOutputs[i])), 0); + else if (object.buildStepOutputs[i].length >= 0) + message.buildStepOutputs[i] = object.buildStepOutputs[i]; + } + if (object.artifactTiming != null) { + if (typeof object.artifactTiming !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.artifactTiming: object expected"); + message.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.artifactTiming); + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) { + if (typeof object.pythonPackages[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.pythonPackages: object expected"); + message.pythonPackages[i] = $root.google.devtools.cloudbuild.v1.UploadedPythonPackage.fromObject(object.pythonPackages[i]); + } + } + if (object.mavenArtifacts) { + if (!Array.isArray(object.mavenArtifacts)) + throw TypeError(".google.devtools.cloudbuild.v1.Results.mavenArtifacts: array expected"); + message.mavenArtifacts = []; + for (var i = 0; i < object.mavenArtifacts.length; ++i) { + if (typeof object.mavenArtifacts[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Results.mavenArtifacts: object expected"); + message.mavenArtifacts[i] = $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.fromObject(object.mavenArtifacts[i]); + } + } + return message; + }; /** - * Build substitutions. - * @member {Object.} substitutions - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Creates a plain object from a Results message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {google.devtools.cloudbuild.v1.Results} message Results + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Build.prototype.substitutions = $util.emptyObject; + Results.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.images = []; + object.buildStepImages = []; + object.buildStepOutputs = []; + object.pythonPackages = []; + object.mavenArtifacts = []; + } + if (options.defaults) { + object.artifactManifest = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numArtifacts = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numArtifacts = options.longs === String ? "0" : 0; + object.artifactTiming = null; + } + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = $root.google.devtools.cloudbuild.v1.BuiltImage.toObject(message.images[j], options); + } + if (message.buildStepImages && message.buildStepImages.length) { + object.buildStepImages = []; + for (var j = 0; j < message.buildStepImages.length; ++j) + object.buildStepImages[j] = message.buildStepImages[j]; + } + if (message.artifactManifest != null && message.hasOwnProperty("artifactManifest")) + object.artifactManifest = message.artifactManifest; + if (message.numArtifacts != null && message.hasOwnProperty("numArtifacts")) + if (typeof message.numArtifacts === "number") + object.numArtifacts = options.longs === String ? String(message.numArtifacts) : message.numArtifacts; + else + object.numArtifacts = options.longs === String ? $util.Long.prototype.toString.call(message.numArtifacts) : options.longs === Number ? new $util.LongBits(message.numArtifacts.low >>> 0, message.numArtifacts.high >>> 0).toNumber() : message.numArtifacts; + if (message.buildStepOutputs && message.buildStepOutputs.length) { + object.buildStepOutputs = []; + for (var j = 0; j < message.buildStepOutputs.length; ++j) + object.buildStepOutputs[j] = options.bytes === String ? $util.base64.encode(message.buildStepOutputs[j], 0, message.buildStepOutputs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.buildStepOutputs[j]) : message.buildStepOutputs[j]; + } + if (message.artifactTiming != null && message.hasOwnProperty("artifactTiming")) + object.artifactTiming = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.artifactTiming, options); + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = $root.google.devtools.cloudbuild.v1.UploadedPythonPackage.toObject(message.pythonPackages[j], options); + } + if (message.mavenArtifacts && message.mavenArtifacts.length) { + object.mavenArtifacts = []; + for (var j = 0; j < message.mavenArtifacts.length; ++j) + object.mavenArtifacts[j] = $root.google.devtools.cloudbuild.v1.UploadedMavenArtifact.toObject(message.mavenArtifacts[j], options); + } + return object; + }; /** - * Build tags. - * @member {Array.} tags - * @memberof google.devtools.cloudbuild.v1.Build + * Converts this Results to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Results * @instance + * @returns {Object.} JSON object */ - Build.prototype.tags = $util.emptyArray; + Results.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Build secrets. - * @member {Array.} secrets - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Gets the default type url for Results + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Results + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Build.prototype.secrets = $util.emptyArray; + Results.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Results"; + }; - /** - * Build timing. - * @member {Object.} timing - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.timing = $util.emptyObject; + return Results; + })(); - /** - * Build approval. - * @member {google.devtools.cloudbuild.v1.IBuildApproval|null|undefined} approval - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - */ - Build.prototype.approval = null; + v1.ArtifactResult = (function() { /** - * Build serviceAccount. - * @member {string} serviceAccount - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Properties of an ArtifactResult. + * @memberof google.devtools.cloudbuild.v1 + * @interface IArtifactResult + * @property {string|null} [location] ArtifactResult location + * @property {Array.|null} [fileHash] ArtifactResult fileHash */ - Build.prototype.serviceAccount = ""; /** - * Build availableSecrets. - * @member {google.devtools.cloudbuild.v1.ISecrets|null|undefined} availableSecrets - * @memberof google.devtools.cloudbuild.v1.Build - * @instance + * Constructs a new ArtifactResult. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an ArtifactResult. + * @implements IArtifactResult + * @constructor + * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set */ - Build.prototype.availableSecrets = null; + function ArtifactResult(properties) { + this.fileHash = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Build warnings. - * @member {Array.} warnings - * @memberof google.devtools.cloudbuild.v1.Build + * ArtifactResult location. + * @member {string} location + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @instance */ - Build.prototype.warnings = $util.emptyArray; + ArtifactResult.prototype.location = ""; /** - * Build failureInfo. - * @member {google.devtools.cloudbuild.v1.Build.IFailureInfo|null|undefined} failureInfo - * @memberof google.devtools.cloudbuild.v1.Build + * ArtifactResult fileHash. + * @member {Array.} fileHash + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @instance */ - Build.prototype.failureInfo = null; + ArtifactResult.prototype.fileHash = $util.emptyArray; /** - * Creates a new Build instance using the specified properties. + * Creates a new ArtifactResult instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static - * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Build} Build instance + * @param {google.devtools.cloudbuild.v1.IArtifactResult=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult instance */ - Build.create = function create(properties) { - return new Build(properties); + ArtifactResult.create = function create(properties) { + return new ArtifactResult(properties); }; /** - * Encodes the specified Build message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * Encodes the specified ArtifactResult message. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static - * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Build.encode = function encode(message, writer) { + ArtifactResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.devtools.cloudbuild.v1.Source.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) - $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.results != null && Object.hasOwnProperty.call(message, "results")) - $root.google.devtools.cloudbuild.v1.Results.encode(message.results, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.steps != null && message.steps.length) - for (var i = 0; i < message.steps.length; ++i) - $root.google.devtools.cloudbuild.v1.BuildStep.encode(message.steps[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.images != null && message.images.length) - for (var i = 0; i < message.images.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.images[i]); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 16, wireType 2 =*/130).string(message.projectId); - if (message.logsBucket != null && Object.hasOwnProperty.call(message, "logsBucket")) - writer.uint32(/* id 19, wireType 2 =*/154).string(message.logsBucket); - if (message.sourceProvenance != null && Object.hasOwnProperty.call(message, "sourceProvenance")) - $root.google.devtools.cloudbuild.v1.SourceProvenance.encode(message.sourceProvenance, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.buildTriggerId != null && Object.hasOwnProperty.call(message, "buildTriggerId")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.buildTriggerId); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.devtools.cloudbuild.v1.BuildOptions.encode(message.options, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 24, wireType 2 =*/194).string(message.statusDetail); - if (message.logUrl != null && Object.hasOwnProperty.call(message, "logUrl")) - writer.uint32(/* id 25, wireType 2 =*/202).string(message.logUrl); - if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) - for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) - writer.uint32(/* id 29, wireType 2 =*/234).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 31, wireType 2 =*/250).string(message.tags[i]); - if (message.secrets != null && message.secrets.length) - for (var i = 0; i < message.secrets.length; ++i) - $root.google.devtools.cloudbuild.v1.Secret.encode(message.secrets[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); - if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) - for (var keys = Object.keys(message.timing), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) - $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); - if (message.queueTtl != null && Object.hasOwnProperty.call(message, "queueTtl")) - $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 42, wireType 2 =*/338).string(message.serviceAccount); - if (message.approval != null && Object.hasOwnProperty.call(message, "approval")) - $root.google.devtools.cloudbuild.v1.BuildApproval.encode(message.approval, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); - if (message.availableSecrets != null && Object.hasOwnProperty.call(message, "availableSecrets")) - $root.google.devtools.cloudbuild.v1.Secrets.encode(message.availableSecrets, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); - if (message.warnings != null && message.warnings.length) - for (var i = 0; i < message.warnings.length; ++i) - $root.google.devtools.cloudbuild.v1.Build.Warning.encode(message.warnings[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); - if (message.failureInfo != null && Object.hasOwnProperty.call(message, "failureInfo")) - $root.google.devtools.cloudbuild.v1.Build.FailureInfo.encode(message.failureInfo, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.fileHash != null && message.fileHash.length) + for (var i = 0; i < message.fileHash.length; ++i) + $root.google.devtools.cloudbuild.v1.FileHashes.encode(message.fileHash[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified Build message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * Encodes the specified ArtifactResult message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.ArtifactResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static - * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {google.devtools.cloudbuild.v1.IArtifactResult} message ArtifactResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Build.encodeDelimited = function encodeDelimited(message, writer) { + ArtifactResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Build message from the specified reader or buffer. + * Decodes an ArtifactResult message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Build} Build + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Build.decode = function decode(reader, length) { + ArtifactResult.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 45: { - message.name = reader.string(); - break; - } case 1: { - message.id = reader.string(); - break; - } - case 16: { - message.projectId = reader.string(); + message.location = reader.string(); break; } case 2: { - message.status = reader.int32(); - break; - } - case 24: { - message.statusDetail = reader.string(); - break; - } - case 3: { - message.source = $root.google.devtools.cloudbuild.v1.Source.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.steps && message.steps.length)) - message.steps = []; - message.steps.push($root.google.devtools.cloudbuild.v1.BuildStep.decode(reader, reader.uint32())); - break; - } - case 10: { - message.results = $root.google.devtools.cloudbuild.v1.Results.decode(reader, reader.uint32()); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 12: { - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 13: { - if (!(message.images && message.images.length)) - message.images = []; - message.images.push(reader.string()); - break; - } - case 40: { - message.queueTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 37: { - message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); - break; - } - case 19: { - message.logsBucket = reader.string(); - break; - } - case 21: { - message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.decode(reader, reader.uint32()); - break; - } - case 22: { - message.buildTriggerId = reader.string(); - break; - } - case 23: { - message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.decode(reader, reader.uint32()); - break; - } - case 25: { - message.logUrl = reader.string(); - break; - } - case 29: { - if (message.substitutions === $util.emptyObject) - message.substitutions = {}; - 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.substitutions[key] = value; - break; - } - case 31: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 32: { - if (!(message.secrets && message.secrets.length)) - message.secrets = []; - message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); - break; - } - case 33: { - if (message.timing === $util.emptyObject) - message.timing = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.timing[key] = value; - break; - } - case 44: { - message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.decode(reader, reader.uint32()); - break; - } - case 42: { - message.serviceAccount = reader.string(); - break; - } - case 47: { - message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); - break; - } - case 49: { - if (!(message.warnings && message.warnings.length)) - message.warnings = []; - message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); - break; - } - case 51: { - message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.decode(reader, reader.uint32()); + if (!(message.fileHash && message.fileHash.length)) + message.fileHash = []; + message.fileHash.push($root.google.devtools.cloudbuild.v1.FileHashes.decode(reader, reader.uint32())); break; } default: @@ -4859,503 +4847,1216 @@ }; /** - * Decodes a Build message from the specified reader or buffer, length delimited. + * Decodes an ArtifactResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Build} Build + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Build.decodeDelimited = function decodeDelimited(reader) { + ArtifactResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Build message. + * Verifies an ArtifactResult message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Build + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Build.verify = function verify(message) { + ArtifactResult.verify = function verify(message) { if (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.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 10: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 9: - break; - } - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.devtools.cloudbuild.v1.Source.verify(message.source); - if (error) - return "source." + error; - } - if (message.steps != null && message.hasOwnProperty("steps")) { - if (!Array.isArray(message.steps)) - return "steps: array expected"; - for (var i = 0; i < message.steps.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.BuildStep.verify(message.steps[i]); + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.fileHash != null && message.hasOwnProperty("fileHash")) { + if (!Array.isArray(message.fileHash)) + return "fileHash: array expected"; + for (var i = 0; i < message.fileHash.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.FileHashes.verify(message.fileHash[i]); if (error) - return "steps." + error; + return "fileHash." + error; } } - if (message.results != null && message.hasOwnProperty("results")) { - var error = $root.google.devtools.cloudbuild.v1.Results.verify(message.results); - if (error) - return "results." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; + return null; + }; + + /** + * Creates an ArtifactResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.ArtifactResult} ArtifactResult + */ + ArtifactResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.ArtifactResult) + return object; + var message = new $root.google.devtools.cloudbuild.v1.ArtifactResult(); + if (object.location != null) + message.location = String(object.location); + if (object.fileHash) { + if (!Array.isArray(object.fileHash)) + throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: array expected"); + message.fileHash = []; + for (var i = 0; i < object.fileHash.length; ++i) { + if (typeof object.fileHash[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.ArtifactResult.fileHash: object expected"); + message.fileHash[i] = $root.google.devtools.cloudbuild.v1.FileHashes.fromObject(object.fileHash[i]); + } } - if (message.finishTime != null && message.hasOwnProperty("finishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.finishTime); - if (error) - return "finishTime." + error; - } - if (message.timeout != null && message.hasOwnProperty("timeout")) { - var error = $root.google.protobuf.Duration.verify(message.timeout); - if (error) - return "timeout." + error; - } - if (message.images != null && message.hasOwnProperty("images")) { - if (!Array.isArray(message.images)) - return "images: array expected"; - for (var i = 0; i < message.images.length; ++i) - if (!$util.isString(message.images[i])) - return "images: string[] expected"; - } - if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) { - var error = $root.google.protobuf.Duration.verify(message.queueTtl); - if (error) - return "queueTtl." + error; - } - if (message.artifacts != null && message.hasOwnProperty("artifacts")) { - var error = $root.google.devtools.cloudbuild.v1.Artifacts.verify(message.artifacts); - if (error) - return "artifacts." + error; - } - if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) - if (!$util.isString(message.logsBucket)) - return "logsBucket: string expected"; - if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) { - var error = $root.google.devtools.cloudbuild.v1.SourceProvenance.verify(message.sourceProvenance); - if (error) - return "sourceProvenance." + error; - } - if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) - if (!$util.isString(message.buildTriggerId)) - return "buildTriggerId: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.devtools.cloudbuild.v1.BuildOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.logUrl != null && message.hasOwnProperty("logUrl")) - if (!$util.isString(message.logUrl)) - return "logUrl: string expected"; - if (message.substitutions != null && message.hasOwnProperty("substitutions")) { - if (!$util.isObject(message.substitutions)) - return "substitutions: object expected"; - var key = Object.keys(message.substitutions); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.substitutions[key[i]])) - return "substitutions: string{k:string} expected"; - } - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.secrets != null && message.hasOwnProperty("secrets")) { - if (!Array.isArray(message.secrets)) - return "secrets: array expected"; - for (var i = 0; i < message.secrets.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.Secret.verify(message.secrets[i]); - if (error) - return "secrets." + error; - } - } - if (message.timing != null && message.hasOwnProperty("timing")) { - if (!$util.isObject(message.timing)) - return "timing: object expected"; - var key = Object.keys(message.timing); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing[key[i]]); - if (error) - return "timing." + error; - } - } - if (message.approval != null && message.hasOwnProperty("approval")) { - var error = $root.google.devtools.cloudbuild.v1.BuildApproval.verify(message.approval); - if (error) - return "approval." + error; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) { - var error = $root.google.devtools.cloudbuild.v1.Secrets.verify(message.availableSecrets); - if (error) - return "availableSecrets." + error; - } - if (message.warnings != null && message.hasOwnProperty("warnings")) { - if (!Array.isArray(message.warnings)) - return "warnings: array expected"; - for (var i = 0; i < message.warnings.length; ++i) { - var error = $root.google.devtools.cloudbuild.v1.Build.Warning.verify(message.warnings[i]); - if (error) - return "warnings." + error; - } - } - if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) { - var error = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.verify(message.failureInfo); - if (error) - return "failureInfo." + error; - } - return null; + return message; }; /** - * Creates a Build message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Build + * Creates a plain object from an ArtifactResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.ArtifactResult * @static - * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Build} Build + * @param {google.devtools.cloudbuild.v1.ArtifactResult} message ArtifactResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Build.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Build) - return object; - var message = new $root.google.devtools.cloudbuild.v1.Build(); - if (object.name != null) - message.name = String(object.name); - if (object.id != null) - message.id = String(object.id); - if (object.projectId != null) - message.projectId = String(object.projectId); - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; - } - break; - case "STATUS_UNKNOWN": - case 0: - message.status = 0; - break; - case "PENDING": - case 10: - message.status = 10; - break; - case "QUEUED": - case 1: - message.status = 1; - break; - case "WORKING": - case 2: - message.status = 2; - break; - case "SUCCESS": - case 3: - message.status = 3; - break; - case "FAILURE": - case 4: - message.status = 4; - break; - case "INTERNAL_ERROR": - case 5: - message.status = 5; - break; - case "TIMEOUT": - case 6: - message.status = 6; - break; - case "CANCELLED": - case 7: - message.status = 7; - break; - case "EXPIRED": - case 9: - message.status = 9; - break; - } - if (object.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.source: object expected"); - message.source = $root.google.devtools.cloudbuild.v1.Source.fromObject(object.source); - } - if (object.steps) { - if (!Array.isArray(object.steps)) - throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: array expected"); - message.steps = []; - for (var i = 0; i < object.steps.length; ++i) { - if (typeof object.steps[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: object expected"); - message.steps[i] = $root.google.devtools.cloudbuild.v1.BuildStep.fromObject(object.steps[i]); - } - } - if (object.results != null) { - if (typeof object.results !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.results: object expected"); - message.results = $root.google.devtools.cloudbuild.v1.Results.fromObject(object.results); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.finishTime != null) { - if (typeof object.finishTime !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.finishTime: object expected"); - message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + ArtifactResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileHash = []; + if (options.defaults) + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.fileHash && message.fileHash.length) { + object.fileHash = []; + for (var j = 0; j < message.fileHash.length; ++j) + object.fileHash[j] = $root.google.devtools.cloudbuild.v1.FileHashes.toObject(message.fileHash[j], options); } - if (object.timeout != null) { - if (typeof object.timeout !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.timeout: object expected"); - message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + return object; + }; + + /** + * Converts this ArtifactResult to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @instance + * @returns {Object.} JSON object + */ + ArtifactResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArtifactResult + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.ArtifactResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArtifactResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - if (object.images) { - if (!Array.isArray(object.images)) - throw TypeError(".google.devtools.cloudbuild.v1.Build.images: array expected"); - message.images = []; - for (var i = 0; i < object.images.length; ++i) - message.images[i] = String(object.images[i]); - } - if (object.queueTtl != null) { - if (typeof object.queueTtl !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.queueTtl: object expected"); - message.queueTtl = $root.google.protobuf.Duration.fromObject(object.queueTtl); - } - if (object.artifacts != null) { - if (typeof object.artifacts !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.artifacts: object expected"); - message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.fromObject(object.artifacts); - } - if (object.logsBucket != null) - message.logsBucket = String(object.logsBucket); - if (object.sourceProvenance != null) { - if (typeof object.sourceProvenance !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.sourceProvenance: object expected"); - message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.fromObject(object.sourceProvenance); - } - if (object.buildTriggerId != null) - message.buildTriggerId = String(object.buildTriggerId); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.options: object expected"); - message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.fromObject(object.options); - } - if (object.logUrl != null) - message.logUrl = String(object.logUrl); - if (object.substitutions) { - if (typeof object.substitutions !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.substitutions: object expected"); - message.substitutions = {}; - for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) - message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); - } - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.devtools.cloudbuild.v1.Build.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.secrets) { - if (!Array.isArray(object.secrets)) - throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: array expected"); - message.secrets = []; - for (var i = 0; i < object.secrets.length; ++i) { - if (typeof object.secrets[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: object expected"); - message.secrets[i] = $root.google.devtools.cloudbuild.v1.Secret.fromObject(object.secrets[i]); - } - } - if (object.timing) { - if (typeof object.timing !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); - message.timing = {}; - for (var keys = Object.keys(object.timing), i = 0; i < keys.length; ++i) { - if (typeof object.timing[keys[i]] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); - message.timing[keys[i]] = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing[keys[i]]); - } - } - if (object.approval != null) { - if (typeof object.approval !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.approval: object expected"); - message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.fromObject(object.approval); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.availableSecrets != null) { - if (typeof object.availableSecrets !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.availableSecrets: object expected"); - message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.fromObject(object.availableSecrets); - } - if (object.warnings) { - if (!Array.isArray(object.warnings)) - throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: array expected"); - message.warnings = []; - for (var i = 0; i < object.warnings.length; ++i) { - if (typeof object.warnings[i] !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: object expected"); - message.warnings[i] = $root.google.devtools.cloudbuild.v1.Build.Warning.fromObject(object.warnings[i]); - } - } - if (object.failureInfo != null) { - if (typeof object.failureInfo !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Build.failureInfo: object expected"); - message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.fromObject(object.failureInfo); - } - return message; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.ArtifactResult"; }; + return ArtifactResult; + })(); + + v1.Build = (function() { + /** - * Creates a plain object from a Build message. Also converts values to other types if specified. - * @function toObject + * Properties of a Build. + * @memberof google.devtools.cloudbuild.v1 + * @interface IBuild + * @property {string|null} [name] Build name + * @property {string|null} [id] Build id + * @property {string|null} [projectId] Build projectId + * @property {google.devtools.cloudbuild.v1.Build.Status|null} [status] Build status + * @property {string|null} [statusDetail] Build statusDetail + * @property {google.devtools.cloudbuild.v1.ISource|null} [source] Build source + * @property {Array.|null} [steps] Build steps + * @property {google.devtools.cloudbuild.v1.IResults|null} [results] Build results + * @property {google.protobuf.ITimestamp|null} [createTime] Build createTime + * @property {google.protobuf.ITimestamp|null} [startTime] Build startTime + * @property {google.protobuf.ITimestamp|null} [finishTime] Build finishTime + * @property {google.protobuf.IDuration|null} [timeout] Build timeout + * @property {Array.|null} [images] Build images + * @property {google.protobuf.IDuration|null} [queueTtl] Build queueTtl + * @property {google.devtools.cloudbuild.v1.IArtifacts|null} [artifacts] Build artifacts + * @property {string|null} [logsBucket] Build logsBucket + * @property {google.devtools.cloudbuild.v1.ISourceProvenance|null} [sourceProvenance] Build sourceProvenance + * @property {string|null} [buildTriggerId] Build buildTriggerId + * @property {google.devtools.cloudbuild.v1.IBuildOptions|null} [options] Build options + * @property {string|null} [logUrl] Build logUrl + * @property {Object.|null} [substitutions] Build substitutions + * @property {Array.|null} [tags] Build tags + * @property {Array.|null} [secrets] Build secrets + * @property {Object.|null} [timing] Build timing + * @property {google.devtools.cloudbuild.v1.IBuildApproval|null} [approval] Build approval + * @property {string|null} [serviceAccount] Build serviceAccount + * @property {google.devtools.cloudbuild.v1.ISecrets|null} [availableSecrets] Build availableSecrets + * @property {Array.|null} [warnings] Build warnings + * @property {google.devtools.cloudbuild.v1.Build.IFailureInfo|null} [failureInfo] Build failureInfo + */ + + /** + * Constructs a new Build. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents a Build. + * @implements IBuild + * @constructor + * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set + */ + function Build(properties) { + this.steps = []; + this.images = []; + this.substitutions = {}; + this.tags = []; + this.secrets = []; + this.timing = {}; + this.warnings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Build name. + * @member {string} name * @memberof google.devtools.cloudbuild.v1.Build - * @static - * @param {google.devtools.cloudbuild.v1.Build} message Build - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * @instance */ - Build.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.steps = []; - object.images = []; - object.tags = []; - object.secrets = []; - object.warnings = []; - } - if (options.objects || options.defaults) { - object.substitutions = {}; - object.timing = {}; - } - if (options.defaults) { - object.id = ""; - object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; - object.source = null; - object.createTime = null; - object.startTime = null; - object.finishTime = null; - object.results = null; - object.timeout = null; - object.projectId = ""; - object.logsBucket = ""; - object.sourceProvenance = null; - object.buildTriggerId = ""; - object.options = null; - object.statusDetail = ""; - object.logUrl = ""; - object.artifacts = null; - object.queueTtl = null; - object.serviceAccount = ""; - object.approval = null; - object.name = ""; - object.availableSecrets = null; - object.failureInfo = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.devtools.cloudbuild.v1.Source.toObject(message.source, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.finishTime != null && message.hasOwnProperty("finishTime")) - object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); - if (message.results != null && message.hasOwnProperty("results")) - object.results = $root.google.devtools.cloudbuild.v1.Results.toObject(message.results, options); - if (message.steps && message.steps.length) { - object.steps = []; - for (var j = 0; j < message.steps.length; ++j) - object.steps[j] = $root.google.devtools.cloudbuild.v1.BuildStep.toObject(message.steps[j], options); - } - if (message.timeout != null && message.hasOwnProperty("timeout")) - object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); - if (message.images && message.images.length) { - object.images = []; - for (var j = 0; j < message.images.length; ++j) - object.images[j] = message.images[j]; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) - object.logsBucket = message.logsBucket; - if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) - object.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.toObject(message.sourceProvenance, options); - if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) - object.buildTriggerId = message.buildTriggerId; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.devtools.cloudbuild.v1.BuildOptions.toObject(message.options, options); - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.logUrl != null && message.hasOwnProperty("logUrl")) - object.logUrl = message.logUrl; - var keys2; - if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { - object.substitutions = {}; - for (var j = 0; j < keys2.length; ++j) - object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; - } - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } + Build.prototype.name = ""; + + /** + * Build id. + * @member {string} id + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.id = ""; + + /** + * Build projectId. + * @member {string} projectId + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.projectId = ""; + + /** + * Build status. + * @member {google.devtools.cloudbuild.v1.Build.Status} status + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.status = 0; + + /** + * Build statusDetail. + * @member {string} statusDetail + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.statusDetail = ""; + + /** + * Build source. + * @member {google.devtools.cloudbuild.v1.ISource|null|undefined} source + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.source = null; + + /** + * Build steps. + * @member {Array.} steps + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.steps = $util.emptyArray; + + /** + * Build results. + * @member {google.devtools.cloudbuild.v1.IResults|null|undefined} results + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.results = null; + + /** + * Build createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.createTime = null; + + /** + * Build startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.startTime = null; + + /** + * Build finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.finishTime = null; + + /** + * Build timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.timeout = null; + + /** + * Build images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.images = $util.emptyArray; + + /** + * Build queueTtl. + * @member {google.protobuf.IDuration|null|undefined} queueTtl + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.queueTtl = null; + + /** + * Build artifacts. + * @member {google.devtools.cloudbuild.v1.IArtifacts|null|undefined} artifacts + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.artifacts = null; + + /** + * Build logsBucket. + * @member {string} logsBucket + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.logsBucket = ""; + + /** + * Build sourceProvenance. + * @member {google.devtools.cloudbuild.v1.ISourceProvenance|null|undefined} sourceProvenance + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.sourceProvenance = null; + + /** + * Build buildTriggerId. + * @member {string} buildTriggerId + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.buildTriggerId = ""; + + /** + * Build options. + * @member {google.devtools.cloudbuild.v1.IBuildOptions|null|undefined} options + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.options = null; + + /** + * Build logUrl. + * @member {string} logUrl + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.logUrl = ""; + + /** + * Build substitutions. + * @member {Object.} substitutions + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.substitutions = $util.emptyObject; + + /** + * Build tags. + * @member {Array.} tags + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.tags = $util.emptyArray; + + /** + * Build secrets. + * @member {Array.} secrets + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.secrets = $util.emptyArray; + + /** + * Build timing. + * @member {Object.} timing + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.timing = $util.emptyObject; + + /** + * Build approval. + * @member {google.devtools.cloudbuild.v1.IBuildApproval|null|undefined} approval + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.approval = null; + + /** + * Build serviceAccount. + * @member {string} serviceAccount + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.serviceAccount = ""; + + /** + * Build availableSecrets. + * @member {google.devtools.cloudbuild.v1.ISecrets|null|undefined} availableSecrets + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.availableSecrets = null; + + /** + * Build warnings. + * @member {Array.} warnings + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.warnings = $util.emptyArray; + + /** + * Build failureInfo. + * @member {google.devtools.cloudbuild.v1.Build.IFailureInfo|null|undefined} failureInfo + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + */ + Build.prototype.failureInfo = null; + + /** + * Creates a new Build instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build} Build instance + */ + Build.create = function create(properties) { + return new Build(properties); + }; + + /** + * Encodes the specified Build message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Build.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.status); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.devtools.cloudbuild.v1.Source.encode(message.source, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.results != null && Object.hasOwnProperty.call(message, "results")) + $root.google.devtools.cloudbuild.v1.Results.encode(message.results, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.steps != null && message.steps.length) + for (var i = 0; i < message.steps.length; ++i) + $root.google.devtools.cloudbuild.v1.BuildStep.encode(message.steps[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.images[i]); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.projectId); + if (message.logsBucket != null && Object.hasOwnProperty.call(message, "logsBucket")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.logsBucket); + if (message.sourceProvenance != null && Object.hasOwnProperty.call(message, "sourceProvenance")) + $root.google.devtools.cloudbuild.v1.SourceProvenance.encode(message.sourceProvenance, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.buildTriggerId != null && Object.hasOwnProperty.call(message, "buildTriggerId")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.buildTriggerId); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.devtools.cloudbuild.v1.BuildOptions.encode(message.options, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.statusDetail); + if (message.logUrl != null && Object.hasOwnProperty.call(message, "logUrl")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.logUrl); + if (message.substitutions != null && Object.hasOwnProperty.call(message, "substitutions")) + for (var keys = Object.keys(message.substitutions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 29, wireType 2 =*/234).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.substitutions[keys[i]]).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 31, wireType 2 =*/250).string(message.tags[i]); + if (message.secrets != null && message.secrets.length) + for (var i = 0; i < message.secrets.length; ++i) + $root.google.devtools.cloudbuild.v1.Secret.encode(message.secrets[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); + if (message.timing != null && Object.hasOwnProperty.call(message, "timing")) + for (var keys = Object.keys(message.timing), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 33, wireType 2 =*/266).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.artifacts != null && Object.hasOwnProperty.call(message, "artifacts")) + $root.google.devtools.cloudbuild.v1.Artifacts.encode(message.artifacts, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.queueTtl != null && Object.hasOwnProperty.call(message, "queueTtl")) + $root.google.protobuf.Duration.encode(message.queueTtl, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 42, wireType 2 =*/338).string(message.serviceAccount); + if (message.approval != null && Object.hasOwnProperty.call(message, "approval")) + $root.google.devtools.cloudbuild.v1.BuildApproval.encode(message.approval, writer.uint32(/* id 44, wireType 2 =*/354).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.name); + if (message.availableSecrets != null && Object.hasOwnProperty.call(message, "availableSecrets")) + $root.google.devtools.cloudbuild.v1.Secrets.encode(message.availableSecrets, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + $root.google.devtools.cloudbuild.v1.Build.Warning.encode(message.warnings[i], writer.uint32(/* id 49, wireType 2 =*/394).fork()).ldelim(); + if (message.failureInfo != null && Object.hasOwnProperty.call(message, "failureInfo")) + $root.google.devtools.cloudbuild.v1.Build.FailureInfo.encode(message.failureInfo, writer.uint32(/* id 51, wireType 2 =*/410).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Build message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.IBuild} message Build message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Build.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Build message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Build} Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Build.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 45: { + message.name = reader.string(); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 16: { + message.projectId = reader.string(); + break; + } + case 2: { + message.status = reader.int32(); + break; + } + case 24: { + message.statusDetail = reader.string(); + break; + } + case 3: { + message.source = $root.google.devtools.cloudbuild.v1.Source.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.steps && message.steps.length)) + message.steps = []; + message.steps.push($root.google.devtools.cloudbuild.v1.BuildStep.decode(reader, reader.uint32())); + break; + } + case 10: { + message.results = $root.google.devtools.cloudbuild.v1.Results.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 13: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); + break; + } + case 40: { + message.queueTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 37: { + message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.decode(reader, reader.uint32()); + break; + } + case 19: { + message.logsBucket = reader.string(); + break; + } + case 21: { + message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.decode(reader, reader.uint32()); + break; + } + case 22: { + message.buildTriggerId = reader.string(); + break; + } + case 23: { + message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.decode(reader, reader.uint32()); + break; + } + case 25: { + message.logUrl = reader.string(); + break; + } + case 29: { + if (message.substitutions === $util.emptyObject) + message.substitutions = {}; + 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.substitutions[key] = value; + break; + } + case 31: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 32: { + if (!(message.secrets && message.secrets.length)) + message.secrets = []; + message.secrets.push($root.google.devtools.cloudbuild.v1.Secret.decode(reader, reader.uint32())); + break; + } + case 33: { + if (message.timing === $util.emptyObject) + message.timing = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.timing[key] = value; + break; + } + case 44: { + message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.decode(reader, reader.uint32()); + break; + } + case 42: { + message.serviceAccount = reader.string(); + break; + } + case 47: { + message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.decode(reader, reader.uint32()); + break; + } + case 49: { + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.google.devtools.cloudbuild.v1.Build.Warning.decode(reader, reader.uint32())); + break; + } + case 51: { + message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Build message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build} Build + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Build.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Build message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Build.verify = function verify(message) { + if (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.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 10: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 9: + break; + } + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.devtools.cloudbuild.v1.Source.verify(message.source); + if (error) + return "source." + error; + } + if (message.steps != null && message.hasOwnProperty("steps")) { + if (!Array.isArray(message.steps)) + return "steps: array expected"; + for (var i = 0; i < message.steps.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.BuildStep.verify(message.steps[i]); + if (error) + return "steps." + error; + } + } + if (message.results != null && message.hasOwnProperty("results")) { + var error = $root.google.devtools.cloudbuild.v1.Results.verify(message.results); + if (error) + return "results." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) + if (!$util.isString(message.images[i])) + return "images: string[] expected"; + } + if (message.queueTtl != null && message.hasOwnProperty("queueTtl")) { + var error = $root.google.protobuf.Duration.verify(message.queueTtl); + if (error) + return "queueTtl." + error; + } + if (message.artifacts != null && message.hasOwnProperty("artifacts")) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.verify(message.artifacts); + if (error) + return "artifacts." + error; + } + if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + if (!$util.isString(message.logsBucket)) + return "logsBucket: string expected"; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) { + var error = $root.google.devtools.cloudbuild.v1.SourceProvenance.verify(message.sourceProvenance); + if (error) + return "sourceProvenance." + error; + } + if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + if (!$util.isString(message.buildTriggerId)) + return "buildTriggerId: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.devtools.cloudbuild.v1.BuildOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.logUrl != null && message.hasOwnProperty("logUrl")) + if (!$util.isString(message.logUrl)) + return "logUrl: string expected"; + if (message.substitutions != null && message.hasOwnProperty("substitutions")) { + if (!$util.isObject(message.substitutions)) + return "substitutions: object expected"; + var key = Object.keys(message.substitutions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.substitutions[key[i]])) + return "substitutions: string{k:string} expected"; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.secrets != null && message.hasOwnProperty("secrets")) { + if (!Array.isArray(message.secrets)) + return "secrets: array expected"; + for (var i = 0; i < message.secrets.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Secret.verify(message.secrets[i]); + if (error) + return "secrets." + error; + } + } + if (message.timing != null && message.hasOwnProperty("timing")) { + if (!$util.isObject(message.timing)) + return "timing: object expected"; + var key = Object.keys(message.timing); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing[key[i]]); + if (error) + return "timing." + error; + } + } + if (message.approval != null && message.hasOwnProperty("approval")) { + var error = $root.google.devtools.cloudbuild.v1.BuildApproval.verify(message.approval); + if (error) + return "approval." + error; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.availableSecrets != null && message.hasOwnProperty("availableSecrets")) { + var error = $root.google.devtools.cloudbuild.v1.Secrets.verify(message.availableSecrets); + if (error) + return "availableSecrets." + error; + } + if (message.warnings != null && message.hasOwnProperty("warnings")) { + if (!Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Build.Warning.verify(message.warnings[i]); + if (error) + return "warnings." + error; + } + } + if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) { + var error = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.verify(message.failureInfo); + if (error) + return "failureInfo." + error; + } + return null; + }; + + /** + * Creates a Build message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build} Build + */ + Build.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build(); + if (object.name != null) + message.name = String(object.name); + if (object.id != null) + message.id = String(object.id); + if (object.projectId != null) + message.projectId = String(object.projectId); + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNKNOWN": + case 0: + message.status = 0; + break; + case "PENDING": + case 10: + message.status = 10; + break; + case "QUEUED": + case 1: + message.status = 1; + break; + case "WORKING": + case 2: + message.status = 2; + break; + case "SUCCESS": + case 3: + message.status = 3; + break; + case "FAILURE": + case 4: + message.status = 4; + break; + case "INTERNAL_ERROR": + case 5: + message.status = 5; + break; + case "TIMEOUT": + case 6: + message.status = 6; + break; + case "CANCELLED": + case 7: + message.status = 7; + break; + case "EXPIRED": + case 9: + message.status = 9; + break; + } + if (object.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.source: object expected"); + message.source = $root.google.devtools.cloudbuild.v1.Source.fromObject(object.source); + } + if (object.steps) { + if (!Array.isArray(object.steps)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: array expected"); + message.steps = []; + for (var i = 0; i < object.steps.length; ++i) { + if (typeof object.steps[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.steps: object expected"); + message.steps[i] = $root.google.devtools.cloudbuild.v1.BuildStep.fromObject(object.steps[i]); + } + } + if (object.results != null) { + if (typeof object.results !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.results: object expected"); + message.results = $root.google.devtools.cloudbuild.v1.Results.fromObject(object.results); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) + message.images[i] = String(object.images[i]); + } + if (object.queueTtl != null) { + if (typeof object.queueTtl !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.queueTtl: object expected"); + message.queueTtl = $root.google.protobuf.Duration.fromObject(object.queueTtl); + } + if (object.artifacts != null) { + if (typeof object.artifacts !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.artifacts: object expected"); + message.artifacts = $root.google.devtools.cloudbuild.v1.Artifacts.fromObject(object.artifacts); + } + if (object.logsBucket != null) + message.logsBucket = String(object.logsBucket); + if (object.sourceProvenance != null) { + if (typeof object.sourceProvenance !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.sourceProvenance: object expected"); + message.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.fromObject(object.sourceProvenance); + } + if (object.buildTriggerId != null) + message.buildTriggerId = String(object.buildTriggerId); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.options: object expected"); + message.options = $root.google.devtools.cloudbuild.v1.BuildOptions.fromObject(object.options); + } + if (object.logUrl != null) + message.logUrl = String(object.logUrl); + if (object.substitutions) { + if (typeof object.substitutions !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.substitutions: object expected"); + message.substitutions = {}; + for (var keys = Object.keys(object.substitutions), i = 0; i < keys.length; ++i) + message.substitutions[keys[i]] = String(object.substitutions[keys[i]]); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.secrets) { + if (!Array.isArray(object.secrets)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: array expected"); + message.secrets = []; + for (var i = 0; i < object.secrets.length; ++i) { + if (typeof object.secrets[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.secrets: object expected"); + message.secrets[i] = $root.google.devtools.cloudbuild.v1.Secret.fromObject(object.secrets[i]); + } + } + if (object.timing) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); + message.timing = {}; + for (var keys = Object.keys(object.timing), i = 0; i < keys.length; ++i) { + if (typeof object.timing[keys[i]] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.timing: object expected"); + message.timing[keys[i]] = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing[keys[i]]); + } + } + if (object.approval != null) { + if (typeof object.approval !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.approval: object expected"); + message.approval = $root.google.devtools.cloudbuild.v1.BuildApproval.fromObject(object.approval); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.availableSecrets != null) { + if (typeof object.availableSecrets !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.availableSecrets: object expected"); + message.availableSecrets = $root.google.devtools.cloudbuild.v1.Secrets.fromObject(object.availableSecrets); + } + if (object.warnings) { + if (!Array.isArray(object.warnings)) + throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: array expected"); + message.warnings = []; + for (var i = 0; i < object.warnings.length; ++i) { + if (typeof object.warnings[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.warnings: object expected"); + message.warnings[i] = $root.google.devtools.cloudbuild.v1.Build.Warning.fromObject(object.warnings[i]); + } + } + if (object.failureInfo != null) { + if (typeof object.failureInfo !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Build.failureInfo: object expected"); + message.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.fromObject(object.failureInfo); + } + return message; + }; + + /** + * Creates a plain object from a Build message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {google.devtools.cloudbuild.v1.Build} message Build + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Build.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.steps = []; + object.images = []; + object.tags = []; + object.secrets = []; + object.warnings = []; + } + if (options.objects || options.defaults) { + object.substitutions = {}; + object.timing = {}; + } + if (options.defaults) { + object.id = ""; + object.status = options.enums === String ? "STATUS_UNKNOWN" : 0; + object.source = null; + object.createTime = null; + object.startTime = null; + object.finishTime = null; + object.results = null; + object.timeout = null; + object.projectId = ""; + object.logsBucket = ""; + object.sourceProvenance = null; + object.buildTriggerId = ""; + object.options = null; + object.statusDetail = ""; + object.logUrl = ""; + object.artifacts = null; + object.queueTtl = null; + object.serviceAccount = ""; + object.approval = null; + object.name = ""; + object.availableSecrets = null; + object.failureInfo = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Status[message.status] === undefined ? message.status : $root.google.devtools.cloudbuild.v1.Build.Status[message.status] : message.status; + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.devtools.cloudbuild.v1.Source.toObject(message.source, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.results != null && message.hasOwnProperty("results")) + object.results = $root.google.devtools.cloudbuild.v1.Results.toObject(message.results, options); + if (message.steps && message.steps.length) { + object.steps = []; + for (var j = 0; j < message.steps.length; ++j) + object.steps[j] = $root.google.devtools.cloudbuild.v1.BuildStep.toObject(message.steps[j], options); + } + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = message.images[j]; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.logsBucket != null && message.hasOwnProperty("logsBucket")) + object.logsBucket = message.logsBucket; + if (message.sourceProvenance != null && message.hasOwnProperty("sourceProvenance")) + object.sourceProvenance = $root.google.devtools.cloudbuild.v1.SourceProvenance.toObject(message.sourceProvenance, options); + if (message.buildTriggerId != null && message.hasOwnProperty("buildTriggerId")) + object.buildTriggerId = message.buildTriggerId; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.devtools.cloudbuild.v1.BuildOptions.toObject(message.options, options); + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.logUrl != null && message.hasOwnProperty("logUrl")) + object.logUrl = message.logUrl; + var keys2; + if (message.substitutions && (keys2 = Object.keys(message.substitutions)).length) { + object.substitutions = {}; + for (var j = 0; j < keys2.length; ++j) + object.substitutions[keys2[j]] = message.substitutions[keys2[j]]; + } + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } if (message.secrets && message.secrets.length) { object.secrets = []; for (var j = 0; j < message.secrets.length; ++j) @@ -5383,56 +6084,330 @@ for (var j = 0; j < message.warnings.length; ++j) object.warnings[j] = $root.google.devtools.cloudbuild.v1.Build.Warning.toObject(message.warnings[j], options); } - if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) - object.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.toObject(message.failureInfo, options); - return object; + if (message.failureInfo != null && message.hasOwnProperty("failureInfo")) + object.failureInfo = $root.google.devtools.cloudbuild.v1.Build.FailureInfo.toObject(message.failureInfo, options); + return object; + }; + + /** + * Converts this Build to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build + * @instance + * @returns {Object.} JSON object + */ + Build.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Build + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Build.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build"; }; - /** - * Converts this Build to JSON. - * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Build - * @instance - * @returns {Object.} JSON object - */ - Build.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Build.Warning = (function() { + + /** + * Properties of a Warning. + * @memberof google.devtools.cloudbuild.v1.Build + * @interface IWarning + * @property {string|null} [text] Warning text + * @property {google.devtools.cloudbuild.v1.Build.Warning.Priority|null} [priority] Warning priority + */ + + /** + * Constructs a new Warning. + * @memberof google.devtools.cloudbuild.v1.Build + * @classdesc Represents a Warning. + * @implements IWarning + * @constructor + * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set + */ + function Warning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Warning text. + * @member {string} text + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + */ + Warning.prototype.text = ""; + + /** + * Warning priority. + * @member {google.devtools.cloudbuild.v1.Build.Warning.Priority} priority + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + */ + Warning.prototype.priority = 0; + + /** + * Creates a new Warning instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning instance + */ + Warning.create = function create(properties) { + return new Warning(properties); + }; + + /** + * Encodes the specified Warning message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Warning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.text != null && Object.hasOwnProperty.call(message, "text")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); + if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.priority); + return writer; + }; + + /** + * Encodes the specified Warning message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Warning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Warning message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Warning.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.text = reader.string(); + break; + } + case 2: { + message.priority = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Warning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Warning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Warning message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Warning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.text != null && message.hasOwnProperty("text")) + if (!$util.isString(message.text)) + return "text: string expected"; + if (message.priority != null && message.hasOwnProperty("priority")) + switch (message.priority) { + default: + return "priority: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Warning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + */ + Warning.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build.Warning) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); + if (object.text != null) + message.text = String(object.text); + switch (object.priority) { + default: + if (typeof object.priority === "number") { + message.priority = object.priority; + break; + } + break; + case "PRIORITY_UNSPECIFIED": + case 0: + message.priority = 0; + break; + case "INFO": + case 1: + message.priority = 1; + break; + case "WARNING": + case 2: + message.priority = 2; + break; + case "ALERT": + case 3: + message.priority = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Warning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {google.devtools.cloudbuild.v1.Build.Warning} message Warning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Warning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.text = ""; + object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; + } + if (message.text != null && message.hasOwnProperty("text")) + object.text = message.text; + if (message.priority != null && message.hasOwnProperty("priority")) + object.priority = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] === undefined ? message.priority : $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] : message.priority; + return object; + }; + + /** + * Converts this Warning to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @instance + * @returns {Object.} JSON object + */ + Warning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Warning + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Warning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.Warning"; + }; + + /** + * Priority enum. + * @name google.devtools.cloudbuild.v1.Build.Warning.Priority + * @enum {number} + * @property {number} PRIORITY_UNSPECIFIED=0 PRIORITY_UNSPECIFIED value + * @property {number} INFO=1 INFO value + * @property {number} WARNING=2 WARNING value + * @property {number} ALERT=3 ALERT value + */ + Warning.Priority = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PRIORITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "INFO"] = 1; + values[valuesById[2] = "WARNING"] = 2; + values[valuesById[3] = "ALERT"] = 3; + return values; + })(); - /** - * Gets the default type url for Build - * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Build - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Build.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build"; - }; + return Warning; + })(); - Build.Warning = (function() { + Build.FailureInfo = (function() { /** - * Properties of a Warning. + * Properties of a FailureInfo. * @memberof google.devtools.cloudbuild.v1.Build - * @interface IWarning - * @property {string|null} [text] Warning text - * @property {google.devtools.cloudbuild.v1.Build.Warning.Priority|null} [priority] Warning priority + * @interface IFailureInfo + * @property {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|null} [type] FailureInfo type + * @property {string|null} [detail] FailureInfo detail */ /** - * Constructs a new Warning. + * Constructs a new FailureInfo. * @memberof google.devtools.cloudbuild.v1.Build - * @classdesc Represents a Warning. - * @implements IWarning + * @classdesc Represents a FailureInfo. + * @implements IFailureInfo * @constructor - * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set */ - function Warning(properties) { + function FailureInfo(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5440,89 +6415,89 @@ } /** - * Warning text. - * @member {string} text - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * FailureInfo type. + * @member {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType} type + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @instance */ - Warning.prototype.text = ""; + FailureInfo.prototype.type = 0; /** - * Warning priority. - * @member {google.devtools.cloudbuild.v1.Build.Warning.Priority} priority - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * FailureInfo detail. + * @member {string} detail + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @instance */ - Warning.prototype.priority = 0; + FailureInfo.prototype.detail = ""; /** - * Creates a new Warning instance using the specified properties. + * Creates a new FailureInfo instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @static - * @param {google.devtools.cloudbuild.v1.Build.IWarning=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning instance + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo instance */ - Warning.create = function create(properties) { - return new Warning(properties); + FailureInfo.create = function create(properties) { + return new FailureInfo(properties); }; /** - * Encodes the specified Warning message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * Encodes the specified FailureInfo message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @static - * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Warning.encode = function encode(message, writer) { + FailureInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.text != null && Object.hasOwnProperty.call(message, "text")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.text); - if (message.priority != null && Object.hasOwnProperty.call(message, "priority")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.priority); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); return writer; }; /** - * Encodes the specified Warning message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.Warning.verify|verify} messages. + * Encodes the specified FailureInfo message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @static - * @param {google.devtools.cloudbuild.v1.Build.IWarning} message Warning message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Warning.encodeDelimited = function encodeDelimited(message, writer) { + FailureInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Warning message from the specified reader or buffer. + * Decodes a FailureInfo message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Warning.decode = function decode(reader, length) { + FailureInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.text = reader.string(); + message.type = reader.int32(); break; } case 2: { - message.priority = reader.int32(); + message.detail = reader.string(); break; } default: @@ -5530,183 +6505,573 @@ break; } } - return message; + return message; + }; + + /** + * Decodes a FailureInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FailureInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FailureInfo message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FailureInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + return null; + }; + + /** + * Creates a FailureInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + */ + FailureInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Build.FailureInfo) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "FAILURE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PUSH_FAILED": + case 1: + message.type = 1; + break; + case "PUSH_IMAGE_NOT_FOUND": + case 2: + message.type = 2; + break; + case "PUSH_NOT_AUTHORIZED": + case 3: + message.type = 3; + break; + case "LOGGING_FAILURE": + case 4: + message.type = 4; + break; + case "USER_BUILD_STEP": + case 5: + message.type = 5; + break; + case "FETCH_SOURCE_FAILED": + case 6: + message.type = 6; + break; + } + if (object.detail != null) + message.detail = String(object.detail); + return message; + }; + + /** + * Creates a plain object from a FailureInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @static + * @param {google.devtools.cloudbuild.v1.Build.FailureInfo} message FailureInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FailureInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "FAILURE_TYPE_UNSPECIFIED" : 0; + object.detail = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] === undefined ? message.type : $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] : message.type; + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + return object; }; /** - * Decodes a Warning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build.Warning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Converts this FailureInfo to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @instance + * @returns {Object.} JSON object */ - Warning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + FailureInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Verifies a Warning message. - * @function verify - * @memberof google.devtools.cloudbuild.v1.Build.Warning + * Gets the default type url for FailureInfo + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - Warning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.text != null && message.hasOwnProperty("text")) - if (!$util.isString(message.text)) - return "text: string expected"; - if (message.priority != null && message.hasOwnProperty("priority")) - switch (message.priority) { - default: - return "priority: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - return null; + FailureInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.FailureInfo"; }; /** - * Creates a Warning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Build.Warning - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Build.Warning} Warning + * FailureType enum. + * @name google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType + * @enum {number} + * @property {number} FAILURE_TYPE_UNSPECIFIED=0 FAILURE_TYPE_UNSPECIFIED value + * @property {number} PUSH_FAILED=1 PUSH_FAILED value + * @property {number} PUSH_IMAGE_NOT_FOUND=2 PUSH_IMAGE_NOT_FOUND value + * @property {number} PUSH_NOT_AUTHORIZED=3 PUSH_NOT_AUTHORIZED value + * @property {number} LOGGING_FAILURE=4 LOGGING_FAILURE value + * @property {number} USER_BUILD_STEP=5 USER_BUILD_STEP value + * @property {number} FETCH_SOURCE_FAILED=6 FETCH_SOURCE_FAILED value */ - Warning.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Build.Warning) - return object; - var message = new $root.google.devtools.cloudbuild.v1.Build.Warning(); - if (object.text != null) - message.text = String(object.text); - switch (object.priority) { - default: - if (typeof object.priority === "number") { - message.priority = object.priority; + FailureInfo.FailureType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FAILURE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PUSH_FAILED"] = 1; + values[valuesById[2] = "PUSH_IMAGE_NOT_FOUND"] = 2; + values[valuesById[3] = "PUSH_NOT_AUTHORIZED"] = 3; + values[valuesById[4] = "LOGGING_FAILURE"] = 4; + values[valuesById[5] = "USER_BUILD_STEP"] = 5; + values[valuesById[6] = "FETCH_SOURCE_FAILED"] = 6; + return values; + })(); + + return FailureInfo; + })(); + + /** + * Status enum. + * @name google.devtools.cloudbuild.v1.Build.Status + * @enum {number} + * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value + * @property {number} PENDING=10 PENDING value + * @property {number} QUEUED=1 QUEUED value + * @property {number} WORKING=2 WORKING value + * @property {number} SUCCESS=3 SUCCESS value + * @property {number} FAILURE=4 FAILURE value + * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value + * @property {number} TIMEOUT=6 TIMEOUT value + * @property {number} CANCELLED=7 CANCELLED value + * @property {number} EXPIRED=9 EXPIRED value + */ + Build.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNKNOWN"] = 0; + values[valuesById[10] = "PENDING"] = 10; + values[valuesById[1] = "QUEUED"] = 1; + values[valuesById[2] = "WORKING"] = 2; + values[valuesById[3] = "SUCCESS"] = 3; + values[valuesById[4] = "FAILURE"] = 4; + values[valuesById[5] = "INTERNAL_ERROR"] = 5; + values[valuesById[6] = "TIMEOUT"] = 6; + values[valuesById[7] = "CANCELLED"] = 7; + values[valuesById[9] = "EXPIRED"] = 9; + return values; + })(); + + return Build; + })(); + + v1.Artifacts = (function() { + + /** + * Properties of an Artifacts. + * @memberof google.devtools.cloudbuild.v1 + * @interface IArtifacts + * @property {Array.|null} [images] Artifacts images + * @property {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null} [objects] Artifacts objects + * @property {Array.|null} [mavenArtifacts] Artifacts mavenArtifacts + * @property {Array.|null} [pythonPackages] Artifacts pythonPackages + */ + + /** + * Constructs a new Artifacts. + * @memberof google.devtools.cloudbuild.v1 + * @classdesc Represents an Artifacts. + * @implements IArtifacts + * @constructor + * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set + */ + function Artifacts(properties) { + this.images = []; + this.mavenArtifacts = []; + this.pythonPackages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Artifacts images. + * @member {Array.} images + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.images = $util.emptyArray; + + /** + * Artifacts objects. + * @member {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null|undefined} objects + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.objects = null; + + /** + * Artifacts mavenArtifacts. + * @member {Array.} mavenArtifacts + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.mavenArtifacts = $util.emptyArray; + + /** + * Artifacts pythonPackages. + * @member {Array.} pythonPackages + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + */ + Artifacts.prototype.pythonPackages = $util.emptyArray; + + /** + * Creates a new Artifacts instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts instance + */ + Artifacts.create = function create(properties) { + return new Artifacts(properties); + }; + + /** + * Encodes the specified Artifacts message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifacts.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.images[i]); + if (message.objects != null && Object.hasOwnProperty.call(message, "objects")) + $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.encode(message.objects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.mavenArtifacts != null && message.mavenArtifacts.length) + for (var i = 0; i < message.mavenArtifacts.length; ++i) + $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.encode(message.mavenArtifacts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pythonPackages != null && message.pythonPackages.length) + for (var i = 0; i < message.pythonPackages.length; ++i) + $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.encode(message.pythonPackages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Artifacts message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Artifacts.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Artifacts message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifacts.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push(reader.string()); break; } - break; - case "PRIORITY_UNSPECIFIED": - case 0: - message.priority = 0; - break; - case "INFO": - case 1: - message.priority = 1; - break; - case "WARNING": - case 2: - message.priority = 2; - break; - case "ALERT": - case 3: - message.priority = 3; + case 2: { + message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.mavenArtifacts && message.mavenArtifacts.length)) + message.mavenArtifacts = []; + message.mavenArtifacts.push($root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.pythonPackages && message.pythonPackages.length)) + message.pythonPackages = []; + message.pythonPackages.push($root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a Warning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.cloudbuild.v1.Build.Warning - * @static - * @param {google.devtools.cloudbuild.v1.Build.Warning} message Warning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Warning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.text = ""; - object.priority = options.enums === String ? "PRIORITY_UNSPECIFIED" : 0; - } - if (message.text != null && message.hasOwnProperty("text")) - object.text = message.text; - if (message.priority != null && message.hasOwnProperty("priority")) - object.priority = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] === undefined ? message.priority : $root.google.devtools.cloudbuild.v1.Build.Warning.Priority[message.priority] : message.priority; - return object; - }; + /** + * Decodes an Artifacts message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Artifacts.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Warning to JSON. - * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Build.Warning - * @instance - * @returns {Object.} JSON object - */ - Warning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies an Artifacts message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Artifacts.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) + if (!$util.isString(message.images[i])) + return "images: string[] expected"; + } + if (message.objects != null && message.hasOwnProperty("objects")) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify(message.objects); + if (error) + return "objects." + error; + } + if (message.mavenArtifacts != null && message.hasOwnProperty("mavenArtifacts")) { + if (!Array.isArray(message.mavenArtifacts)) + return "mavenArtifacts: array expected"; + for (var i = 0; i < message.mavenArtifacts.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.verify(message.mavenArtifacts[i]); + if (error) + return "mavenArtifacts." + error; + } + } + if (message.pythonPackages != null && message.hasOwnProperty("pythonPackages")) { + if (!Array.isArray(message.pythonPackages)) + return "pythonPackages: array expected"; + for (var i = 0; i < message.pythonPackages.length; ++i) { + var error = $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.verify(message.pythonPackages[i]); + if (error) + return "pythonPackages." + error; + } + } + return null; + }; - /** - * Gets the default type url for Warning - * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Build.Warning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Warning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + /** + * Creates an Artifacts message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts + */ + Artifacts.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts(); + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) + message.images[i] = String(object.images[i]); + } + if (object.objects != null) { + if (typeof object.objects !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.objects: object expected"); + message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.fromObject(object.objects); + } + if (object.mavenArtifacts) { + if (!Array.isArray(object.mavenArtifacts)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.mavenArtifacts: array expected"); + message.mavenArtifacts = []; + for (var i = 0; i < object.mavenArtifacts.length; ++i) { + if (typeof object.mavenArtifacts[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.mavenArtifacts: object expected"); + message.mavenArtifacts[i] = $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.fromObject(object.mavenArtifacts[i]); } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.Warning"; - }; + } + if (object.pythonPackages) { + if (!Array.isArray(object.pythonPackages)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.pythonPackages: array expected"); + message.pythonPackages = []; + for (var i = 0; i < object.pythonPackages.length; ++i) { + if (typeof object.pythonPackages[i] !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.pythonPackages: object expected"); + message.pythonPackages[i] = $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.fromObject(object.pythonPackages[i]); + } + } + return message; + }; - /** - * Priority enum. - * @name google.devtools.cloudbuild.v1.Build.Warning.Priority - * @enum {number} - * @property {number} PRIORITY_UNSPECIFIED=0 PRIORITY_UNSPECIFIED value - * @property {number} INFO=1 INFO value - * @property {number} WARNING=2 WARNING value - * @property {number} ALERT=3 ALERT value - */ - Warning.Priority = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PRIORITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "INFO"] = 1; - values[valuesById[2] = "WARNING"] = 2; - values[valuesById[3] = "ALERT"] = 3; - return values; - })(); + /** + * Creates a plain object from an Artifacts message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts} message Artifacts + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Artifacts.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.images = []; + object.mavenArtifacts = []; + object.pythonPackages = []; + } + if (options.defaults) + object.objects = null; + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = message.images[j]; + } + if (message.objects != null && message.hasOwnProperty("objects")) + object.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.toObject(message.objects, options); + if (message.mavenArtifacts && message.mavenArtifacts.length) { + object.mavenArtifacts = []; + for (var j = 0; j < message.mavenArtifacts.length; ++j) + object.mavenArtifacts[j] = $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.toObject(message.mavenArtifacts[j], options); + } + if (message.pythonPackages && message.pythonPackages.length) { + object.pythonPackages = []; + for (var j = 0; j < message.pythonPackages.length; ++j) + object.pythonPackages[j] = $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage.toObject(message.pythonPackages[j], options); + } + return object; + }; - return Warning; - })(); + /** + * Converts this Artifacts to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @instance + * @returns {Object.} JSON object + */ + Artifacts.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Build.FailureInfo = (function() { + /** + * Gets the default type url for Artifacts + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Artifacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts"; + }; + + Artifacts.ArtifactObjects = (function() { /** - * Properties of a FailureInfo. - * @memberof google.devtools.cloudbuild.v1.Build - * @interface IFailureInfo - * @property {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType|null} [type] FailureInfo type - * @property {string|null} [detail] FailureInfo detail + * Properties of an ArtifactObjects. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @interface IArtifactObjects + * @property {string|null} [location] ArtifactObjects location + * @property {Array.|null} [paths] ArtifactObjects paths + * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] ArtifactObjects timing */ /** - * Constructs a new FailureInfo. - * @memberof google.devtools.cloudbuild.v1.Build - * @classdesc Represents a FailureInfo. - * @implements IFailureInfo + * Constructs a new ArtifactObjects. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @classdesc Represents an ArtifactObjects. + * @implements IArtifactObjects * @constructor - * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set */ - function FailureInfo(properties) { + function ArtifactObjects(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5714,89 +7079,106 @@ } /** - * FailureInfo type. - * @member {google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType} type - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * ArtifactObjects location. + * @member {string} location + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @instance + */ + ArtifactObjects.prototype.location = ""; + + /** + * ArtifactObjects paths. + * @member {Array.} paths + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @instance */ - FailureInfo.prototype.type = 0; + ArtifactObjects.prototype.paths = $util.emptyArray; /** - * FailureInfo detail. - * @member {string} detail - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * ArtifactObjects timing. + * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @instance */ - FailureInfo.prototype.detail = ""; + ArtifactObjects.prototype.timing = null; /** - * Creates a new FailureInfo instance using the specified properties. + * Creates a new ArtifactObjects instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static - * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo instance + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects instance */ - FailureInfo.create = function create(properties) { - return new FailureInfo(properties); + ArtifactObjects.create = function create(properties) { + return new ArtifactObjects(properties); }; /** - * Encodes the specified FailureInfo message. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * Encodes the specified ArtifactObjects message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static - * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FailureInfo.encode = function encode(message, writer) { + ArtifactObjects.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + 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.timing != null && Object.hasOwnProperty.call(message, "timing")) + $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified FailureInfo message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Build.FailureInfo.verify|verify} messages. + * Encodes the specified ArtifactObjects message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static - * @param {google.devtools.cloudbuild.v1.Build.IFailureInfo} message FailureInfo message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FailureInfo.encodeDelimited = function encodeDelimited(message, writer) { + ArtifactObjects.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FailureInfo message from the specified reader or buffer. + * Decodes an ArtifactObjects message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FailureInfo.decode = function decode(reader, length) { + ArtifactObjects.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.location = reader.string(); break; } case 2: { - message.detail = reader.string(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + case 3: { + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); break; } default: @@ -5808,479 +7190,454 @@ }; /** - * Decodes a FailureInfo message from the specified reader or buffer, length delimited. + * Decodes an ArtifactObjects message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FailureInfo.decodeDelimited = function decodeDelimited(reader) { + ArtifactObjects.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FailureInfo message. + * Verifies an ArtifactObjects message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FailureInfo.verify = function verify(message) { + ArtifactObjects.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: 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.timing != null && message.hasOwnProperty("timing")) { + var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); + if (error) + return "timing." + error; + } return null; }; /** - * Creates a FailureInfo message from a plain object. Also converts values to their respective internal types. + * Creates an ArtifactObjects message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Build.FailureInfo} FailureInfo + * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects */ - FailureInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Build.FailureInfo) + ArtifactObjects.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects) return object; - var message = new $root.google.devtools.cloudbuild.v1.Build.FailureInfo(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "FAILURE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PUSH_FAILED": - case 1: - message.type = 1; - break; - case "PUSH_IMAGE_NOT_FOUND": - case 2: - message.type = 2; - break; - case "PUSH_NOT_AUTHORIZED": - case 3: - message.type = 3; - break; - case "LOGGING_FAILURE": - case 4: - message.type = 4; - break; - case "USER_BUILD_STEP": - case 5: - message.type = 5; - break; - case "FETCH_SOURCE_FAILED": - case 6: - message.type = 6; - break; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); + if (object.location != null) + message.location = String(object.location); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + if (object.timing != null) { + if (typeof object.timing !== "object") + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.timing: object expected"); + message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); } - if (object.detail != null) - message.detail = String(object.detail); return message; }; /** - * Creates a plain object from a FailureInfo message. Also converts values to other types if specified. + * Creates a plain object from an ArtifactObjects message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static - * @param {google.devtools.cloudbuild.v1.Build.FailureInfo} message FailureInfo + * @param {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} message ArtifactObjects * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FailureInfo.toObject = function toObject(message, options) { + ArtifactObjects.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.paths = []; if (options.defaults) { - object.type = options.enums === String ? "FAILURE_TYPE_UNSPECIFIED" : 0; - object.detail = ""; + object.location = ""; + object.timing = null; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] === undefined ? message.type : $root.google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType[message.type] : message.type; - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + 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.timing != null && message.hasOwnProperty("timing")) + object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); return object; }; /** - * Converts this FailureInfo to JSON. + * Converts this ArtifactObjects to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @instance * @returns {Object.} JSON object */ - FailureInfo.prototype.toJSON = function toJSON() { + ArtifactObjects.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FailureInfo + * Gets the default type url for ArtifactObjects * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Build.FailureInfo + * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FailureInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Build.FailureInfo"; - }; - - /** - * FailureType enum. - * @name google.devtools.cloudbuild.v1.Build.FailureInfo.FailureType - * @enum {number} - * @property {number} FAILURE_TYPE_UNSPECIFIED=0 FAILURE_TYPE_UNSPECIFIED value - * @property {number} PUSH_FAILED=1 PUSH_FAILED value - * @property {number} PUSH_IMAGE_NOT_FOUND=2 PUSH_IMAGE_NOT_FOUND value - * @property {number} PUSH_NOT_AUTHORIZED=3 PUSH_NOT_AUTHORIZED value - * @property {number} LOGGING_FAILURE=4 LOGGING_FAILURE value - * @property {number} USER_BUILD_STEP=5 USER_BUILD_STEP value - * @property {number} FETCH_SOURCE_FAILED=6 FETCH_SOURCE_FAILED value - */ - FailureInfo.FailureType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FAILURE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PUSH_FAILED"] = 1; - values[valuesById[2] = "PUSH_IMAGE_NOT_FOUND"] = 2; - values[valuesById[3] = "PUSH_NOT_AUTHORIZED"] = 3; - values[valuesById[4] = "LOGGING_FAILURE"] = 4; - values[valuesById[5] = "USER_BUILD_STEP"] = 5; - values[valuesById[6] = "FETCH_SOURCE_FAILED"] = 6; - return values; - })(); + * @returns {string} The default type url + */ + ArtifactObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects"; + }; - return FailureInfo; + return ArtifactObjects; })(); - /** - * Status enum. - * @name google.devtools.cloudbuild.v1.Build.Status - * @enum {number} - * @property {number} STATUS_UNKNOWN=0 STATUS_UNKNOWN value - * @property {number} PENDING=10 PENDING value - * @property {number} QUEUED=1 QUEUED value - * @property {number} WORKING=2 WORKING value - * @property {number} SUCCESS=3 SUCCESS value - * @property {number} FAILURE=4 FAILURE value - * @property {number} INTERNAL_ERROR=5 INTERNAL_ERROR value - * @property {number} TIMEOUT=6 TIMEOUT value - * @property {number} CANCELLED=7 CANCELLED value - * @property {number} EXPIRED=9 EXPIRED value - */ - Build.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNKNOWN"] = 0; - values[valuesById[10] = "PENDING"] = 10; - values[valuesById[1] = "QUEUED"] = 1; - values[valuesById[2] = "WORKING"] = 2; - values[valuesById[3] = "SUCCESS"] = 3; - values[valuesById[4] = "FAILURE"] = 4; - values[valuesById[5] = "INTERNAL_ERROR"] = 5; - values[valuesById[6] = "TIMEOUT"] = 6; - values[valuesById[7] = "CANCELLED"] = 7; - values[valuesById[9] = "EXPIRED"] = 9; - return values; - })(); + Artifacts.MavenArtifact = (function() { - return Build; - })(); + /** + * Properties of a MavenArtifact. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @interface IMavenArtifact + * @property {string|null} [repository] MavenArtifact repository + * @property {string|null} [path] MavenArtifact path + * @property {string|null} [artifactId] MavenArtifact artifactId + * @property {string|null} [groupId] MavenArtifact groupId + * @property {string|null} [version] MavenArtifact version + */ - v1.Artifacts = (function() { + /** + * Constructs a new MavenArtifact. + * @memberof google.devtools.cloudbuild.v1.Artifacts + * @classdesc Represents a MavenArtifact. + * @implements IMavenArtifact + * @constructor + * @param {google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact=} [properties] Properties to set + */ + function MavenArtifact(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of an Artifacts. - * @memberof google.devtools.cloudbuild.v1 - * @interface IArtifacts - * @property {Array.|null} [images] Artifacts images - * @property {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null} [objects] Artifacts objects - */ + /** + * MavenArtifact repository. + * @member {string} repository + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + */ + MavenArtifact.prototype.repository = ""; - /** - * Constructs a new Artifacts. - * @memberof google.devtools.cloudbuild.v1 - * @classdesc Represents an Artifacts. - * @implements IArtifacts - * @constructor - * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set - */ - function Artifacts(properties) { - this.images = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * MavenArtifact path. + * @member {string} path + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + */ + MavenArtifact.prototype.path = ""; - /** - * Artifacts images. - * @member {Array.} images - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @instance - */ - Artifacts.prototype.images = $util.emptyArray; + /** + * MavenArtifact artifactId. + * @member {string} artifactId + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + */ + MavenArtifact.prototype.artifactId = ""; - /** - * Artifacts objects. - * @member {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects|null|undefined} objects - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @instance - */ - Artifacts.prototype.objects = null; + /** + * MavenArtifact groupId. + * @member {string} groupId + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + */ + MavenArtifact.prototype.groupId = ""; - /** - * Creates a new Artifacts instance using the specified properties. - * @function create - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {google.devtools.cloudbuild.v1.IArtifacts=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts instance - */ - Artifacts.create = function create(properties) { - return new Artifacts(properties); - }; + /** + * MavenArtifact version. + * @member {string} version + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + */ + MavenArtifact.prototype.version = ""; - /** - * Encodes the specified Artifacts message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. - * @function encode - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Artifacts.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.images != null && message.images.length) - for (var i = 0; i < message.images.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.images[i]); - if (message.objects != null && Object.hasOwnProperty.call(message, "objects")) - $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.encode(message.objects, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Creates a new MavenArtifact instance using the specified properties. + * @function create + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts.MavenArtifact} MavenArtifact instance + */ + MavenArtifact.create = function create(properties) { + return new MavenArtifact(properties); + }; - /** - * Encodes the specified Artifacts message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.verify|verify} messages. - * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {google.devtools.cloudbuild.v1.IArtifacts} message Artifacts message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Artifacts.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified MavenArtifact message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.verify|verify} messages. + * @function encode + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact} message MavenArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenArtifact.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.artifactId != null && Object.hasOwnProperty.call(message, "artifactId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.artifactId); + if (message.groupId != null && Object.hasOwnProperty.call(message, "groupId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.groupId); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + return writer; + }; - /** - * Decodes an Artifacts message from the specified reader or buffer. - * @function decode - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Artifacts.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.images && message.images.length)) - message.images = []; - message.images.push(reader.string()); - break; - } - case 2: { - message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.decode(reader, reader.uint32()); + /** + * Encodes the specified MavenArtifact message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.MavenArtifact.verify|verify} messages. + * @function encodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.IMavenArtifact} message MavenArtifact message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MavenArtifact.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MavenArtifact message from the specified reader or buffer. + * @function decode + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.devtools.cloudbuild.v1.Artifacts.MavenArtifact} MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenArtifact.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.repository = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + case 3: { + message.artifactId = reader.string(); + break; + } + case 4: { + message.groupId = reader.string(); + break; + } + case 5: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes an Artifacts message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Artifacts.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a MavenArtifact message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.devtools.cloudbuild.v1.Artifacts.MavenArtifact} MavenArtifact + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MavenArtifact.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an Artifacts message. - * @function verify - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Artifacts.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.images != null && message.hasOwnProperty("images")) { - if (!Array.isArray(message.images)) - return "images: array expected"; - for (var i = 0; i < message.images.length; ++i) - if (!$util.isString(message.images[i])) - return "images: string[] expected"; - } - if (message.objects != null && message.hasOwnProperty("objects")) { - var error = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify(message.objects); - if (error) - return "objects." + error; - } - return null; - }; + /** + * Verifies a MavenArtifact message. + * @function verify + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MavenArtifact.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + if (!$util.isString(message.artifactId)) + return "artifactId: string expected"; + if (message.groupId != null && message.hasOwnProperty("groupId")) + if (!$util.isString(message.groupId)) + return "groupId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; - /** - * Creates an Artifacts message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Artifacts} Artifacts - */ - Artifacts.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts) + /** + * Creates a MavenArtifact message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {Object.} object Plain object + * @returns {google.devtools.cloudbuild.v1.Artifacts.MavenArtifact} MavenArtifact + */ + MavenArtifact.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact) + return object; + var message = new $root.google.devtools.cloudbuild.v1.Artifacts.MavenArtifact(); + if (object.repository != null) + message.repository = String(object.repository); + if (object.path != null) + message.path = String(object.path); + if (object.artifactId != null) + message.artifactId = String(object.artifactId); + if (object.groupId != null) + message.groupId = String(object.groupId); + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a MavenArtifact message. Also converts values to other types if specified. + * @function toObject + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {google.devtools.cloudbuild.v1.Artifacts.MavenArtifact} message MavenArtifact + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MavenArtifact.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.repository = ""; + object.path = ""; + object.artifactId = ""; + object.groupId = ""; + object.version = ""; + } + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.artifactId != null && message.hasOwnProperty("artifactId")) + object.artifactId = message.artifactId; + if (message.groupId != null && message.hasOwnProperty("groupId")) + object.groupId = message.groupId; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; return object; - var message = new $root.google.devtools.cloudbuild.v1.Artifacts(); - if (object.images) { - if (!Array.isArray(object.images)) - throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.images: array expected"); - message.images = []; - for (var i = 0; i < object.images.length; ++i) - message.images[i] = String(object.images[i]); - } - if (object.objects != null) { - if (typeof object.objects !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.objects: object expected"); - message.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.fromObject(object.objects); - } - return message; - }; + }; - /** - * Creates a plain object from an Artifacts message. Also converts values to other types if specified. - * @function toObject - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {google.devtools.cloudbuild.v1.Artifacts} message Artifacts - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Artifacts.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.images = []; - if (options.defaults) - object.objects = null; - if (message.images && message.images.length) { - object.images = []; - for (var j = 0; j < message.images.length; ++j) - object.images[j] = message.images[j]; - } - if (message.objects != null && message.hasOwnProperty("objects")) - object.objects = $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.toObject(message.objects, options); - return object; - }; + /** + * Converts this MavenArtifact to JSON. + * @function toJSON + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @instance + * @returns {Object.} JSON object + */ + MavenArtifact.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this Artifacts to JSON. - * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @instance - * @returns {Object.} JSON object - */ - Artifacts.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for MavenArtifact + * @function getTypeUrl + * @memberof google.devtools.cloudbuild.v1.Artifacts.MavenArtifact + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MavenArtifact.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.MavenArtifact"; + }; - /** - * Gets the default type url for Artifacts - * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Artifacts - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Artifacts.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts"; - }; + return MavenArtifact; + })(); - Artifacts.ArtifactObjects = (function() { + Artifacts.PythonPackage = (function() { /** - * Properties of an ArtifactObjects. + * Properties of a PythonPackage. * @memberof google.devtools.cloudbuild.v1.Artifacts - * @interface IArtifactObjects - * @property {string|null} [location] ArtifactObjects location - * @property {Array.|null} [paths] ArtifactObjects paths - * @property {google.devtools.cloudbuild.v1.ITimeSpan|null} [timing] ArtifactObjects timing + * @interface IPythonPackage + * @property {string|null} [repository] PythonPackage repository + * @property {Array.|null} [paths] PythonPackage paths */ /** - * Constructs a new ArtifactObjects. + * Constructs a new PythonPackage. * @memberof google.devtools.cloudbuild.v1.Artifacts - * @classdesc Represents an ArtifactObjects. - * @implements IArtifactObjects + * @classdesc Represents a PythonPackage. + * @implements IPythonPackage * @constructor - * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set + * @param {google.devtools.cloudbuild.v1.Artifacts.IPythonPackage=} [properties] Properties to set */ - function ArtifactObjects(properties) { + function PythonPackage(properties) { this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) @@ -6289,96 +7646,86 @@ } /** - * ArtifactObjects location. - * @member {string} location - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * PythonPackage repository. + * @member {string} repository + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @instance */ - ArtifactObjects.prototype.location = ""; + PythonPackage.prototype.repository = ""; /** - * ArtifactObjects paths. + * PythonPackage paths. * @member {Array.} paths - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects - * @instance - */ - ArtifactObjects.prototype.paths = $util.emptyArray; - - /** - * ArtifactObjects timing. - * @member {google.devtools.cloudbuild.v1.ITimeSpan|null|undefined} timing - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @instance */ - ArtifactObjects.prototype.timing = null; + PythonPackage.prototype.paths = $util.emptyArray; /** - * Creates a new ArtifactObjects instance using the specified properties. + * Creates a new PythonPackage instance using the specified properties. * @function create - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static - * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects=} [properties] Properties to set - * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects instance + * @param {google.devtools.cloudbuild.v1.Artifacts.IPythonPackage=} [properties] Properties to set + * @returns {google.devtools.cloudbuild.v1.Artifacts.PythonPackage} PythonPackage instance */ - ArtifactObjects.create = function create(properties) { - return new ArtifactObjects(properties); + PythonPackage.create = function create(properties) { + return new PythonPackage(properties); }; /** - * Encodes the specified ArtifactObjects message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * Encodes the specified PythonPackage message. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.PythonPackage.verify|verify} messages. * @function encode - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static - * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Artifacts.IPythonPackage} message PythonPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArtifactObjects.encode = function encode(message, writer) { + PythonPackage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.repository != null && Object.hasOwnProperty.call(message, "repository")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.repository); 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.timing != null && Object.hasOwnProperty.call(message, "timing")) - $root.google.devtools.cloudbuild.v1.TimeSpan.encode(message.timing, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ArtifactObjects message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.verify|verify} messages. + * Encodes the specified PythonPackage message, length delimited. Does not implicitly {@link google.devtools.cloudbuild.v1.Artifacts.PythonPackage.verify|verify} messages. * @function encodeDelimited - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static - * @param {google.devtools.cloudbuild.v1.Artifacts.IArtifactObjects} message ArtifactObjects message or plain object to encode + * @param {google.devtools.cloudbuild.v1.Artifacts.IPythonPackage} message PythonPackage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ArtifactObjects.encodeDelimited = function encodeDelimited(message, writer) { + PythonPackage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ArtifactObjects message from the specified reader or buffer. + * Decodes a PythonPackage message from the specified reader or buffer. * @function decode - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + * @returns {google.devtools.cloudbuild.v1.Artifacts.PythonPackage} PythonPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArtifactObjects.decode = function decode(reader, length) { + PythonPackage.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.location = reader.string(); + message.repository = reader.string(); break; } case 2: { @@ -6387,10 +7734,6 @@ message.paths.push(reader.string()); break; } - case 3: { - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -6400,35 +7743,35 @@ }; /** - * Decodes an ArtifactObjects message from the specified reader or buffer, length delimited. + * Decodes a PythonPackage message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + * @returns {google.devtools.cloudbuild.v1.Artifacts.PythonPackage} PythonPackage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ArtifactObjects.decodeDelimited = function decodeDelimited(reader) { + PythonPackage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ArtifactObjects message. + * Verifies a PythonPackage message. * @function verify - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ArtifactObjects.verify = function verify(message) { + PythonPackage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; + if (message.repository != null && message.hasOwnProperty("repository")) + if (!$util.isString(message.repository)) + return "repository: string expected"; if (message.paths != null && message.hasOwnProperty("paths")) { if (!Array.isArray(message.paths)) return "paths: array expected"; @@ -6436,101 +7779,87 @@ if (!$util.isString(message.paths[i])) return "paths: string[] expected"; } - if (message.timing != null && message.hasOwnProperty("timing")) { - var error = $root.google.devtools.cloudbuild.v1.TimeSpan.verify(message.timing); - if (error) - return "timing." + error; - } return null; }; /** - * Creates an ArtifactObjects message from a plain object. Also converts values to their respective internal types. + * Creates a PythonPackage message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static * @param {Object.} object Plain object - * @returns {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} ArtifactObjects + * @returns {google.devtools.cloudbuild.v1.Artifacts.PythonPackage} PythonPackage */ - ArtifactObjects.fromObject = function fromObject(object) { - if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects) + PythonPackage.fromObject = function fromObject(object) { + if (object instanceof $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage) return object; - var message = new $root.google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects(); - if (object.location != null) - message.location = String(object.location); + var message = new $root.google.devtools.cloudbuild.v1.Artifacts.PythonPackage(); + if (object.repository != null) + message.repository = String(object.repository); if (object.paths) { if (!Array.isArray(object.paths)) - throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.paths: array expected"); + throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.PythonPackage.paths: array expected"); message.paths = []; for (var i = 0; i < object.paths.length; ++i) message.paths[i] = String(object.paths[i]); } - if (object.timing != null) { - if (typeof object.timing !== "object") - throw TypeError(".google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects.timing: object expected"); - message.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.fromObject(object.timing); - } return message; }; /** - * Creates a plain object from an ArtifactObjects message. Also converts values to other types if specified. + * Creates a plain object from a PythonPackage message. Also converts values to other types if specified. * @function toObject - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static - * @param {google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects} message ArtifactObjects + * @param {google.devtools.cloudbuild.v1.Artifacts.PythonPackage} message PythonPackage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ArtifactObjects.toObject = function toObject(message, options) { + PythonPackage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.paths = []; - if (options.defaults) { - object.location = ""; - object.timing = null; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; + if (options.defaults) + object.repository = ""; + if (message.repository != null && message.hasOwnProperty("repository")) + object.repository = message.repository; 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.timing != null && message.hasOwnProperty("timing")) - object.timing = $root.google.devtools.cloudbuild.v1.TimeSpan.toObject(message.timing, options); return object; }; /** - * Converts this ArtifactObjects to JSON. + * Converts this PythonPackage to JSON. * @function toJSON - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @instance * @returns {Object.} JSON object */ - ArtifactObjects.prototype.toJSON = function toJSON() { + PythonPackage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ArtifactObjects + * Gets the default type url for PythonPackage * @function getTypeUrl - * @memberof google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects + * @memberof google.devtools.cloudbuild.v1.Artifacts.PythonPackage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ArtifactObjects.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PythonPackage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.ArtifactObjects"; + return typeUrlPrefix + "/google.devtools.cloudbuild.v1.Artifacts.PythonPackage"; }; - return ArtifactObjects; + return PythonPackage; })(); return Artifacts; diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index 79e7f05380ca..eb38e36773e2 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -666,6 +666,44 @@ } } }, + "UploadedPythonPackage": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "fileHashes": { + "type": "FileHashes", + "id": 2 + }, + "pushTiming": { + "type": "TimeSpan", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UploadedMavenArtifact": { + "fields": { + "uri": { + "type": "string", + "id": 1 + }, + "fileHashes": { + "type": "FileHashes", + "id": 2 + }, + "pushTiming": { + "type": "TimeSpan", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, "BuildStep": { "fields": { "name": { @@ -734,6 +772,22 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "allowFailure": { + "type": "bool", + "id": 14 + }, + "exitCode": { + "type": "int32", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "allowExitCodes": { + "rule": "repeated", + "type": "int32", + "id": 18 + }, "script": { "type": "string", "id": 19 @@ -780,6 +834,16 @@ "artifactTiming": { "type": "TimeSpan", "id": 7 + }, + "pythonPackages": { + "rule": "repeated", + "type": "UploadedPythonPackage", + "id": 8 + }, + "mavenArtifacts": { + "rule": "repeated", + "type": "UploadedMavenArtifact", + "id": 9 } } }, @@ -1051,6 +1115,16 @@ "objects": { "type": "ArtifactObjects", "id": 2 + }, + "mavenArtifacts": { + "rule": "repeated", + "type": "MavenArtifact", + "id": 3 + }, + "pythonPackages": { + "rule": "repeated", + "type": "PythonPackage", + "id": 5 } }, "nested": { @@ -1073,6 +1147,43 @@ } } } + }, + "MavenArtifact": { + "fields": { + "repository": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + }, + "artifactId": { + "type": "string", + "id": 3 + }, + "groupId": { + "type": "string", + "id": 4 + }, + "version": { + "type": "string", + "id": 5 + } + } + }, + "PythonPackage": { + "fields": { + "repository": { + "type": "string", + "id": 1 + }, + "paths": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } } } }, From 86eda2284b91d61e48783cd4ecf223397a875510 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 01:55:51 -0800 Subject: [PATCH 223/223] chore(main): release 3.2.0 (#356) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 3.2.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-devtools-cloudbuild/CHANGELOG.md | 14 ++++++++++++++ packages/google-devtools-cloudbuild/package.json | 2 +- ...pet_metadata.google.devtools.cloudbuild.v1.json | 2 +- .../samples/package.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 732ce5489afc..bd232199c639 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [3.2.0](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.1.2...v3.2.0) (2022-11-11) + + +### Features + +* Add allow_failure, exit_code, and allow_exit_code to BuildStep message ([84c7dd7](https://github.com/googleapis/nodejs-cloudbuild/commit/84c7dd75501fea0d9c351904d40f4abd99e51e1a)) +* Integration of Cloud Build with Artifact Registry ([#352](https://github.com/googleapis/nodejs-cloudbuild/issues/352)) ([84c7dd7](https://github.com/googleapis/nodejs-cloudbuild/commit/84c7dd75501fea0d9c351904d40f4abd99e51e1a)) + + +### Bug Fixes + +* **deps:** Use google-gax v3.5.2 ([#354](https://github.com/googleapis/nodejs-cloudbuild/issues/354)) ([9570dc0](https://github.com/googleapis/nodejs-cloudbuild/commit/9570dc04db9e1722052c5515bd616ddf87d569a5)) +* Regenerated protos JS and TS definitions ([#358](https://github.com/googleapis/nodejs-cloudbuild/issues/358)) ([1e7a054](https://github.com/googleapis/nodejs-cloudbuild/commit/1e7a0540a78383c7dfd2b957e282a21dea1fc02c)) + ## [3.1.2](https://github.com/googleapis/nodejs-cloudbuild/compare/v3.1.1...v3.1.2) (2022-09-22) diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 2d20723f914a..a7a3e0b02fec 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -1,7 +1,7 @@ { "repository": "googleapis/nodejs-cloudbuild", "name": "@google-cloud/cloudbuild", - "version": "3.1.2", + "version": "3.2.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index ead43ace724a..5e030fc31adf 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "3.1.2", + "version": "3.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index eff1440160bb..fb8fa2576085 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha system-test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^3.1.2" + "@google-cloud/cloudbuild": "^3.2.0" }, "devDependencies": { "c8": "^7.0.0",